/**
 * Style dla strony Pozycjonowanie SEO Nowej Generacji
 * Cyber-Tech estetyka: ciemne tło, ciemny fiolet/magenta, animowane siatki
 */

:root {
  --seo-neon-purple: #8b5cf6;
  --seo-neon-magenta: #d946ef;
  --seo-dark-purple: #6d28d9;
  --seo-bg-dark: #0a0a0a;
  --seo-text-primary: #e0e0e0;
  --seo-grid-color: rgba(139, 92, 246, 0.1);
  --font-display: 'Orbitron', 'Roboto', 'Share Tech Mono', sans-serif;
  --font-body: 'Lexend', 'Roboto', sans-serif;
}

.seo-wrap {
  position: relative;
  min-height: 100vh;
  background: var(--seo-bg-dark);
  color: var(--seo-text-primary);
  overflow-x: hidden;
}

/* ===== Spine (linia boczna) ===== */
.seo-spine {
  position: fixed;
  left: 2rem;
  top: 0;
  bottom: 0;
  width: 2px;
  z-index: 1;
  pointer-events: none;
}

.seo-spine-line {
  display: block;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    var(--seo-neon-purple) 20%,
    var(--seo-neon-purple) 80%,
    transparent 100%
  );
  opacity: 0.3;
}

/* ===== Animowana siatka (grid overlay) ===== */
.seo-grid-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  z-index: 0;
  pointer-events: none;
  animation: seo-grid-pulse 4s ease-in-out infinite;
}

@keyframes seo-grid-pulse {
  0%, 100% { opacity: 0.3; }
  50% { opacity: 0.6; }
}

/* ===== Skaner (skanująca linia) ===== */
.seo-scanner-line {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--seo-neon-purple) 50%,
    transparent 100%
  );
  box-shadow: 0 0 20px var(--seo-neon-purple);
  z-index: 10;
  pointer-events: none;
  animation: seo-scanner-scan 3s linear infinite;
}

@keyframes seo-scanner-scan {
  0% {
    top: 0;
    opacity: 0;
  }
  10% {
    opacity: 1;
  }
  90% {
    opacity: 1;
  }
  100% {
    top: 100vh;
    opacity: 0;
  }
}

/* ===== Główna zawartość ===== */
.seo-main {
  position: relative;
  z-index: 2;
}

.seo-section {
  position: relative;
  padding: 6rem 2rem;
  min-height: 60vh;
}

.seo-section-inner {
  max-width: 1300px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.seo-section-badge {
  position: absolute;
  right: 2rem;
  top: 2rem;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--seo-neon-purple);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  z-index: 10;
  opacity: 0.6;
}

.seo-section-badge--hero {
  top: 50%;
  transform: translateY(-50%);
  right: 2rem;
  writing-mode: vertical-rl;
  text-orientation: mixed;
}

/* ===== Hero Section ===== */
.seo-hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 6rem;
  background: radial-gradient(
    ellipse at center,
    rgba(139, 92, 246, 0.05) 0%,
    transparent 70%
  );
}

.seo-hero-content {
  text-align: center;
  max-width: 1000px;
  margin: 0 auto;
}

.seo-h1 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4.5vw, 3.5rem);
  font-weight: 900;
  color: var(--seo-neon-purple);
  text-shadow: 
    0 0 30px rgba(139, 92, 246, 0.6),
    0 0 60px rgba(139, 92, 246, 0.3);
  margin-bottom: 2rem;
  letter-spacing: 0.1em;
  line-height: 1.2;
  text-transform: uppercase;
}

.seo-hero-subtitle {
  font-family: var(--font-body);
  font-size: clamp(1.1rem, 2vw, 1.4rem);
  color: var(--seo-text-primary);
  line-height: 1.8;
  max-width: 800px;
  margin: 0 auto;
  opacity: 0.9;
}

