:root {
  color-scheme: dark;
  --bg-primary: #0a0a0f;
  --bg-secondary: #12121a;
  --bg-card: #16161f;
  --bg-nav: rgba(10, 10, 15, 0.8);
  --bg-nav-solid: rgba(10, 10, 15, 0.97);
  --bg-glass: rgba(255, 255, 255, 0.05);
  --border-soft: rgba(255, 255, 255, 0.1);
  --border-softer: rgba(255, 255, 255, 0.15);
  /* Colores de marca extraidos del logo de Codexa */
  --accent-primary: #00d4fc;
  --accent-secondary: #6d5bff;
  --accent-gradient: linear-gradient(135deg, #00d4fc 0%, #6d5bff 100%);
  --on-accent: #06121a;
  --text-primary: #f0f0f5;
  --text-secondary: #8f8fa8;
  --text-muted: #5f5f78;
  --border-color: #262636;
  --shadow-card: 0 20px 40px rgba(0, 0, 0, 0.35);
  --glow-cyan: 0 0 40px rgba(0, 212, 252, 0.3);
  --glow-purple: 0 0 40px rgba(109, 91, 255, 0.3);
  --grid-line: rgba(0, 212, 252, 0.035);
  --orb-opacity: 0.4;
}

[data-theme="light"] {
  color-scheme: light;
  --bg-primary: #f6f8fc;
  --bg-secondary: #eef2f9;
  --bg-card: #ffffff;
  --bg-nav: rgba(255, 255, 255, 0.82);
  --bg-nav-solid: rgba(255, 255, 255, 0.97);
  --bg-glass: rgba(15, 23, 42, 0.03);
  --border-soft: rgba(15, 23, 42, 0.08);
  --border-softer: rgba(15, 23, 42, 0.14);
  /* Mismos tonos del logo, oscurecidos para tener contraste en fondo claro */
  --accent-primary: #0284c7;
  --accent-secondary: #5b3df5;
  --accent-gradient: linear-gradient(135deg, #00b8f0 0%, #5b3df5 100%);
  --on-accent: #ffffff;
  --text-primary: #0d1526;
  --text-secondary: #4d5568;
  --text-muted: #6b7280;
  --border-color: #dde3ee;
  --shadow-card: 0 18px 40px rgba(15, 23, 42, 0.08);
  --glow-cyan: 0 12px 34px rgba(0, 184, 240, 0.28);
  --glow-purple: 0 12px 34px rgba(91, 61, 245, 0.22);
  --grid-line: rgba(15, 23, 42, 0.045);
  --orb-opacity: 0.25;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Outfit", sans-serif;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

/* Background Effects */
.bg-grid {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image:
    linear-gradient(var(--grid-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-line) 1px, transparent 1px);
  background-size: 60px 60px;
  pointer-events: none;
  z-index: 0;
}

.bg-gradient-orb {
  position: fixed;
  width: 600px;
  height: 600px;
  border-radius: 50%;
  filter: blur(120px);
  opacity: var(--orb-opacity);
  pointer-events: none;
  z-index: 0;
}

.orb-1 {
  top: -200px;
  right: -100px;
  background: var(--accent-secondary);
}

.orb-2 {
  bottom: -200px;
  left: -100px;
  background: var(--accent-primary);
  opacity: 0.2;
}

/* Navigation */
body > nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 1.5rem 2rem;
  backdrop-filter: blur(20px);
  background: var(--bg-nav);
  border-bottom: 1px solid var(--border-color);
  transition: background 0.3s ease;
}

body > nav.scrolled {
  background: var(--bg-nav-solid);
}

.nav-container {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo {
  font-family: "JetBrains Mono", monospace;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--text-primary);
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--accent-gradient);
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
}

.nav-links {
  display: flex;
  gap: 2.5rem;
  list-style: none;
}

.nav-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-weight: 400;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: var(--accent-primary);
}

.nav-cta {
  background: var(--accent-gradient);
  color: var(--on-accent);
  padding: 0.75rem 1.5rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.nav-cta:hover {
  transform: translateY(-2px);
  box-shadow: var(--glow-cyan);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  color: var(--text-primary);
  cursor: pointer;
  transition:
    color 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease,
    transform 0.3s ease;
}

.theme-toggle:hover {
  color: var(--accent-primary);
  border-color: var(--accent-primary);
  transform: translateY(-2px);
  box-shadow: var(--glow-cyan);
}

.theme-toggle svg {
  width: 20px;
  height: 20px;
}

.theme-toggle .icon-sun {
  display: none;
}

[data-theme="light"] .theme-toggle .icon-sun {
  display: block;
}

[data-theme="light"] .theme-toggle .icon-moon {
  display: none;
}

/* Hero Section */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 8rem 2rem 4rem;
  position: relative;
  z-index: 1;
}

