/* Animación de entrada para la tarjeta de promoción de descarga */
.download-card {
  animation: fadeInUpCard 1s cubic-bezier(0.23, 1, 0.32, 1);
}

@keyframes fadeInUpCard {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

.download-card .glass-card {
  transition: box-shadow 0.3s cubic-bezier(0.23, 1, 0.32, 1),
    transform 0.3s cubic-bezier(0.23, 1, 0.32, 1);
}
.download-card .glass-card:hover {
  box-shadow: 0 8px 32px rgba(6, 196, 255, 0.25), 0 2px 8px #0002;
  transform: translateY(-6px) scale(1.025);
}
.hero-title {
  text-align: center;
  margin-bottom: 1.2rem;
  font-size: 2.5rem;
  font-weight: 800;
}

.hero-subtitle {
  text-align: center;
  margin-top: 0;
  margin-bottom: 0;
  color: var(--text-muted);
  font-size: 1.3rem;
  font-weight: 500;
}

/* HERO SECTION: Centrado cross-browser */
.hero-section {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-bg {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: 1;
}

.hero-content {
  width: 100%;
  max-width: 700px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  z-index: 2;
  padding: 2rem 1rem;
  box-sizing: border-box;
}

.hero-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  width: 100%;
  z-index: 2;
}

.hero-title {
  text-align: center;
  margin-bottom: 0.5rem;
  font-size: 2.5rem;
  font-weight: 800;
}

.hero-subtitle {
  text-align: center;
  margin-bottom: 1.2rem;
  color: var(--text-muted);
  font-size: 1.3rem;
  font-weight: 500;
}
/* ====== CEPALABS DESIGN SYSTEM 2025 - MODERNIZADO ====== */

:root {
  /* Colores Principales */
  --primary-color: #0b1220;
  --secondary-color: #151b2c;
  --accent-color: #06c4ff;
  --accent-secondary: #7c3aed;
  --accent-tertiary: #ec4899;

  /* Estados */
  --success-color: #10b981;
  --warning-color: #f59e0b;
  --error-color: #ef4444;

  /* Texto */
  --text-light: #eef2ff;
  --text-muted: #99a3b7;
  --text-dark: #0b1220;

  /* Efectos de Fondo */
  --bg-gradient: radial-gradient(1200px 600px at 10% -10%, #0b1220 0%, #0b1220 30%, #101a2d 60%, #0e1630 100%);
  --glass-bg: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);

  /* Radios y Sombras */
  --border-radius: 14px;
  --border-radius-sm: 10px;
  --border-radius-lg: 22px;
  --shadow-sm: 0 1px 8px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 6px 20px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 12px 36px rgba(0, 0, 0, 0.45);
  --shadow-glow: 0 0 28px rgba(6, 196, 255, 0.35);

  /* Transiciones */
  --transition-base: all 0.28s cubic-bezier(0.2, 0.6, 0.2, 1);
  --transition-slow: all 0.5s cubic-bezier(0.2, 0.6, 0.2, 1);
  --transition-bounce: all 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);

  /* Responsive */
  --spacing-xs: 0.5rem;
  --spacing-sm: 1rem;
  --spacing-md: 1.5rem;
  --spacing-lg: 2rem;
  --spacing-xl: 3rem;
  /* Alturas del toolbar/header para evitar solapamiento */
  --topbar-height: 36px;
  --header-height: 76px;
}

/* ====== Reset y Base ====== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
  overscroll-behavior: none;
}

body {
  font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', sans-serif;
  background: var(--bg-gradient);
  color: var(--text-light);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

/* ====== Efectos de Fondo ====== */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(600px 220px at 80% 20%, rgba(124, 58, 237, 0.15) 0%, transparent 70%),
    radial-gradient(500px 240px at 20% 90%, rgba(6, 196, 255, 0.13) 0%, transparent 70%),
    radial-gradient(800px 300px at -10% -20%, rgba(236, 72, 153, 0.08) 0%, transparent 70%);
  opacity: 0.85;
}

/* Contenedor */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--spacing-md);
  width: 100%;
}