/* ===== Nagłówki ===== */
.seo-h2 {
  font-family: var(--font-display);
  font-size: clamp(1.5rem, 3vw, 2.5rem);
  font-weight: 700;
  color: var(--seo-neon-purple);
  margin-bottom: 1.5rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.4);
}

.seo-h3 {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 2vw, 1.8rem);
  font-weight: 700;
  color: var(--seo-neon-magenta);
  margin-bottom: 0.5rem;
  letter-spacing: 0.05em;
}

.seo-text {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.15rem);
  color: var(--seo-text-primary);
  line-height: 1.9;
  margin-bottom: 3rem;
  opacity: 0.9;
}

/* ===== Wizualizacja Semantic Core ===== */
.seo-semantic-visualization {
  position: relative;
  width: 100%;
  height: 500px;
  margin-top: 4rem;
  background: rgba(139, 92, 246, 0.03);
  border: 1px solid rgba(139, 92, 246, 0.2);
  overflow: hidden;
}

.seo-semantic-canvas {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
}

.seo-semantic-nodes {
  position: relative;
  width: 100%;
  height: 100%;
  z-index: 2;
}

.seo-semantic-node {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 1rem 1.5rem;
  background: rgba(139, 92, 246, 0.1);
  border: 2px solid rgba(139, 92, 246, 0.4);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.3s ease;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.seo-semantic-node:hover {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--seo-neon-purple);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.4);
  transform: scale(1.05);
}

.seo-node-main {
  background: rgba(139, 92, 246, 0.2);
  border-color: var(--seo-neon-purple);
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.5);
  position: relative;
}

.seo-node-pulse {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 100%;
  height: 100%;
  border-radius: 8px;
  background: var(--seo-neon-purple);
  opacity: 0;
  animation: seo-node-pulse 2s ease-in-out infinite;
  pointer-events: none;
}

@keyframes seo-node-pulse {
  0% {
    opacity: 0.3;
    transform: translate(-50%, -50%) scale(1);
  }
  50% {
    opacity: 0.1;
    transform: translate(-50%, -50%) scale(1.2);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -50%) scale(1.4);
  }
}

.seo-node-label {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--seo-neon-purple);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.6);
  position: relative;
  z-index: 1;
}

.seo-node-main .seo-node-label {
  font-size: 1.1rem;
  color: var(--seo-neon-magenta);
  text-shadow: 0 0 15px rgba(217, 70, 239, 0.8);
}

/* Pozycje węzłów */
.seo-semantic-node[data-node="core"] {
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

.seo-semantic-node[data-node="1"] {
  top: 20%;
  left: 20%;
}

.seo-semantic-node[data-node="2"] {
  top: 20%;
  right: 20%;
}

.seo-semantic-node[data-node="3"] {
  bottom: 20%;
  left: 20%;
}

.seo-semantic-node[data-node="4"] {
  bottom: 20%;
  right: 20%;
}

.seo-semantic-node[data-node="5"] {
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
}

@media (max-width: 768px) {
  .seo-semantic-visualization {
    height: 400px;
  }
  
  .seo-semantic-node {
    padding: 0.75rem 1rem;
  }
  
  .seo-node-label {
    font-size: 0.75rem;
  }
  
  .seo-node-main .seo-node-label {
    font-size: 0.9rem;
  }
  
  .seo-semantic-node[data-node="1"],
  .seo-semantic-node[data-node="2"],
  .seo-semantic-node[data-node="3"],
  .seo-semantic-node[data-node="4"] {
    top: auto;
    bottom: auto;
    left: auto;
    right: auto;
  }
  
  .seo-semantic-node[data-node="1"] {
    top: 15%;
    left: 10%;
  }
  
  .seo-semantic-node[data-node="2"] {
    top: 15%;
    right: 10%;
  }
  
  .seo-semantic-node[data-node="3"] {
    bottom: 15%;
    left: 10%;
  }
  
  .seo-semantic-node[data-node="4"] {
    bottom: 15%;
    right: 10%;
  }
  
  .seo-semantic-node[data-node="5"] {
    top: 5%;
    left: 50%;
    transform: translateX(-50%);
  }
}

/* ===== Sekcja Filary ===== */
.seo-section--pillars {
  background: rgba(139, 92, 246, 0.02);
}

.seo-pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 3rem;
  margin-top: 4rem;
}