.hero-content {
  max-width: 900px;
  width: 100%;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  padding: 0.5rem 1rem;
  border-radius: 50px;
  font-size: 0.85rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
  animation: fadeInUp 0.8s ease forwards;
}

.badge-dot {
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.5;
  }
}

.hero h1 {
  font-size: clamp(2.5rem, 6vw, 4.5rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease 0.1s forwards;
  opacity: 0;
}

.hero h1 .gradient-text {
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero p {
  font-size: 1.25rem;
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto 2.5rem;
  animation: fadeInUp 0.8s ease 0.2s forwards;
  opacity: 0;
}

.hero-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  animation: fadeInUp 0.8s ease 0.3s forwards;
  opacity: 0;
}

.btn-primary {
  background: var(--accent-gradient);
  color: var(--on-accent);
  padding: 1rem 2rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 600;
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: var(--glow-cyan);
}

.btn-secondary {
  background: transparent;
  color: var(--text-primary);
  padding: 1rem 2rem;
  border-radius: 10px;
  text-decoration: none;
  font-weight: 500;
  border: 1px solid var(--border-color);
  transition: all 0.3s ease;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.btn-secondary:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Tech Stack Strip */
.tech-strip {
  padding: 4rem 2rem;
  border-top: 1px solid var(--border-color);
  border-bottom: 1px solid var(--border-color);
  background: var(--bg-secondary);
  position: relative;
  z-index: 1;
}

.tech-strip h3 {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 2rem;
}

.tech-marquee {
  display: flex;
  align-items: center;
  overflow: hidden;
  position: relative;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 16%,
    #000 84%,
    transparent 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    #000 16%,
    #000 84%,
    transparent 100%
  );
}

.tech-logos {
  display: flex;
  align-items: center;
  gap: 4.5rem;
  /* El padding cierra el bucle: mantiene la misma separacion entre el
     ultimo logo de una copia y el primero de la siguiente */
  padding-right: 4.5rem;
  flex: 0 0 auto;
  width: max-content;
  animation: tech-marquee 45s linear infinite;
}

.tech-marquee:hover .tech-logos {
  animation-play-state: paused;
}

@keyframes tech-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .tech-logos {
    animation: none;
    flex-wrap: wrap;
    justify-content: center;
    width: auto;
    max-width: 1000px;
    margin: 0 auto;
    padding-right: 0;
  }

  .tech-logos[aria-hidden="true"] {
    display: none;
  }
}

.tech-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.9rem;
  opacity: 0.7;
  transition:
    opacity 0.3s ease,
    color 0.3s ease;
}

.tech-item:hover {
  opacity: 1;
  color: var(--accent-primary);
}

.tech-item svg {
  width: 26px;
  height: 26px;
}

/* Services Section */
.services {
  padding: 8rem 2rem;
  position: relative;
  z-index: 1;
}

.section-header {
  text-align: center;
  margin-bottom: 4rem;
}

.section-tag {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  color: var(--accent-primary);
  margin-bottom: 1rem;
  display: block;
}

.section-header h2 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

.section-header p {
  color: var(--text-secondary);
  max-width: 600px;
  margin: 0 auto;
}

.services-more {
  margin-top: 2.5rem;
}

.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.service-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2.5rem;
  transition: all 0.4s ease;
  position: relative;
  overflow: hidden;
}

.service-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--accent-gradient);
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

.service-card:hover {
  transform: translateY(-8px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-card);
}

.service-card:hover::before {
  transform: scaleX(1);
}

.service-icon {
  width: 56px;
  height: 56px;
  background: var(--bg-secondary);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1.5rem;
  font-size: 1.5rem;
}

.service-card h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
}