/* Accesibilidad */
.skip-to-content {
  position: absolute;
  top: -60px;
  left: 20px;
  z-index: 10000;
  background: var(--accent-color);
  color: var(--text-dark);
  padding: 10px 18px;
  border-radius: 8px;
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: var(--transition-base);
  font-weight: 600;
}

.skip-to-content:focus,
.skip-to-content:active {
  top: 16px;
}

/* Topbar */
/* Fijar la barra superior */
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 1000;
  border-bottom: 1px solid var(--glass-border);
  /* Use a solid background to ensure the toolbar is not transparent */
  background: var(--primary-color);
  height: var(--topbar-height);
  display: flex;
  align-items: center;
}

.topbar .container {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 100%;
  font-size: 12px;
  color: var(--text-muted);
}

.topbar-pill {
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(6, 196, 255, 0.12);
  color: #a9eaff;
  font-weight: 700;
  letter-spacing: 0.3px;
}

.topbar-dot {
  width: 4px;
  height: 4px;
  background: var(--text-muted);
  border-radius: 50%;
  display: inline-block;
  opacity: 0.5;
}

/* ====== Header / Navbar ====== */

.site-header {
  /* Fijar el header debajo de la topbar */
  position: fixed;
  top: var(--topbar-height);
  left: 0;
  width: 100%;
  z-index: 999;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  /* Use a solid background to avoid underlying content showing through */
  background: var(--primary-color);
  border-bottom: 1px solid var(--glass-border);
  transition: var(--transition-base);
  height: var(--header-height);
}

/* Ajustar el padding del body para que el contenido no quede oculto
   Se añade env(safe-area-inset-top) para dispositivos con notch */
body {
  padding-top: calc(var(--topbar-height) + var(--header-height) + env(safe-area-inset-top, 0px));
}

.site-header.scrolled {
  box-shadow: var(--shadow-md);
  background: rgba(11, 18, 32, 0.85);
}

.header-container {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 18px;
  height: var(--header-height);
}

.logo-section {
  display: flex;
  align-items: center;
  min-width: 0;
}

.logo-link {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  transition: var(--transition-base);
}

.header-logo {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid rgba(6, 196, 255, 0.25);
  box-shadow: 0 6px 18px rgba(6, 196, 255, 0.18);
  transition: var(--transition-bounce);
  flex-shrink: 0;
}

/* Ensure header logo has a white background for visibility */
.header-logo {
  background: #ffffff;
  padding: 4px;
  object-fit: contain;
}

.logo-link:hover .header-logo {
  transform: scale(1.06) rotate(-3deg);
}

.brand-text {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.brand-name {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: -0.3px;
  background: linear-gradient(120deg, #e6f6ff, #7cdfff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1;
}

.brand-tagline {
  font-size: 0.7rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 1.2px;
  white-space: nowrap;
}

.main-nav {
  display: flex;
  justify-content: center;
}

.nav-list {
  list-style: none;
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
}

.nav-item {
  display: flex;
}

.nav-link {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-light);
  font-weight: 700;
  font-size: 0.95rem;
  transition: var(--transition-base);
  white-space: nowrap;
}

.nav-link i {
  opacity: 0.85;
  font-size: 0.95rem;
  transition: var(--transition-base);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav-link:hover {
  color: #b8ecff;
  transform: translateY(-2px);
}

.nav-link:hover i {
  transform: translateY(-1px) scale(1.05);
  opacity: 1;
}

.nav-link.active {
  background: linear-gradient(120deg, rgba(6, 196, 255, 0.16), rgba(124, 58, 237, 0.16));
  color: #b8ecff;
  box-shadow: inset 0 0 0 1px rgba(6, 196, 255, 0.18);
}

/* Menú desplegable */
.nav-item.dropdown {
  position: relative;
}

.dropdown-trigger {
  background: none;
  border: none;
  cursor: pointer;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-light);
  font-weight: 700;
  font-size: 0.95rem;
  transition: var(--transition-base);
  white-space: nowrap;
}

.dropdown-trigger:hover {
  color: #b8ecff;
  transform: translateY(-2px);
}

.dropdown-trigger:hover i:first-child {
  transform: translateY(-1px) scale(1.05);
  opacity: 1;
}

.dropdown-trigger .fa-chevron-down {
  font-size: 0.75rem;
  transition: transform 0.3s ease;
}

.dropdown-trigger[aria-expanded="true"] .fa-chevron-down {
  transform: rotate(180deg);
}

.dropdown-menu {
  list-style: none;
  position: absolute;
  top: 100%;
  left: 0;
  margin-top: 8px;
  padding: 8px;
  background: linear-gradient(135deg, rgba(35, 43, 58, 0.95), rgba(26, 31, 46, 0.95));
  border: 1px solid var(--glass-border);
  border-radius: 12px;
  min-width: 220px;
  display: none;
  flex-direction: column;
  gap: 4px;
  z-index: 1000;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
}

.dropdown-menu.show {
  display: flex;
}

.dropdown-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 8px;
  text-decoration: none;
  color: var(--text-light);
  font-weight: 600;
  font-size: 0.95rem;
  transition: var(--transition-base);
  border-left: 3px solid transparent;
}