.seo-pillar-item {
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  padding: 3rem 2rem;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.seo-pillar-item::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(139, 92, 246, 0.1),
    transparent
  );
  transition: left 0.5s ease;
}

.seo-pillar-item:hover {
  background: rgba(139, 92, 246, 0.08);
  border-color: rgba(139, 92, 246, 0.4);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.2);
  transform: translateY(-5px);
}

.seo-pillar-item:hover::before {
  left: 100%;
}

.seo-pillar-icon {
  font-size: 3rem;
  color: var(--seo-neon-purple);
  margin-bottom: 1.5rem;
  text-shadow: 0 0 20px rgba(139, 92, 246, 0.6);
}

.seo-pillar-label {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--seo-neon-magenta);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1rem;
  font-weight: 600;
}

.seo-pillar-desc {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--seo-text-primary);
  line-height: 1.8;
  opacity: 0.85;
}

/* ===== Sekcja Manifest ===== */
.seo-section--manifest {
  background: rgba(109, 40, 217, 0.03);
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.seo-manifest {
  text-align: center;
  max-width: 900px;
  margin: 0 auto;
}

.seo-manifest-quote {
  margin: 0;
  padding: 0;
  border: none;
}

.seo-manifest-quote p {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 2.5vw, 2rem);
  font-weight: 600;
  color: var(--seo-neon-magenta);
  line-height: 1.6;
  text-shadow: 0 0 30px rgba(217, 70, 239, 0.4);
  letter-spacing: 0.05em;
  position: relative;
  padding: 2rem;
}

.seo-manifest-quote p::before,
.seo-manifest-quote p::after {
  content: '"';
  font-size: 4rem;
  color: var(--seo-neon-purple);
  opacity: 0.3;
  position: absolute;
  font-family: serif;
}

.seo-manifest-quote p::before {
  top: -1rem;
  left: 0;
}

.seo-manifest-quote p::after {
  bottom: -3rem;
  right: 0;
}

/* ===== Sekcja CTA ===== */
.seo-section--cta {
  background: rgba(139, 92, 246, 0.05);
  min-height: 50vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.seo-cta-content {
  text-align: center;
  max-width: 800px;
  margin: 0 auto;
}

.seo-cta-text {
  font-family: var(--font-body);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  color: var(--seo-text-primary);
  margin-bottom: 3rem;
  opacity: 0.9;
}

.seo-btn {
  display: inline-block;
  padding: 1.3rem 3.5rem;
  font-family: var(--font-display);
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  border: 2px solid;
  border-radius: 0;
  transition: all 0.3s ease;
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.seo-btn--primary {
  color: var(--seo-neon-purple);
  border-color: var(--seo-neon-purple);
  background: rgba(139, 92, 246, 0.1);
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.3);
}

.seo-btn--primary::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--seo-neon-purple);
  transition: left 0.3s ease;
  z-index: -1;
}

.seo-btn--primary:hover {
  color: var(--seo-bg-dark);
  box-shadow: 0 0 40px rgba(139, 92, 246, 0.6);
  transform: translateY(-2px);
}

.seo-btn--primary:hover::before {
  left: 0;
}

/* ===== Animacja wyników wyszukiwania ===== */
.seo-section--search-animation {
  background: rgba(139, 92, 246, 0.03);
  padding: 4rem 2rem;
}

.seo-search-demo {
  max-width: 800px;
  margin: 0 auto;
}