.service-card p {
  color: var(--text-secondary);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.service-features {
  list-style: none;
}

.service-features li {
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.service-features li::before {
  content: "→";
  color: var(--accent-primary);
}

/* Process Section */
.process {
  padding: 8rem 2rem;
  background: var(--bg-secondary);
  position: relative;
  z-index: 1;
}

.process-steps {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.process-step {
  text-align: center;
  padding: 2rem;
}

.step-number {
  font-family: "JetBrains Mono", monospace;
  font-size: 3rem;
  font-weight: 700;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 1rem;
}

.process-step h3 {
  font-size: 1.25rem;
  margin-bottom: 0.75rem;
}

.process-step p {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

/* Contact Section */
.contact {
  padding: 8rem 2rem;
  position: relative;
  z-index: 1;
}

.contact-container {
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

.contact-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 4rem;
  position: relative;
  overflow: hidden;
}

.contact-card::before {
  content: "";
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: radial-gradient(
    circle,
    rgba(0, 212, 255, 0.1) 0%,
    transparent 50%
  );
  animation: rotate 20s linear infinite;
}

@keyframes rotate {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}

.contact-content {
  position: relative;
  z-index: 1;
}

.contact h2 {
  font-size: 2.5rem;
  margin-bottom: 1rem;
}

.contact p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  font-size: 1.1rem;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 2rem;
}

.contact-item {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  color: var(--text-secondary);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.95rem;
  transition: color 0.3s ease;
}

.contact-item:hover {
  color: var(--accent-primary);
}

.contact-item svg {
  width: 20px;
  height: 20px;
  color: var(--accent-primary);
  flex-shrink: 0;
}

.contact-item a {
  color: inherit;
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-item a:hover {
  color: var(--accent-primary);
}

/* Contact Buttons */
.contact-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 2rem;
}

.btn-whatsapp {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1rem 2rem;
  background: linear-gradient(135deg, #25d366 0%, #128c7e 100%);
  color: white;
  text-decoration: none;
  border-radius: 10px;
  font-weight: 600;
  transition: all 0.3s ease;
  border: 2px solid transparent;
}

.btn-whatsapp:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(37, 211, 102, 0.3);
  border-color: rgba(255, 255, 255, 0.2);
}

.btn-whatsapp svg {
  width: 20px;
  height: 20px;
  transition: transform 0.3s ease;
}

.btn-whatsapp:hover svg {
  transform: scale(1.1);
}

.social-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin: 2rem 0;
}

.social-link {
  width: 48px;
  height: 48px;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  transition: all 0.3s ease;
  text-decoration: none;
}

.social-link:hover {
  background: var(--accent-gradient);
  color: var(--on-accent);
  border-color: transparent;
  transform: translateY(-3px);
  box-shadow: var(--glow-cyan);
}

.social-link svg {
  width: 24px;
  height: 24px;
}

/* Footer */
footer {
  padding: 3rem 2rem;
  border-top: 1px solid var(--border-color);
  position: relative;
  z-index: 1;
}

.footer-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}

.footer-copy {
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  gap: 2rem;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: var(--accent-primary);
}

/* Mobile Navigation */
.mobile-menu-btn {
  display: none;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1.5rem;
  cursor: pointer;
}

/* Scroll Animation */
.fade-in {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.fade-in.visible {
  opacity: 1;
  transform: translateY(0);
}

.logo-img {
  width: 40px;
  height: 40px;
  object-fit: contain;
}

.hero-logo-stage {
  display: block;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto 2.25rem;
  perspective: 1200px;
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

.hero-logo-wrap {
  display: block;
  transform-style: preserve-3d;
  will-change: transform;
  filter: drop-shadow(0 10px 22px rgba(0, 212, 252, 0.16));
  transition:
    transform 0.18s ease-out,
    filter 0.25s ease-out;
}

.hero-logo {
  display: block;
  height: 92px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
}

/* Variantes de logo: clara (letras de tinta) y oscura (letras blancas).
   Se suben de especificidad para que .footer-logo / .hero-logo no las pisen. */
.logo-light,
.footer-logo.logo-light,
.hero-logo.logo-light {
  display: none;
}

[data-theme="light"] .logo-light,
[data-theme="light"] .footer-logo.logo-light,
[data-theme="light"] .hero-logo.logo-light {
  display: block;
}

[data-theme="light"] .logo-dark,
[data-theme="light"] .footer-logo.logo-dark,
[data-theme="light"] .hero-logo.logo-dark {
  display: none;
}

.footer-logo {
  height: 40px;
  width: auto;
  max-width: 100%;
  object-fit: contain;
  display: block;
}

/* Logos monocromos del stack (GitHub, SQL Server) en modo claro */
[data-theme="light"] .logo-monochrome {
  fill: #1f2937;
}

/* Responsive */
/* Responsive */
@media (max-width: 768px) {
  .nav-cta {
    display: none;
  }

  .mobile-menu-btn {
    display: block;
    z-index: 1001;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-nav-solid);
    flex-direction: column;
    padding: 1.5rem;
    gap: 0;
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid var(--border-color);
    font-size: 1.1rem;
  }

  .nav-links a:hover {
    background: var(--bg-card);
  }

  .hero h1 {
    font-size: 2.5rem;
  }

  .hero-logo {
    height: 60px;
  }

  .hero-logo-stage {
    margin-bottom: 1.75rem;
  }

  .contact-card {
    padding: 2rem;
  }

  .contact-buttons {
    flex-direction: column;
  }

  .btn-primary,
  .btn-whatsapp {
    width: 100%;
    justify-content: center;
  }

  .tech-logos {
    gap: 3rem;
    padding-right: 3rem;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .social-links {
    flex-wrap: wrap;
  }
}

/* Projects Section */
.projects {
  padding: 6rem 2rem;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: 1100px;
  margin: 0 auto;
}

.project-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  overflow: hidden;
  transition:
    transform 0.4s ease,
    border-color 0.4s ease,
    box-shadow 0.4s ease;
}

.project-card:hover {
  transform: translateY(-6px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-card);
}

.project-banner {
  background: #000;
  padding: 2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 130px;
}

.project-banner img {
  max-height: 64px;
  object-fit: contain;
}

.project-body {
  padding: 1.5rem;
}

.project-body h3 {
  margin: 0 0 0.5rem;
  font-size: 1.1rem;
}

.project-body p {
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.6;
  margin-bottom: 1rem;
}

.project-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1rem;
}

.project-tags .tag {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-softer);
  color: var(--text-muted);
}