.dropdown-link i {
  opacity: 0.85;
  font-size: 1rem;
  transition: var(--transition-base);
}

.dropdown-link small {
  font-size: 0.8rem;
  opacity: 0.7;
  font-weight: 400;
  transition: var(--transition-base);
}

.dropdown-link:hover {
  background: rgba(107, 114, 128, 0.1);
  border-left-color: #06c4ff;
  color: #b8ecff;
}

.dropdown-link:hover i {
  opacity: 1;
  transform: translateX(2px);
}

.dropdown-link:hover small {
  opacity: 0.9;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* Social */
.social-links {
  display: flex;
  gap: 8px;
}

.social-link {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  text-decoration: none;
  color: var(--text-light);
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  transition: var(--transition-bounce);
  flex-shrink: 0;
}

.social-link i {
  font-size: 1rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.social-link:hover {
  transform: translateY(-3px);
  background: rgba(6, 196, 255, 0.12);
  border-color: rgba(6, 196, 255, 0.35);
  box-shadow: var(--shadow-glow);
  color: var(--text-dark);
}

/* Mobile toggle */
.mobile-menu-toggle {
  display: none;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  padding: 7px;
  cursor: pointer;
  transition: var(--transition-base);
  flex-shrink: 0;
  flex-direction: column;
  justify-content: center;
}

.mobile-menu-toggle:hover {
  background: rgba(6, 196, 255, 0.12);
  border-color: rgba(6, 196, 255, 0.3);
}

.hamburger-line {
  width: 100%;
  height: 2.5px;
  background: #a9eaff;
  border-radius: 2px;
  transition: var(--transition-bounce);
  box-shadow: 0 0 8px rgba(6, 196, 255, 0.28);
  display: block;
}

.hamburger-line + .hamburger-line {
  margin-top: 4px;
}

.mobile-menu-toggle[aria-expanded='true'] .hamburger-line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-toggle[aria-expanded='true'] .hamburger-line:nth-child(2) {
  opacity: 0;
  transform: translateX(-30px);
}

.mobile-menu-toggle[aria-expanded='true'] .hamburger-line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* Main */
.page-content {
  flex: 1;
  position: relative;
  z-index: 1;
}

main.page-content {
  max-width: 1200px;
  width: calc(100% - 40px);
  margin: 20px auto;
  padding: 28px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-md);
}

/* ===== Inner scroll mode (opt-in) =====
   Prevent mobile browsers from auto-hiding the chrome by
   making the document non-scrollable and scrolling inside
   `main.page-content`. Enabled when `body.use-inner-scroll` is set. */
// ...existing code...
  scroll-behavior: smooth;
}

/* Ensure to not break focus outline when using inner scroll */
body.use-inner-scroll :focus {
  outline-offset: 2px;
}

main.page-content::before {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: 18px;
  background: radial-gradient(400px 200px at 100% 0%, rgba(6, 196, 255, 0.08), transparent 70%);
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--glass-border);
  background: rgba(255, 255, 255, 0.02);
  margin-top: 24px;
}

.footer-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px 0;
  flex-wrap: wrap;
}