.seo-search-bar-wrap {
  display: flex;
  align-items: center;
  background: rgba(139, 92, 246, 0.1);
  border: 2px solid rgba(139, 92, 246, 0.3);
  padding: 1rem 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 0 20px rgba(139, 92, 246, 0.2);
}

.seo-search-icon {
  font-size: 1.5rem;
  color: var(--seo-neon-purple);
  margin-right: 1rem;
  opacity: 0.8;
}

.seo-search-input-fake {
  flex: 1;
  display: flex;
  align-items: center;
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--seo-text-primary);
}

.seo-search-query {
  color: var(--seo-neon-purple);
  font-weight: 600;
  letter-spacing: 0.05em;
}

.seo-search-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--seo-neon-purple);
  margin-left: 2px;
  animation: seo-cursor-blink 1s infinite;
  box-shadow: 0 0 5px var(--seo-neon-purple);
}

@keyframes seo-cursor-blink {
  0%, 50% { opacity: 1; }
  51%, 100% { opacity: 0; }
}

.seo-search-results {
  position: relative;
  min-height: 400px;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.seo-search-row {
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  padding-left: 3.5rem;
  background: rgba(139, 92, 246, 0.05);
  border: 1px solid rgba(139, 92, 246, 0.2);
  transition: all 0.5s ease;
  position: relative;
  opacity: 0.6;
}

.seo-search-row--your-company {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.5);
  box-shadow: 0 0 30px rgba(139, 92, 246, 0.3);
  opacity: 1;
  z-index: 10;
}

.seo-search-row-number {
  position: absolute;
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--seo-neon-purple);
  width: 2rem;
  text-align: center;
}

.seo-search-row-title {
  font-family: var(--font-body);
  font-size: 1.1rem;
  color: var(--seo-text-primary);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.seo-search-row--your-company .seo-search-row-title {
  color: var(--seo-neon-purple);
  font-weight: 600;
  text-shadow: 0 0 10px rgba(139, 92, 246, 0.5);
}

.seo-search-row-url {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: rgba(0, 255, 136, 0.7);
  font-weight: 400;
}

.seo-search-row--your-company .seo-search-row-url {
  color: var(--seo-neon-magenta);
}

.seo-ad-badge {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--seo-neon-magenta);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.25rem 0.75rem;
  background: rgba(217, 70, 239, 0.1);
  border: 1px solid rgba(217, 70, 239, 0.3);
  margin-bottom: 0.5rem;
  box-shadow: 0 0 10px rgba(217, 70, 239, 0.3);
}

.seo-search-row--competitor {
  transform: translateY(0);
}

.seo-search-row--your-company.animate-up {
  animation: seo-slide-up 2s ease-out forwards;
}

@keyframes seo-slide-up {
  from {
    transform: translateY(400px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.seo-search-row--your-company.position-1 {
  order: -1;
}

.seo-search-row--your-company.position-2 {
  order: 0;
}

.seo-search-row--your-company.position-3 {
  order: 1;
}

.seo-search-row--competitor.position-1 {
  order: -1;
}

.seo-search-row--competitor.position-2 {
  order: 0;
}

.seo-search-row--competitor.position-3 {
  order: 1;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .seo-section {
    padding: 4rem 1.5rem;
  }
  
  .seo-section-badge {
    right: 1rem;
    top: 1.5rem;
    font-size: 0.75rem;
  }
  
  .seo-section-badge--hero {
    writing-mode: horizontal-tb;
    text-orientation: mixed;
    top: 1.5rem;
    transform: none;
  }
  
  .seo-spine {
    left: 0.75rem;
  }
  
  .seo-pillars {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .seo-hero {
    padding: 6rem 1.5rem 4rem;
  }
  
  .seo-search-demo {
    max-width: 100%;
  }
  
  .seo-search-row {
    padding-left: 2.5rem;
  }
  
  .seo-search-row-number {
    left: 0.5rem;
    font-size: 1.2rem;
  }
  
  .seo-search-results {
    min-height: 300px;
  }
}