.project-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 12px;
  border-radius: 8px;
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
}

.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.project-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border-color);
}

.project-actions {
  display: flex;
  gap: 0.5rem;
}

/* ============================ PAGINAS INTERNAS ============================ */
.nav-links a.active {
  color: var(--accent-primary);
}

/* Hero de pagina interna */
.page-hero {
  padding: 9rem 2rem 4rem;
  position: relative;
  z-index: 1;
  text-align: center;
}

.page-hero-inner {
  max-width: 860px;
  margin: 0 auto;
}

.page-hero h1 {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 700;
  line-height: 1.1;
  margin-bottom: 1.25rem;
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

.page-hero p {
  font-size: 1.15rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 2rem;
  animation: fadeInUp 0.8s 0.1s ease forwards;
  opacity: 0;
}

.page-hero .hero-buttons {
  animation: fadeInUp 0.8s 0.2s ease forwards;
  opacity: 0;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  font-family: "JetBrains Mono", monospace;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  animation: fadeInUp 0.8s ease forwards;
  opacity: 0;
}

.breadcrumb a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.breadcrumb a:hover {
  color: var(--accent-primary);
}

.breadcrumb .current {
  color: var(--accent-primary);
}

/* Secciones de detalle */
.detail-section {
  padding: 5rem 2rem;
  position: relative;
  z-index: 1;
}

.detail-section.alt {
  background: var(--bg-secondary);
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.75rem;
  max-width: 1200px;
  margin: 0 auto;
}

.detail-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 16px;
  padding: 2rem;
}

.detail-card h3 {
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--border-color);
}

.related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  max-width: 900px;
  margin: 0 auto;
}

.related-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 0.9rem 1.35rem;
  color: var(--text-primary);
  text-decoration: none;
  font-size: 0.95rem;
  transition: all 0.3s ease;
}

.related-links a:hover {
  border-color: var(--accent-primary);
  color: var(--accent-primary);
  transform: translateY(-3px);
  box-shadow: var(--glow-cyan);
}

/* Bloque CTA */
.cta-band {
  padding: 5rem 2rem;
  position: relative;
  z-index: 1;
}

.cta-box {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 24px;
  padding: 3.5rem 2.5rem;
  position: relative;
  overflow: hidden;
}

.cta-box::before {
  content: "";
  position: absolute;
  top: -60%;
  left: -20%;
  width: 140%;
  height: 160%;
  background: radial-gradient(
    circle,
    rgba(0, 212, 252, 0.12) 0%,
    transparent 55%
  );
  pointer-events: none;
}

.cta-box h2 {
  font-size: clamp(1.6rem, 3.4vw, 2.4rem);
  margin-bottom: 0.75rem;
  position: relative;
}

.cta-box p {
  color: var(--text-secondary);
  margin-bottom: 2rem;
  position: relative;
}

.cta-buttons {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* Tarjetas de servicio enlazables */
.service-card {
  display: flex;
  flex-direction: column;
}

.service-card-link {
  text-decoration: none;
  color: inherit;
}

.service-card-link:hover {
  transform: translateY(-8px);
  border-color: var(--accent-primary);
  box-shadow: var(--shadow-card);
}

.card-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 1.25rem;
  color: var(--accent-primary);
  font-weight: 600;
  font-size: 0.9rem;
  transition: gap 0.3s ease;
}