.logo-footer {
  width: 60px;
  height: 60px;
  border-radius: 14px;
  border: 1px solid rgba(6, 196, 255, 0.25);
  box-shadow: 0 8px 22px rgba(6, 196, 255, 0.18);
  flex-shrink: 0;
}

/* Footer logo white background */
.logo-footer {
  background: #ffffff;
  padding: 6px;
  object-fit: contain;
}

.footer-text p {
  margin: 2px 0;
  color: var(--text-light);
}

.footer-version {
  color: #a9eaff;
  font-weight: 700;
  font-size: 12px;
  letter-spacing: 0.4px;
}

.footer-links {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

/* Footer layout adjustments for mobile: reorder and center items */
@media (max-width: 900px) {
  .footer-container {
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 16px 0;
    text-align: center;
  }

  .footer-brand {
    order: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
  }

  .footer-links {
    order: 2;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .footer-links a {
    display: inline-block;
    width: auto;
    padding: 6px 10px;
    border-radius: 8px;
    background: transparent;
  }

  .footer-meta {
    order: 3;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
  }

  .footer-text p {
    margin: 4px 0;
  }
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 700;
  letter-spacing: 0.2px;
  position: relative;
  transition: var(--transition-base);
}

.footer-links a::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -3px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--accent-color), var(--accent-secondary));
  transition: width 0.25s ease;
}

.footer-links a:hover {
  color: #b8ecff;
}

.footer-links a:hover::after {
  width: 100%;
}

/* Utilidades */
.loading {
  width: 22px;
  height: 22px;
  border: 3px solid rgba(6, 196, 255, 0.25);
  border-top-color: var(--accent-color);
  border-radius: 999px;
  animation: spin 0.8s linear infinite;
  display: inline-block;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.toast {
  position: fixed;
  top: calc(var(--topbar-height) + var(--header-height) + 14px);
  right: 20px;
  background: rgba(18, 25, 41, 0.9);
  border: 1px solid var(--glass-border);
  color: var(--text-light);
  padding: 14px 18px;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  z-index: 10000;
  transform: translateX(420px);
  transition: transform 0.4s cubic-bezier(0.68, -0.55, 0.27, 1.55);
  min-width: 280px;
}

.toast.show {
  transform: translateX(0);
}

.toast.success {
  border-left: 4px solid var(--success-color);
  box-shadow: 0 8px 28px rgba(16, 185, 129, 0.28);
}

.toast.error {
  border-left: 4px solid var(--error-color);
  box-shadow: 0 8px 28px rgba(239, 68, 68, 0.28);
}

.toast.warning {
  border-left: 4px solid var(--warning-color);
  box-shadow: 0 8px 28px rgba(245, 158, 11, 0.28);
}

.scroll-to-top {
  position: fixed;
  bottom: 26px;
  right: 26px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  background: linear-gradient(120deg, var(--accent-color), var(--accent-secondary));
  color: var(--text-dark);
  border: 0;
  box-shadow: 0 8px 20px rgba(6, 196, 255, 0.35);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: var(--transition-bounce);
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
}

.scroll-to-top.visible {
  opacity: 1;
  visibility: visible;
}

.scroll-to-top:hover {
  transform: translateY(-4px) scale(1.06);
}

/* Animaciones */
@keyframes slideInDown {
  from {
    opacity: 0;
    transform: translateY(-24px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Centrado y alineación hero-section */
.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.hero-title {
  text-align: center;
  margin-bottom: 0.5rem;
}

.hero-subtitle {
  text-align: center;
  margin-bottom: 1.2rem;
  color: var(--text-muted);
}

.hero-cta {
  display: flex;
  gap: 1rem;
  justify-content: center;
  margin-bottom: 1.5rem;
}

/* Centrado de la cabecera de servicios */
.services-section .section-header.centered {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

@media (prefers-reduced-motion: no-preference) {
  header {
    animation: slideInDown 0.5s ease-out;
  }
  main {
    animation: fadeIn 0.6s ease-out;
  }
}

/* ====== Responsive ====== */

/* Tablet */
@media (max-width: 1024px) {
  :root {
    --spacing-md: 1.25rem;
    --header-height: 70px;
  }

  .header-container {
    gap: 14px;
  }

  .nav-link {
    padding: 9px 12px;
    font-size: 0.9rem;
  }

  main.page-content {
    width: calc(100% - 32px);
    padding: 24px;
  }

  .container {
    padding: 0 1.25rem;
  }
}

/* Tablet pequeño y móvil */
@media (max-width: 900px) {
  :root {
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --header-height: 64px;
  }

  .header-container {
    grid-template-columns: auto 1fr auto;
  }

  .brand-name {
    font-size: 1.2rem;
  }

  .brand-tagline {
    font-size: 0.65rem;
  }

  .main-nav {
    display: none;
    position: fixed;
    top: calc(var(--topbar-height) + var(--header-height));
    left: 0;
    right: 0;
    padding: 18px;
    background: rgba(11, 18, 32, 0.96);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    animation: slideInDown 0.3s ease-out;
  }

  .main-nav.is-active {
    display: flex;
  }

  .nav-list {
    flex-direction: column;
    gap: 10px;
    width: 100%;
    background: transparent;
    border: 0;
    padding: 0;
  }

  .dropdown-menu {
    position: static;
    top: 0;
    left: 0;
    margin-top: 0;
    margin-left: 14px;
    min-width: auto;
    background: transparent;
    border: none;
    box-shadow: none;
    backdrop-filter: none;
    padding: 0;
    display: none;
  }

  .dropdown-menu.show {
    display: flex;
  }

  .nav-link {
    width: 100%;
    justify-content: flex-start;
    padding: 12px 14px;
  }

  .mobile-menu-toggle {
    display: flex;
  }

  /* Keep topbar visible on small screens to remain fixed at top */

  .container {
    padding: 0 1rem;
  }

  main.page-content {
    width: calc(100% - 24px);
    padding: 20px;
    margin: 16px auto;
    border-radius: 14px;
  }

  .header-logo {
    width: 40px;
    height: 40px;
  }

  .social-links {
    gap: 6px;
  }

  .social-link {
    width: 36px;
    height: 36px;
  }
}

/* Móvil */
@media (max-width: 640px) {
  :root {
    --header-height: 60px;
  }

  .header-container {
    gap: 10px;
  }

  .logo-section {
    flex: 0 0 auto;
  }

  .brand-name {
    font-size: 1rem;
  }

  .brand-tagline {
    display: none;
  }

  main.page-content {
    width: calc(100% - 20px);
    padding: 16px;
    margin: 12px auto;
  }

  .header-logo {
    width: 36px;
    height: 36px;
  }

  .footer-container {
    flex-direction: column;
    gap: 12px;
    padding: 16px 0;
  }

  .footer-links {
    flex-direction: column;
    gap: 12px;
    width: 100%;
  }

  .scroll-to-top {
    bottom: 16px;
    right: 16px;
    width: 44px;
    height: 44px;
  }
}

/* Extra pequeño */
@media (max-width: 480px) {
  :root {
    --spacing-sm: 0.75rem;
  }

  .container {
    padding: 0 0.75rem;
  }

  main.page-content {
    width: calc(100% - 16px);
    padding: 12px;
    margin: 8px auto;
  }

  .header-logo {
    width: 32px;
    height: 32px;
  }

  .social-links {
    gap: 4px;
  }

  .social-link {
    width: 32px;
    height: 32px;
    font-size: 0.85rem;
  }

  .social-link i {
    font-size: 0.9rem;
  }
}

/* Print */
@media print {
  .topbar,
  .site-header,
  .site-footer,
  .mobile-menu-toggle,
  .scroll-to-top {
    display: none !important;
  }

  body::before {
    display: none !important;
  }
}

/* Preferencias del usuario */
@media (prefers-color-scheme: dark) {
  body {
    color-scheme: dark;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
  }
}

/* Focus visible para accesibilidad */
:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
  border-radius: 4px;
}

button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--accent-color);
  outline-offset: 2px;
}

/* SVG Icons fallback */
.icon-svg {
  display: inline-block;
  width: 1em;
  height: 1em;
  stroke-width: 0;
  stroke: currentColor;
  fill: currentColor;
}

/* Font Awesome Fixes */
.fa,
.fas,
.fab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-feature-settings: 'cv14' on;
}