.service-card-link:hover .card-link {
  gap: 0.85rem;
}

/* Pagina de contacto */
.contact-page {
  padding: 3rem 2rem 8rem;
  position: relative;
  z-index: 1;
}

.contact-page-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: 1.75rem;
  max-width: 1100px;
  margin: 0 auto;
  align-items: start;
}

.contact-form-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.5rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.form-field > span {
  font-size: 0.85rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 10px;
  padding: 0.85rem 1rem;
  color: var(--text-primary);
  font-family: inherit;
  font-size: 0.95rem;
  transition:
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.form-field textarea {
  resize: vertical;
  min-height: 120px;
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--accent-primary);
  box-shadow: 0 0 0 3px rgba(0, 212, 252, 0.15);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
  color: var(--text-muted);
}

.form-note {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 1.5rem;
}

.form-note strong {
  color: var(--text-secondary);
}

.form-actions {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.contact-side {
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 20px;
  padding: 2.25rem;
}

.contact-side h3 {
  font-size: 1.1rem;
  margin-bottom: 1.5rem;
}

.contact-list {
  list-style: none;
  margin-bottom: 1.75rem;
}

.contact-list li {
  padding: 0.9rem 0;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.contact-list-label {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.contact-list a {
  color: var(--text-primary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.contact-list a:hover {
  color: var(--accent-primary);
}

.contact-side-note {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 1.5rem;
}

.contact-side-note h4 {
  margin-bottom: 0.5rem;
  font-size: 1rem;
}

.contact-side-note p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

.error-hero {
  min-height: 70vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 900px) {
  .contact-page-grid {
    grid-template-columns: 1fr;
  }

  .form-row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

/* ============================ FAQ / CIUDADES / NAP ============================ */

.faq-list {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.faq-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 14px;
  padding: 0 1.5rem;
  transition: border-color 0.3s ease;
}

.faq-item[open] {
  border-color: var(--accent-primary);
}

.faq-item summary {
  cursor: pointer;
  list-style: none;
  padding: 1.15rem 0;
  font-weight: 600;
  font-size: 1rem;
  position: relative;
  padding-right: 2rem;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  color: var(--accent-primary);
  font-size: 1.35rem;
  font-weight: 400;
  line-height: 1;
  transition: transform 0.3s ease;
}

.faq-item[open] summary::after {
  content: "\2212";
}

.faq-item p {
  color: var(--text-secondary);
  padding-bottom: 1.35rem;
  font-size: 0.95rem;
}

.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
}

.city-item {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.15rem 1.35rem;
  transition:
    border-color 0.3s ease,
    transform 0.3s ease;
}

.city-item:hover {
  border-color: var(--accent-primary);
  transform: translateY(-3px);
}

.city-item h3 {
  font-size: 1rem;
  margin-bottom: 0.2rem;
}

.city-item span {
  font-family: "JetBrains Mono", monospace;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: var(--text-muted);
}

.footer-nap {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.75rem;
}

.footer-nap a {
  color: var(--text-secondary);
  text-decoration: none;
  transition: color 0.3s ease;
}

.footer-nap a:hover {
  color: var(--accent-primary);
}
/* ============================ UBICACION / MAPA ============================ */

.footer-locate {
  font-size: 0.8rem;
  margin-top: 0.35rem;
}

.footer-locate a {
  color: var(--accent-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s ease;
}

.footer-locate a:hover {
  border-color: var(--accent-primary);
}

.locate-section {
  padding-top: 3rem;
}

.locate-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr;
  gap: 1.75rem;
  max-width: 1100px;
  margin: 0 auto;
  align-items: stretch;
}

.map-embed {
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: var(--bg-card);
  min-height: 340px;
}

.map-embed iframe {
  width: 100%;
  height: 100%;
  min-height: 340px;
  border: 0;
  display: block;
  filter: grayscale(0.15);
}

[data-theme="light"] .map-embed iframe {
  filter: grayscale(0);
}

.locate-info {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 18px;
  padding: 2rem;
}

.locate-info h3 {
  font-size: 1.2rem;
  margin-bottom: 0.35rem;
}

.locate-city {
  color: var(--accent-primary);
  font-family: "JetBrains Mono", monospace;
  font-size: 0.85rem;
  margin-bottom: 1.25rem;
}

.locate-info .contact-list {
  margin-bottom: 1.5rem;
}

.locate-info .cta-buttons {
  justify-content: flex-start;
}

@media (max-width: 900px) {
  .locate-grid {
    grid-template-columns: 1fr;
  }
}