/* ========================================================
   TEMA CLARO / OSCURO — variables semánticas
   ========================================================
   El sitio define sus colores con clases de Tailwind inline
   (bg-[#0b0c10], text-white, border-white/10...).
   Para que el cambio de tema afecte a TODA la página sin
   reescribir cada clase, estas reglas sobrescriben los colores
   "de superficie" mediante utilidades CSS propias, que tienen
   mayor especificidad que las clases arbitrarias de Tailwind.
   ======================================================== */

/* ---------- Utilidades de superficie (tema oscuro = base) ---------- */
:root {
    --t-bg:            var(--bg-dark, #0b0c10);
    --t-surface:       var(--card-bg, #14161e);
    --t-surface-2:     var(--secondary-color, #0d0e14);
    --t-surface-3:     #1a1d27;
    --t-text:          #ffffff;
    --t-text-muted:    #9ca3af;
    --t-text-soft:     #6b7280;
    --t-border:        rgba(255, 255, 255, 0.10);
    --t-border-strong: rgba(255, 255, 255, 0.18);
    --t-hover:         rgba(255, 255, 255, 0.05);
    --t-shadow:        0 25px 50px -12px rgba(0, 0, 0, 0.7);
}

/* ---------- Tema claro ---------- */
html[data-theme="light"] {
    --t-bg:            var(--bg-light, #f6f7f9);
    --t-surface:       var(--card-bg-light, #ffffff);
    --t-surface-2:     #eef0f4;
    --t-surface-3:     #e4e7ee;
    --t-text:          #11131a;
    --t-text-muted:    #4b5563;
    --t-text-soft:     #6b7280;
    --t-border:        rgba(17, 19, 26, 0.12);
    --t-border-strong: rgba(17, 19, 26, 0.22);
    --t-hover:         rgba(17, 19, 26, 0.05);
    --t-shadow:        0 20px 45px -18px rgba(17, 19, 26, 0.35);
}

/* ---------- Reset de fondo del body ---------- */
html[data-theme="light"] body,
body.theme-light {
    background-color: var(--t-bg) !important;
    color: var(--t-text) !important;
}

/* ========================================================
   MAPEO DE CLASES ARBITRARIAS DE TAILWIND
   Estas utilidades replican las clases usadas en el HTML,
   de modo que el tema claro las repinta.
   ======================================================== */

/* Fondos */
html[data-theme="light"] .bg-\[\#0b0c10\],
html[data-theme="light"] .bg-\[\#14161e\],
html[data-theme="light"] .bg-\[\#0d0e14\],
html[data-theme="light"] .bg-\[\#1a1d27\] {
    background-color: var(--t-surface) !important;
}

html[data-theme="light"] .bg-\[\#0d0e14\]\/50,
html[data-theme="light"] .bg-\[\#0d0e14\]\/60 {
    background-color: var(--t-surface-2) !important;
}

/* El pie de página es negro por diseño: en claro pasa a superficie clara
   para que el texto (que sí se invierte) siga siendo legible. */
html[data-theme="light"] footer.bg-black {
    background-color: var(--t-surface-2) !important;
}

html[data-theme="light"] .bg-black\/90,
html[data-theme="light"] .bg-black\/80,
html[data-theme="light"] .bg-black\/70 {
    background-color: rgba(255, 255, 255, 0.92) !important;
}

html[data-theme="light"] .bg-black\/40,
html[data-theme="light"] .bg-black\/60,
html[data-theme="light"] .bg-black\/30 {
    background-color: var(--t-surface-2) !important;
}

html[data-theme="light"] .bg-white\/5,
html[data-theme="light"] .bg-white\/10,
html[data-theme="light"] .bg-white\/\[0\.03\] {
    background-color: var(--t-hover) !important;
}

/* Degradados de marca se conservan en modo claro */

/* Textos */
html[data-theme="light"] .text-white { color: var(--t-text) !important; }
html[data-theme="light"] .text-gray-300 { color: #374151 !important; }
html[data-theme="light"] .text-gray-400 { color: var(--t-text-muted) !important; }
html[data-theme="light"] .text-gray-500 { color: var(--t-text-soft) !important; }
html[data-theme="light"] .text-gray-600 { color: #9ca3af !important; }

html[data-theme="light"] .placeholder-gray-500::placeholder { color: #6b7280 !important; }

/* Bordes */
html[data-theme="light"] .border-white\/5,
html[data-theme="light"] .border-white\/10,
html[data-theme="light"] .border-white\/20,
html[data-theme="light"] .border-white\/\[0\.12\] {
    border-color: var(--t-border) !important;
}

html[data-theme="light"] .border-gray-800,
html[data-theme="light"] .border-gray-800\/80,
html[data-theme="light"] .border-gray-700 {
    border-color: var(--t-border-strong) !important;
}

html[data-theme="light"] .divide-white\/10 > *,
html[data-theme="light"] .divide-y > * {
    border-color: var(--t-border) !important;
}

/* Fondos transparentes de inputs */
html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
    color: var(--t-text);
}

html[data-theme="light"] input::placeholder,
html[data-theme="light"] textarea::placeholder {
    color: #9ca3af;
}

/* Tarjetas de cristal */
html[data-theme="light"] .glass-card {
    background: rgba(255, 255, 255, 0.75) !important;
    border-color: var(--t-border) !important;
    backdrop-filter: blur(14px);
}

html[data-theme="light"] .as-sec-btn {
    border-color: var(--t-border-strong) !important;
    color: var(--t-text) !important;
}

html[data-theme="light"] .as-accordion-item,
html[data-theme="light"] .as-accordion-trigger {
    border-color: transparent;
}

/* Sombras */
html[data-theme="light"] .shadow-2xl,
html[data-theme="light"] .shadow-xl {
    box-shadow: var(--t-shadow) !important;
}

/* Cursor personalizado y seguidor activo para MODO CLARO */
html[data-theme="light"] .custom-cursor {
    display: block !important;
    background-color: var(--c-primary, #fd3f00) !important;
    box-shadow: 0 0 12px rgba(253, 63, 0, 0.5) !important;
}

html[data-theme="light"] .custom-cursor-follower {
    display: block !important;
    border-color: rgba(253, 63, 0, 0.45) !important;
    background-color: rgba(253, 63, 0, 0.05) !important;
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    box-shadow: 0 4px 18px -2px rgba(253, 63, 0, 0.22) !important;
}

html[data-theme="light"] .custom-cursor.active {
    background-color: #0f172a !important;
    mix-blend-mode: normal !important;
    box-shadow: 0 0 16px rgba(15, 23, 42, 0.3) !important;
}

html[data-theme="light"] .custom-cursor-follower.active {
    border-color: var(--c-primary, #fd3f00) !important;
    background-color: rgba(253, 63, 0, 0.14) !important;
}

/* Efecto Halo Luminoso que persigue al ratón en MODO CLARO (Colores configurables desde Admin) */
.light-cursor-aura {
    position: fixed;
    top: 0;
    left: 0;
    width: 460px;
    height: 460px;
    border-radius: 50%;
    pointer-events: none;
    z-index: 2;
    opacity: 0;
    background: radial-gradient(circle 230px at center, color-mix(in srgb, var(--effect-mouse-color, #fd3f00) 14%, transparent), color-mix(in srgb, var(--effect-mouse-secondary, #7a5af8) 6%, transparent) 55%, transparent 72%);
    transform: translate3d(-50%, -50%, 0);
    mix-blend-mode: multiply;
    transition: opacity 0.5s ease;
    will-change: transform;
}

html[data-theme="light"] .light-cursor-aura {
    opacity: 1;
}

/* Degradados decorativos: se atenúan en claro para no saturar */
html[data-theme="light"] .bg-\[\#fd3f00\].opacity-20,
html[data-theme="light"] .bg-\[\#7a5af8\].opacity-20 {
    opacity: 0.10 !important;
}

/* Fondos oscuros adicionales que deben aclararse en modo claro */
html[data-theme="light"] .bg-\[\#11131a\] {
    background-color: var(--t-surface-2) !important;
}

html[data-theme="light"] .bg-\[\#0a0b0f\],
html[data-theme="light"] .bg-\[\#0e0f14\] {
    background-color: var(--t-surface) !important;
}

/* Textos oscuros que deben ser legibles en claro */
html[data-theme="light"] .text-gray-200 { color: #1f2937 !important; }
html[data-theme="light"] .text-gray-100 { color: #111827 !important; }

/* Fondos con opacidad que deben aclararse */
html[data-theme="light"] .bg-white\/\[0\.02\],
html[data-theme="light"] .bg-white\/\[0\.03\] {
    background-color: rgba(17, 19, 26, 0.03) !important;
}

/* Bordes con opacidad baja */
html[data-theme="light"] .border-white\/\[0\.08\] {
    border-color: rgba(17, 19, 26, 0.08) !important;
}

/* Degradados de fondo que deben aclararse */
html[data-theme="light"] .from-black\/80,
html[data-theme="light"] .from-black\/70,
html[data-theme="light"] .from-black\/60 {
    --tw-gradient-from: rgba(255, 255, 255, 0.95) var(--tw-gradient-from-position) !important;
}

html[data-theme="light"] .via-black\/80,
html[data-theme="light"] .via-black\/70 {
    --tw-gradient-via: rgba(255, 255, 255, 0.90) var(--tw-gradient-via-position) !important;
}

/* Stats section */
html[data-theme="light"] .bg-\[\#11131a\] {
    background-color: var(--t-surface-2) !important;
}

/* ========================================================
   TEMA DE COLOR DE LA PÁGINA (paleta personalizable)
   ========================================================
   Las variables --c-* definen la paleta activa. El panel de
   personalización (botón 🎨 en la navbar) permite elegir entre
   presets de marca o ajustar topbar / navbar / texto del menú
   por separado. Se guardan en localStorage.
   ======================================================== */
:root {
    /* Nota: site-head.php redefine estas variables con los ajustes del panel
       (vienen después en la cascada y ganan). Aquí solo quedan respaldos. */
    --c-primary:        var(--primary-color, #fd3f00);
    --c-primary-hover:  var(--primary-color, #e03700);
    --c-accent:         var(--accent-color, #fb0d1f);
    --c-accent-purple:  var(--accent-purple, #7a5af8);
    --c-bg:             var(--bg-dark, #0b0c10);
    --c-surface:        var(--card-bg, #14161e);
    --c-surface-2:      var(--secondary-color, #0d0e14);
    --c-surface-3:      #1a1d27;
    --c-text:           #ffffff;
    --c-text-muted:     #9ca3af;
    --c-text-soft:      #6b7280;
    --c-border:         rgba(255, 255, 255, 0.10);
    --c-border-strong:  rgba(255, 255, 255, 0.18);
    --c-hover:          rgba(255, 255, 255, 0.05);

    /* Topbar y navbar (independientes entre sí).
       includes/site-head.php las reescribe por tema (oscuro / claro)
       con los valores elegidos en el panel administrativo; estos son
       solo los valores de respaldo. */
    --topbar-bg:          #1a1d27;
    --topbar-text:        #9ca3af;
    --topbar-text-active: var(--primary-color, #fd3f00);
    --topbar-border:      rgba(255, 255, 255, 0.10);

    --navbar-bg:          rgba(11, 12, 16, 0.80);
    --navbar-text:        #9ca3af;
    --navbar-text-active: var(--primary-color, #fd3f00);
    --navbar-border:      rgba(255, 255, 255, 0.10);

    --navbar-transparent: 0;   /* 0 = color sólido, 1 = transparente con blur */
}

/* ---------- Mapeo de clases de marca a las variables de tema ----------
   Permite que TODO el sitio (cientos de clases arbitrarias de Tailwind
   como bg-[#fd3f00], text-[#fd3f00]/10, border-[#fd3f00]/30...) siga
   la paleta activa sin reescribir el HTML. */
.bg-\[\#fd3f00\]               { background-color: var(--c-primary) !important; }
.text-\[\#fd3f00\]              { color: var(--c-primary) !important; }
.border-\[\#fd3f00\]            { border-color: var(--c-primary) !important; }
.bg-\[\#fd3f00\]\/10           { background-color: color-mix(in srgb, var(--c-primary) 10%, transparent) !important; }
.bg-\[\#fd3f00\]\/15           { background-color: color-mix(in srgb, var(--c-primary) 15%, transparent) !important; }
.bg-\[\#fd3f00\]\/20           { background-color: color-mix(in srgb, var(--c-primary) 20%, transparent) !important; }
.bg-\[\#fd3f00\]\/30           { background-color: color-mix(in srgb, var(--c-primary) 30%, transparent) !important; }
.border-\[\#fd3f00\]\/30       { border-color: color-mix(in srgb, var(--c-primary) 30%, transparent) !important; }
.border-\[\#fd3f00\]\/40       { border-color: color-mix(in srgb, var(--c-primary) 40%, transparent) !important; }
.shadow-\[\#fd3f00\]\/30       { --tw-shadow-color: color-mix(in srgb, var(--c-primary) 30%, transparent) !important; }
.hover\:bg-\[\#fd3f00\]:hover,
.group-hover\:bg-\[\#fd3f00\]:hover { background-color: var(--c-primary) !important; }
.hover\:text-\[\#fd3f00\]:hover,
.group-hover\:text-\[\#fd3f00\]:hover { color: var(--c-primary) !important; }
.hover\:border-\[\#fd3f00\]:hover { border-color: var(--c-primary) !important; }
.focus\:border-\[\#fd3f00\]:focus { border-color: var(--c-primary) !important; }
.ring-\[\#fd3f00\]            { --tw-ring-color: var(--c-primary) !important; }

.bg-\[\#7a5af8\]               { background-color: var(--c-accent-purple) !important; }
.text-\[\#7a5af8\]              { color: var(--c-accent-purple) !important; }
.bg-\[\#7a5af8\]\/10           { background-color: color-mix(in srgb, var(--c-accent-purple) 10%, transparent) !important; }
.bg-\[\#7a5af8\]\/20           { background-color: color-mix(in srgb, var(--c-accent-purple) 20%, transparent) !important; }
.border-\[\#7a5af8\]\/30       { border-color: color-mix(in srgb, var(--c-accent-purple) 30%, transparent) !important; }

.bg-\[\#fb0d1f\]               { background-color: var(--c-accent) !important; }
.text-\[\#fb0d1f\]              { color: var(--c-accent) !important; }
.bg-\[\#fb0d1f\]\/10           { background-color: color-mix(in srgb, var(--c-accent) 10%, transparent) !important; }

/* ---------- Animaciones: resplandores de fondo y cinta marquee ----------
   Controlables por separado desde el panel (Admin → Animaciones).
   Si no se fijan, heredan la paleta de marca (--c-primary / --c-accent-purple). */
.glow-primary      { background-color: var(--glow-primary, var(--c-primary)) !important; }
.glow-primary-20   { background-color: color-mix(in srgb, var(--glow-primary, var(--c-primary)) 20%, transparent) !important; }
.glow-primary-15   { background-color: color-mix(in srgb, var(--glow-primary, var(--c-primary)) 15%, transparent) !important; }
.glow-primary-12   { background-color: color-mix(in srgb, var(--glow-primary, var(--c-primary)) 12%, transparent) !important; }
.glow-primary-10   { background-color: color-mix(in srgb, var(--glow-primary, var(--c-primary)) 10%, transparent) !important; }
.glow-primary-5    { background-color: color-mix(in srgb, var(--glow-primary, var(--c-primary)) 5%, transparent) !important; }
.glow-secondary    { background-color: var(--glow-secondary, var(--c-accent-purple)) !important; }
.glow-secondary-20 { background-color: color-mix(in srgb, var(--glow-secondary, var(--c-accent-purple)) 20%, transparent) !important; }
.glow-secondary-10 { background-color: color-mix(in srgb, var(--glow-secondary, var(--c-accent-purple)) 10%, transparent) !important; }

.marquee-line-1 { color: var(--marquee-text, #ffffff) !important; }
.marquee-line-2 { color: var(--marquee-accent, var(--c-primary)) !important; }

/* ---------- Cabecera sobre el slider ----------
       Tres modos, elegibles desde el panel administrativo:
         transparent → sin fondo (se ve el slider)
         white       → barra blanca, texto oscuro
         color       → barra del color elegido, texto del color elegido
       includes/site-head.php traduce el modo (y los ajustes de color
       del navbar / topbar) a las variables --topbar-* y --navbar-*, así
       que aquí solo quedan los efectos propios del modo sólido. */
:root {
    --header-mode-bg: transparent;
    --header-mode-fg: #ffffff;
    --header-mode-solid: 0;   /* 1 = la cabecera lleva fondo propio */
}

html[data-header-mode="white"] {
    --header-mode-bg: #ffffff;
    --header-mode-fg: #111827;
    --header-mode-solid: 1;
}

html[data-header-mode="color"] {
    --header-mode-bg: var(--header-custom-bg, #0b0c10);
    --header-mode-fg: var(--header-custom-fg, #ffffff);
    --header-mode-solid: 1;
}

/* En modo sólido la sombra inferior ayuda a separar del contenido */
html[data-header-mode="white"] #site-header,
html[data-header-mode="color"] #site-header {
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.08), 0 8px 24px -16px rgba(0, 0, 0, 0.45);
}

/* Botón de contacto y logo: heredan el color del modo */
html[data-header-mode="white"] #header-nav .as-sec-btn,
html[data-header-mode="color"] #header-nav .as-sec-btn {
    color: var(--header-mode-fg);
    border-color: color-mix(in srgb, var(--header-mode-fg) 35%, transparent);
}

/* Fondo del sitio */
.bg-\[\#0b0c10\]               { background-color: var(--c-bg) !important; }
.bg-\[\#0b0c10\]\/80           { background-color: color-mix(in srgb, var(--c-bg) 80%, transparent) !important; }
.bg-\[\#0b0c10\]\/90           { background-color: color-mix(in srgb, var(--c-bg) 90%, transparent) !important; }
.bg-\[\#14161e\]               { background-color: var(--c-surface) !important; }
.bg-\[\#0d0e14\]               { background-color: var(--c-surface-2) !important; }
.bg-\[\#0d0e14\]\/50           { background-color: color-mix(in srgb, var(--c-surface-2) 50%, transparent) !important; }
.bg-\[\#0d0e14\]\/60           { background-color: color-mix(in srgb, var(--c-surface-2) 60%, transparent) !important; }
.bg-\[\#1a1d27\]               { background-color: var(--c-surface-3) !important; }

/* Textos base */
.text-white                    { color: var(--c-text) !important; }
.text-gray-300                 { color: #d1d5db !important; }
.text-gray-400                 { color: var(--c-text-muted) !important; }
.text-gray-500                 { color: var(--c-text-soft) !important; }
.text-gray-600                 { color: #9ca3af !important; }

/* Bordes y superficies */
.border-white\/5,
.border-white\/10,
.border-white\/20,
.border-white\/\[0\.12\]      { border-color: var(--c-border) !important; }
.border-gray-700,
.border-gray-800,
.border-gray-800\/80           { border-color: var(--c-border-strong) !important; }
.bg-white\/5,
.bg-white\/10,
.bg-white\/\[0\.03\]          { background-color: var(--c-hover) !important; }
.bg-black\/30                  { background-color: rgba(0, 0, 0, 0.30) !important; }
.bg-black\/40                  { background-color: rgba(0, 0, 0, 0.40) !important; }
.bg-black\/60                  { background-color: rgba(0, 0, 0, 0.60) !important; }
.bg-black\/70                  { background-color: rgba(0, 0, 0, 0.70) !important; }
.bg-black\/80                  { background-color: rgba(0, 0, 0, 0.80) !important; }
.bg-black\/90                  { background-color: rgba(0, 0, 0, 0.90) !important; }
.divide-white\/10 > *,
.divide-y > *                  { border-color: var(--c-border) !important; }

/* Inputs */
input, textarea, select {
    background-color: color-mix(in srgb, var(--c-bg) 60%, transparent);
    color: var(--c-text);
}
input::placeholder,
textarea::placeholder { color: #9ca3af; }

/* Tarjetas de cristal */
.glass-card {
    background: color-mix(in srgb, var(--c-surface) 70%, transparent) !important;
    border-color: var(--c-border) !important;
    backdrop-filter: blur(16px);
}

/* Botones de marca */
.as-pr-btn-3 {
    background-color: var(--c-primary) !important;
    box-shadow: 0 10px 25px -5px color-mix(in srgb, var(--c-primary) 35%, transparent) !important;
}
.as-pr-btn-3:hover {
    background-color: #ffffff !important;
    box-shadow: 0 15px 30px -5px rgba(255, 255, 255, 0.25) !important;
}
.as-pr-btn-3 .btn-text::after { color: var(--c-bg); }
.as-pr-btn-3:hover .btn-icon { color: var(--c-bg); }

.as-sec-btn {
    border-color: var(--c-border-strong) !important;
    color: var(--c-text) !important;
}
.as-sec-btn:hover {
    border-color: var(--c-primary) !important;
    background: color-mix(in srgb, var(--c-primary) 10%, transparent) !important;
    color: var(--c-text) !important;
}

/* Sombras */
.shadow-2xl,
.shadow-xl { box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7) !important; }

/* Cursor personalizado */
.custom-cursor { background-color: var(--c-primary); }
.custom-cursor-follower { border-color: color-mix(in srgb, var(--c-primary) 50%, transparent); }

/* ========================================================
   TRANSICIÓN DE TEMA
   ======================================================== */
.theme-switch,
.theme-switch * {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}

/* Evita el destello blanco al cambiar */
html.theme-transition,
html.theme-transition body,
html.theme-transition * {
    transition: background-color 0.35s ease, color 0.35s ease, border-color 0.35s ease !important;
}

/* ========================================================
   BARRA SUPERIOR (TOPBAR) + CABECERA PEGADA
   ========================================================
   #site-header es un solo bloque fixed (top: 0) que contiene
   la topbar arriba y el navbar debajo. Al bajar la página solo
   se colapsa la topbar; el navbar (logo + menú) queda fijado.
   ======================================================== */
:root {
    --topbar-h: 44px;
    --header-h: 80px;
}

.topbar {
    background: var(--topbar-bg, #1a1d27);
    background-color: var(--topbar-bg, #1a1d27);
    border-bottom: 1px solid var(--topbar-border);
    color: var(--topbar-text);
    font-size: 12px;
}

.topbar-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
    white-space: nowrap;
}

.topbar-link:hover {
    color: var(--topbar-text-active);
}

.topbar-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    font-weight: 700;
    font-size: 10px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    transition: all 0.2s ease;
}

.topbar-badge--intranet {
    background: rgba(122, 90, 248, 0.14);
    border: 1px solid rgba(122, 90, 248, 0.35);
    color: #a78bfa;
}

.topbar-badge--brochure {
    background: rgba(253, 63, 0, 0.12);
    border: 1px solid rgba(253, 63, 0, 0.32);
    color: var(--primary-color);
}

.topbar-badge:hover {
    transform: translateY(-1px);
}

/* ---------- Enlace de WhatsApp en la topbar ----------
   Icono oficial (glifo con teléfono) siempre en verde WhatsApp,
   con punto de "en línea" y hover que resalta todo el enlace. */
.topbar-link--wa {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 999px;
    border: 1px solid rgba(37, 211, 102, 0.28);
    background: rgba(37, 211, 102, 0.10);
    font-weight: 600;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.topbar-link--wa .topbar-wa-icon {
    width: 14px;
    height: 14px;
    color: #25d366;
    flex-shrink: 0;
    transition: transform 0.2s ease;
}

.topbar-link--wa span {
    color: #22c55e;
    font-size: 11px;
    letter-spacing: 0.02em;
}

.topbar-link--wa:hover {
    background: #25d366;
    border-color: #25d366;
    transform: translateY(-1px);
}

.topbar-link--wa:hover span {
    color: #ffffff;
}

.topbar-link--wa:hover .topbar-wa-icon {
    color: #ffffff;
    transform: scale(1.08);
}

/* En modo claro el verde se oscurece un poco para contraste */
html[data-theme="light"] .topbar-link--wa {
    border-color: rgba(22, 163, 74, 0.35);
    background: rgba(22, 163, 74, 0.08);
}

html[data-theme="light"] .topbar-link--wa span {
    color: #15803d;
}

html[data-theme="light"] .topbar-link--wa .topbar-wa-icon {
    color: #16a34a;
}

html[data-theme="light"] .topbar-badge--intranet { color: #6d4ae0; }
html[data-theme="light"] .topbar-badge--brochure { color: #d43a00; }

/* ========================================================
   CABECERA PEGADA — topbar + navbar en un solo bloque fijo
   ========================================================
   Arriba del todo se ven ambas barras. Al bajar con el scroll
   la barra superior (topbar) se colapsa y SOLO quedan fijados
   el logo y el navbar: nunca se oculta el menú ni queda
   espacio vacío arriba.
   ======================================================== */
#site-header {
    top: 0;
    transform: none;
}

/* La topbar colapsa al bajar: solo logo + navbar visibles */
#site-topbar {
    max-height: 60px;
    overflow: hidden;
    opacity: 1;
    transition: max-height 0.3s ease, opacity 0.25s ease, border-color 0.3s ease;
}

body.is-scrolled #site-topbar {
    max-height: 0;
    opacity: 0;
    border-bottom-width: 0;
}

/* Texto en movimiento dentro de la topbar (ocupa el espacio libre entre
   el grupo izquierdo y el derecho). */
.topbar-marquee {
    min-width: 0;
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, #000 12px, #000 calc(100% - 12px), transparent);
}
.topbar-marquee__track {
    display: flex;
    width: max-content;
    align-items: center;
    animation: topbar-marquee-scroll var(--marquee-speed, 28s) linear infinite;
    will-change: transform;
}
.topbar-marquee__group {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    padding: 0 0.75rem;
    white-space: nowrap;
}
.topbar-marquee__item {
    font-size: 11px;
    font-weight: var(--marquee-weight, 600);
    font-style: var(--marquee-style, normal);
    letter-spacing: 0.02em;
    line-height: 1;
    color: var(--marquee-fg, inherit);
    opacity: 0.9;
}
.topbar-marquee__link {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}
.topbar-marquee__sep {
    opacity: 0.5;
    font-size: 9px;
}
@keyframes topbar-marquee-scroll {
    0%   { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
@media (prefers-reduced-motion: reduce) {
    .topbar-marquee__track {
        animation: none;
    }
}
/* En móvil la topbar es muy estrecha: se oculta el marquee para no amontonar. */
@media (max-width: 639px) {
    .topbar-marquee {
        display: none !important;
    }
}

/* Sombra al navbar cuando está fijado solo (da separación visual) */
body.is-scrolled #header-nav {
    box-shadow: 0 8px 24px -12px rgba(0, 0, 0, 0.45);
}

/* Reglas antiguas (compatibilidad): el JS ya no las usa,
   el menú ya no se oculta completo al hacer scroll. */
body.nav-hidden #site-header,
body.nav-visible #site-header {
    transform: none;
}

/* ---------- Menú sticky desactivado desde el panel ----------
   La cabecera deja de ser "fixed": ocupa su sitio en el flujo del
   documento y se desplaza con la página, así que el hero no necesita
   el relleno superior que reserve su altura. */
html[data-sticky="0"] #site-header,
html[data-sticky="0"] body.nav-hidden #site-header,
html[data-sticky="0"] body.nav-visible #site-header,
html[data-sticky="0"] body.is-scrolled #site-header {
    position: relative;
    transform: none !important;
    box-shadow: none;
}

/* Sin sticky la topbar nunca colapsa: va con el flujo de la página */
html[data-sticky="0"] #site-topbar,
html[data-sticky="0"] body.is-scrolled #site-topbar {
    max-height: none;
    opacity: 1;
}

html[data-sticky="0"] #home {
    padding-top: 1.5rem;
    min-height: calc(100svh - var(--header-h, 80px));
}

/* Reserva el espacio real de la cabecera.
   --header-h lo mide site-ui.js con offsetHeight, así incluye la barra
   superior cuando está visible y refleja cualquier cambio de tamaño. */
#home {
    padding-top: calc(var(--header-h, 80px) + 0.75rem);
}

@media (max-width: 1023px) {
    #home {
        padding-top: calc(var(--header-h, 64px) + 0.5rem);
    }
}

/* Pantallas bajas (móvil pequeño, tableta o laptop apaisada): el hero respira
   menos para que la diapositiva completa quepa en una sola vista. */
@media (max-height: 860px) {
    #home {
        padding-top: calc(var(--header-h, 80px) + 0.75rem);
        padding-bottom: 1rem;
    }
}

@media (max-height: 700px) {
    #home {
        padding-top: calc(var(--header-h, 64px) + 0.5rem);
        padding-bottom: 0.75rem;
    }
}

/* ---------- Navbar: fondo variable (sólido o transparente + blur) ----------
   El valor de --navbar-bg lo imprime includes/site-head.php según el
   modo de cabecera y los colores elegidos en el panel. */
#header-nav {
    background: var(--navbar-bg, rgba(11, 12, 16, 0.85));
    background-color: var(--navbar-bg, rgba(11, 12, 16, 0.85));
    -webkit-backdrop-filter: blur(20px) saturate(160%);
    backdrop-filter: blur(20px) saturate(160%);
    border-bottom: 1px solid var(--navbar-border);
}

body.navbar-transparent #header-nav {
    background: transparent;
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    backdrop-filter: blur(24px) saturate(180%);
}

/* En modo blanco/color la cabecera va por delante del slider */
html[data-header-mode="white"] #site-header,
html[data-header-mode="color"] #site-header {
    z-index: 60;
}

/* Texto del menú (color personalizable desde el panel) */
.nav-link {
    color: var(--navbar-text);
}

/* Selector de idioma */
.lang-switch {
    display: inline-flex;
    border: 1px solid var(--t-border-strong);
    border-radius: 999px;
    overflow: hidden;
}

.lang-switch a {
    padding: 3px 9px;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-decoration: none;
    color: var(--t-text-soft);
    transition: all 0.2s ease;
}

.lang-switch a.is-active {
    background: var(--primary-color);
    color: #fff;
}

/* Toggle de tema */
.theme-toggle-btn {
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    border: 1px solid var(--t-border-strong);
    background: var(--t-hover);
    color: var(--t-text);
    cursor: pointer;
    transition: all 0.25s ease;
}

.theme-toggle-btn:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: rotate(-12deg) scale(1.05);
}

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

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

/* ========================================================
   CHATBOT FLOTANTE
   ======================================================== */
.chat-launcher {
    position: fixed;
    right: 24px;
    bottom: 24px;
    z-index: 95;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 18px 12px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    font-weight: 700;
    font-size: 13px;
    border: none;
    cursor: pointer;
    box-shadow: 0 12px 30px -8px rgba(253, 63, 0, 0.6);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.chat-launcher:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 18px 38px -10px rgba(253, 63, 0, 0.7);
}

.chat-launcher__pulse {
    position: absolute;
    inset: 0;
    border-radius: 999px;
    border: 2px solid var(--primary-color);
    animation: chat-pulse 2.4s ease-out infinite;
    pointer-events: none;
}

@keyframes chat-pulse {
    0%   { transform: scale(1);    opacity: 0.7; }
    70%  { transform: scale(1.22); opacity: 0; }
    100% { transform: scale(1.22); opacity: 0; }
}

.chat-panel {
    position: fixed;
    right: 24px;
    bottom: 96px;
    z-index: 96;
    width: 370px;
    max-width: calc(100vw - 32px);
    height: 560px;
    max-height: calc(100vh - 140px);
    display: flex;
    flex-direction: column;
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.6);
    opacity: 0;
    visibility: hidden;
    transform: translateY(18px) scale(0.97);
    transition: all 0.3s cubic-bezier(0.22, 1, 0.36, 1);
}

.chat-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.chat-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 18px;
    background: linear-gradient(135deg, var(--primary-color), var(--accent-color));
    color: #fff;
    flex-shrink: 0;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 15px;
    flex-shrink: 0;
    border: 2px solid rgba(255, 255, 255, 0.5);
}

.chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: var(--t-bg);
}

.chat-msg {
    max-width: 86%;
    padding: 11px 14px;
    border-radius: 16px;
    font-size: 13.5px;
    line-height: 1.55;
    animation: chat-in 0.3s ease;
}

@keyframes chat-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.chat-msg--bot {
    align-self: flex-start;
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    border-bottom-left-radius: 5px;
    color: var(--t-text);
}

.chat-msg--user {
    align-self: flex-end;
    background: var(--primary-color);
    color: #fff;
    border-bottom-right-radius: 5px;
}

.chat-msg a {
    color: inherit;
    text-decoration: underline;
    font-weight: 600;
    word-break: break-all;
}

.chat-msg--bot a { color: var(--primary-color); }

.chat-typing {
    display: inline-flex;
    gap: 4px;
    padding: 12px 14px;
}

.chat-typing span {
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--t-text-soft);
    animation: chat-blink 1.3s infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.18s; }
.chat-typing span:nth-child(3) { animation-delay: 0.36s; }

@keyframes chat-blink {
    0%, 60%, 100% { opacity: 0.3; transform: translateY(0); }
    30%           { opacity: 1;   transform: translateY(-3px); }
}

/* Botones de respuesta rápida */
.chat-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.chat-chip {
    padding: 8px 13px;
    border-radius: 999px;
    border: 1px solid var(--primary-color);
    background: transparent;
    color: var(--primary-color);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chat-chip:hover {
    background: var(--primary-color);
    color: #fff;
}

/* Tarjetas de servicio dentro del chat */
.chat-service {
    display: block;
    width: 100%;
    text-align: left;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--t-border);
    background: var(--t-surface);
    color: var(--t-text);
    cursor: pointer;
    transition: all 0.2s ease;
    margin-top: 6px;
}

.chat-service:hover {
    border-color: var(--primary-color);
    transform: translateX(3px);
}

.chat-service__code {
    font-family: var(--font-heading);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.1em;
    color: var(--primary-color);
}

.chat-service__title {
    font-weight: 700;
    font-size: 13.5px;
    margin: 2px 0 4px;
}

.chat-service__desc {
    font-size: 11.5px;
    color: var(--t-text-muted);
    line-height: 1.5;
}

.chat-foot {
    padding: 10px 12px;
    border-top: 1px solid var(--t-border);
    background: var(--t-surface);
    flex-shrink: 0;
}

.chat-quickbar {
    display: flex;
    gap: 8px;
}

.chat-quickbar input {
    flex: 1;
    padding: 9px 13px;
    border-radius: 999px;
    border: 1px solid var(--t-border-strong);
    background: var(--t-bg);
    color: var(--t-text);
    font-size: 13px;
    outline: none;
}

.chat-quickbar input:focus {
    border-color: var(--primary-color);
}

.chat-quickbar button {
    width: 38px;
    height: 38px;
    border-radius: 999px;
    background: var(--primary-color);
    color: #fff;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.chat-quickbar button:hover {
    filter: brightness(1.1);
}

/* ========================================================
   MENÚ CON SUBMENÚS
   ======================================================== */
.nav-item { position: relative; }

.nav-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    padding: 8px 0;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-item.is-open > .nav-link {
    color: var(--navbar-text-active);
}

.nav-caret {
    width: 12px;
    height: 12px;
    transition: transform 0.25s ease;
    opacity: 0.7;
}

.nav-item.is-open .nav-caret {
    transform: rotate(180deg);
}

.submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translate(-50%, 8px);
    min-width: 230px;
    padding: 8px;
    border-radius: 16px;
    background: var(--t-surface);
    border: 1px solid var(--t-border);
    box-shadow: var(--t-shadow);
    opacity: 0;
    visibility: hidden;
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
    z-index: 60;
}

.nav-item:hover > .submenu,
.nav-item.is-open > .submenu {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, 0);
}

.submenu a {
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 10px 12px;
    border-radius: 10px;
    font-size: 13.5px;
    font-weight: 600;
    color: var(--t-text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
}

.submenu a:hover {
    background: var(--t-hover);
    color: var(--primary-color);
    transform: translateX(3px);
}

.submenu__dot {
    width: 5px;
    height: 5px;
    border-radius: 999px;
    background: var(--primary-color);
    flex-shrink: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.submenu a:hover .submenu__dot { opacity: 1; }

/* ========================================================
   ADAPTACIÓN MÓVIL
   ======================================================== */
@media (max-width: 1023px) {
    .chat-panel {
        right: 12px;
        left: 12px;
        bottom: 84px;
        width: auto;
        height: min(72vh, 560px);
    }

    .chat-launcher {
        right: 14px;
        bottom: 14px;
        padding: 12px;
    }

    .chat-launcher__label { display: none; }

    /* El submenú y las filas del menú móvil los define el bloque
       "MENÚ LATERAL MÓVIL" de este archivo. Aquí solo se controla el
       navbar de escritorio cuando la ventana se estrecha. */
    #nav-desktop .nav-link {
        width: auto;
        justify-content: flex-start;
        font-size: 14px;
        padding: 8px 0;
        color: var(--navbar-text);
    }
}

@media (max-width: 640px) {
    .topbar-link--hide-mobile { display: none; }
    .chat-panel { bottom: 78px; }
}

/* ========================================================
   MENÚ LATERAL MÓVIL (offcanvas)
   Con variables semánticas para que el tema claro repinta
   el panel, el degradado de fondo y todos los textos.
   Sin esto, el degradado decorativo se quedaba oscuro en
   modo claro mientras los textos `text-white` se invertían
   a oscuro: texto invisible sobre fondo invisible.
   ======================================================== */
#offcanvas-menu {
    --oc-bg:      var(--t-surface-2);
    --oc-text:    var(--t-text);
    --oc-muted:   var(--t-text-muted);
    --oc-border:  var(--t-border);
    --oc-hover:   var(--t-hover);
    --oc-blue:    #3b82f6;
    --oc-blue-2:  #60a5fa;
    --oc-blue-ink:#93c5fd;
    background-color: var(--oc-bg) !important;
    border-left: 1px solid var(--oc-border) !important;
}

/* Modo claro: el azul se oscurece para mantener el contraste */
html[data-theme="light"] #offcanvas-menu {
    --oc-blue:    #2563eb;
    --oc-blue-2:  #3b82f6;
    --oc-blue-ink:#1d4ed8;
}

/* ---------- Resplandor azul al activarse ----------
   Capa difusa dentro del panel + halo exterior que sangra
   hacia la página. Se enciende con .is-open (lo pone el JS). */
#offcanvas-menu::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.45s ease;
    background:
        radial-gradient(120% 60% at 100% 0%,
            color-mix(in srgb, var(--oc-blue) 26%, transparent) 0%,
            transparent 62%),
        radial-gradient(90% 45% at 0% 100%,
            color-mix(in srgb, var(--oc-blue-2) 18%, transparent) 0%,
            transparent 60%);
}

#offcanvas-menu.is-open::before { opacity: 1; }

html[data-theme="light"] #offcanvas-menu::before {
    background:
        radial-gradient(120% 60% at 100% 0%,
            color-mix(in srgb, var(--oc-blue) 14%, transparent) 0%,
            transparent 62%),
        radial-gradient(90% 45% at 0% 100%,
            color-mix(in srgb, var(--oc-blue-2) 9%, transparent) 0%,
            transparent 60%);
}

/* Halo exterior sobre la página */
#offcanvas-menu::after {
    content: '';
    position: absolute;
    top: 0;
    left: -28px;
    width: 28px;
    height: 100%;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.45s ease;
    background: linear-gradient(to right, transparent, var(--oc-blue));
    filter: blur(18px);
}

#offcanvas-menu.is-open::after { opacity: 0.55; }
html[data-theme="light"] #offcanvas-menu.is-open::after { opacity: 0.3; }

/* Degradado base del panel (temático) */
#offcanvas-menu > .oc-deco {
    background-image: linear-gradient(
        to bottom,
        var(--t-surface-2),
        var(--t-bg) 55%,
        var(--t-surface-2)
    ) !important;
}

/* ---------- Textos ---------- */
#offcanvas-menu .nav-link,
#offcanvas-menu .oc-name,
#offcanvas-menu #offcanvas-close {
    color: var(--oc-text) !important;
}

#offcanvas-menu .oc-sub,
#offcanvas-menu .text-gray-400 {
    color: var(--oc-muted) !important;
}

#offcanvas-menu .oc-link:hover { color: var(--oc-blue-ink) !important; }
#offcanvas-menu .bg-white\/5 { background-color: var(--oc-hover) !important; }
#offcanvas-menu .border-white\/10,
#offcanvas-menu .border-white\/5 { border-color: var(--oc-border) !important; }

/* ---------- Cabecera fija ---------- */
#offcanvas-menu .oc-head {
    flex: 0 0 auto;
    background: color-mix(in srgb, var(--oc-bg) 80%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* ---------- Lista: TODAS las secciones visibles, con scroll ----------
   No hay tope de altura: el panel muestra la lista completa y
   solo se desplaza si no cabe. Así los submenús futuros tienen
   sitio y ninguna sección queda oculta. */
#nav-mobile {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 0.5rem 1rem 1rem;
}

/* Filas de sección: tarjeta con borde azul al abrir/activar */
#nav-mobile > ul > .nav-item { position: relative; }

#nav-mobile .nav-link {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    width: 100%;
    padding: 0.8rem 0.9rem;
    margin-bottom: 0.35rem;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
    border-radius: 14px;
    border: 1px solid transparent;
    transition:
        background-color 0.25s ease,
        border-color 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

#nav-mobile .nav-link:active { transform: scale(0.985); }

#nav-mobile .nav-link:hover,
#nav-mobile .nav-item.is-open > .nav-link {
    color: var(--oc-blue-ink) !important;
    background: color-mix(in srgb, var(--oc-blue) 10%, transparent);
    border-color: color-mix(in srgb, var(--oc-blue) 35%, transparent);
}

/* Marca de sección activa por ancla (#home, #servicios...) */
#nav-mobile .nav-link.is-current {
    color: var(--oc-blue-ink) !important;
    background: color-mix(in srgb, var(--oc-blue) 14%, transparent);
    border-color: color-mix(in srgb, var(--oc-blue) 45%, transparent);
    box-shadow: 0 0 0 1px color-mix(in srgb, var(--oc-blue) 20%, transparent),
                0 6px 18px -8px color-mix(in srgb, var(--oc-blue) 45%, transparent);
}

/* Punto indicador a la izquierda de cada fila */
#nav-mobile .nav-link::before {
    content: '';
    position: absolute;
    left: 0.9rem;
    top: 50%;
    width: 5px;
    height: 5px;
    margin-top: -2.5px;
    border-radius: 999px;
    background: var(--oc-border-strong, var(--oc-border));
    transition: background-color 0.25s ease, box-shadow 0.25s ease;
}

#nav-mobile .nav-link.is-current::before,
#nav-mobile .nav-item.is-open > .nav-link::before {
    background: var(--oc-blue);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--oc-blue) 22%, transparent);
}

#nav-mobile .nav-link > span:first-child {
    margin-left: 1rem;
    flex: 1 1 auto;
    min-width: 0;
}

/* Chevron: rota 180° cuando el submenú está abierto */
#nav-mobile .nav-caret {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    opacity: 0.65;
}

#nav-mobile .nav-item.is-open > .nav-link .nav-caret {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--oc-blue);
}

/* Iconos y acentos del pie en azul de marca */
#offcanvas-menu .oc-ico { color: var(--oc-blue); }

#offcanvas-menu .oc-social:hover {
    background: var(--oc-blue) !important;
    color: #fff !important;
    transform: translateY(-2px);
}

#offcanvas-menu .oc-social--wa:hover {
    background: #25d366 !important;
    color: #fff !important;
}

#offcanvas-menu .oc-contact:hover {
    background: color-mix(in srgb, var(--oc-blue) 14%, transparent) !important;
}

/* ---------- Submenús: pensados para móvil ----------
   Lista estática con guía vertical, sin hover: se despliega
   al pulsar el padre y empuja el resto de la lista. */
#nav-mobile .submenu {
    position: static;
    transform: none;
    opacity: 1;
    visibility: visible;
    box-shadow: none;
    background: transparent;
    border: none;
    margin: 0 0 0.6rem 1.6rem;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

#nav-mobile .nav-item.is-open > .submenu { max-height: 70vh; }

/* Guía vertical que conecta los hijos con el padre */
#nav-mobile .submenu {
    border-left: 1px solid color-mix(in srgb, var(--oc-blue) 40%, transparent);
    margin-left: 1.25rem;
    padding-left: 0.85rem;
}

#nav-mobile .submenu a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.6rem 0.7rem;
    margin-bottom: 0.25rem;
    border: 1px solid transparent;
    border-radius: 12px;
    font-size: 14.5px;
    font-weight: 500;
    line-height: 1.3;
    color: var(--oc-muted);
    background: color-mix(in srgb, var(--oc-bg) 55%, transparent);
    transition: background-color 0.2s ease, color 0.2s ease,
                border-color 0.2s ease, transform 0.2s ease;
}

#nav-mobile .submenu a:hover,
#nav-mobile .submenu a:active {
    color: var(--oc-blue-ink) !important;
    background: color-mix(in srgb, var(--oc-blue) 12%, transparent);
    border-color: color-mix(in srgb, var(--oc-blue) 30%, transparent);
    transform: translateX(2px);
}

#nav-mobile .submenu__dot {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: var(--oc-blue);
    opacity: 0.55;
    flex-shrink: 0;
}

#nav-mobile .submenu a:hover .submenu__dot {
    opacity: 1;
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--oc-blue) 20%, transparent);
}

/* ---------- Pie fijo ---------- */
#offcanvas-menu .oc-foot {
    flex: 0 0 auto;
    margin-top: auto;
    border-top: 1px solid var(--oc-border);
    background: color-mix(in srgb, var(--oc-bg) 88%, transparent);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

#offcanvas-menu .oc-foot .as-pr-btn-3 {
    box-shadow: 0 8px 22px -10px color-mix(in srgb, var(--oc-blue) 55%, transparent);
}

/* Barra de desplazamiento discreta */
#nav-mobile::-webkit-scrollbar { width: 5px; }
#nav-mobile::-webkit-scrollbar-track { background: transparent; }
#nav-mobile::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--oc-blue) 40%, transparent);
    border-radius: 999px;
}
#nav-mobile::-webkit-scrollbar-thumb:hover {
    background: var(--oc-blue);
}

/* Pista visual de que la lista continúa */
#offcanvas-menu .oc-more {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 6px 0 2px;
    font-size: 10px;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--oc-muted);
}
#offcanvas-menu .oc-more svg { animation: oc-bob 1.8s ease-in-out infinite; }

@keyframes oc-bob {
    0%, 100% { transform: translateY(0); }
    50%      { transform: translateY(3px); }
}

@media (prefers-reduced-motion: reduce) {
    #offcanvas-menu .oc-more svg { animation: none; }
    #offcanvas-menu .submenu,
    #offcanvas-menu .nav-link { transition: none !important; }
}

/* Evita el zoom por foco en iOS */
.chat-quickbar input,
.chat-actions button {
    font-size: 16px;
}

@media (prefers-reduced-motion: reduce) {
    .chat-panel,
    .chat-msg,
    .submenu,
    .chat-launcher { transition: none !important; animation: none !important; }
}

/* ========================================================
   PANEL DE TEMA DE COLOR (personalización en vivo)
   ======================================================== */
.color-theme-widget {
    position: relative;
    display: inline-flex;
}

.color-theme-panel {
    position: absolute;
    top: calc(100% + 14px);
    right: 0;
    width: 300px;
    max-width: calc(100vw - 32px);
    background: var(--c-surface);
    border: 1px solid var(--c-border-strong);
    border-radius: 20px;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, 0.65);
    padding: 18px;
    z-index: 70;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px) scale(0.97);
    transition: all 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

.color-theme-panel.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.color-theme-panel__title {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--c-text);
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-theme-panel__title::before {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--c-primary);
}

.color-theme-panel__section {
    padding: 12px 0;
    border-top: 1px solid var(--c-border);
}

.color-theme-panel__section:first-of-type {
    border-top: none;
    padding-top: 0;
}

.color-theme-panel__label {
    display: block;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--c-text-muted);
    margin-bottom: 10px;
}

.preset-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
}

.preset-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 12px;
    border: 1px solid var(--c-border);
    background: var(--c-hover);
    color: var(--c-text);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.preset-btn:hover {
    border-color: var(--c-primary);
    transform: translateY(-1px);
}

.preset-btn.is-active {
    border-color: var(--c-primary);
    background: color-mix(in srgb, var(--c-primary) 14%, transparent);
    box-shadow: 0 0 0 1px var(--c-primary);
}

.preset-btn__swatches {
    display: flex;
    flex-shrink: 0;
}

.preset-btn__swatches span {
    width: 14px;
    height: 14px;
    border-radius: 999px;
    border: 2px solid var(--c-surface);
    margin-left: -5px;
}

.preset-btn__swatches span:first-child { margin-left: 0; }

.color-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 7px 0;
}

.color-row__name {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--c-text);
}

.color-row__control {
    display: flex;
    align-items: center;
    gap: 8px;
}

.color-row__hex {
    font-family: 'Space Grotesk', monospace;
    font-size: 10.5px;
    color: var(--c-text-muted);
    text-transform: uppercase;
    min-width: 62px;
    text-align: right;
}

input[type="color"].color-input {
    -webkit-appearance: none;
    appearance: none;
    width: 34px;
    height: 34px;
    border: 1px solid var(--c-border-strong);
    border-radius: 10px;
    background: transparent;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
}

input[type="color"].color-input::-webkit-color-swatch-wrapper { padding: 3px; }
input[type="color"].color-input::-webkit-color-swatch { border: none; border-radius: 7px; }
input[type="color"].color-input::-moz-color-swatch { border: none; border-radius: 7px; }

.color-check {
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--c-text);
    cursor: pointer;
    padding: 7px 0;
    user-select: none;
}

.color-check input {
    width: 16px;
    height: 16px;
    accent-color: var(--c-primary);
    cursor: pointer;
}

.color-theme-panel__actions {
    display: flex;
    gap: 8px;
    padding-top: 14px;
    border-top: 1px solid var(--c-border);
}

.color-theme-panel__actions button {
    flex: 1;
    padding: 9px 0;
    border-radius: 11px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid var(--c-border-strong);
    background: transparent;
    color: var(--c-text);
}

.color-theme-panel__actions button:hover {
    border-color: var(--c-primary);
    color: var(--c-primary);
}

.color-theme-panel__actions .btn-reset {
    color: #f87171;
    border-color: rgba(248, 113, 113, 0.35);
}

.color-theme-panel__actions .btn-reset:hover {
    background: rgba(248, 113, 113, 0.12);
    border-color: #f87171;
}

@media (max-width: 640px) {
    .color-theme-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        right: 0;
        left: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 22px 22px 0 0;
        padding: 20px;
        transform: translateY(100%);
    }

    .color-theme-panel.is-open {
        transform: translateY(0);
    }
}

/* ==========================================================================
   TEMA CLARO (LIGHT MODE) — SOPORTE HERO SLIDER, SECCIONES & CONTACTO
   ========================================================================== */

/* 1. Hero Slider en Modo Claro */
html[data-theme="light"] .hero-watermark,
body.theme-light .hero-watermark {
    -webkit-text-stroke: 1.5px rgba(15, 23, 42, 0.05) !important;
}

html[data-theme="light"] .hero-anim-badge,
body.theme-light .hero-anim-badge {
    background-color: rgba(253, 63, 0, 0.08) !important;
    border-color: rgba(253, 63, 0, 0.25) !important;
    color: var(--c-primary, #fd3f00) !important;
}

html[data-theme="light"] .hero-slide-title,
html[data-theme="light"] .hero-slide-title *,
html[data-theme="light"] h1.hero-slide-title,
html[data-theme="light"] .hero-slide-content .hero-slide-title,
html[data-theme="light"] #hero-slider .hero-slide-title,
html[data-theme="light"] #hero-slider h1,
body.theme-light .hero-slide-title,
body.theme-light .hero-slide-title * {
    color: #0f172a !important;
    text-shadow: none !important;
}

html[data-theme="light"] .hero-slide-text,
html[data-theme="light"] .hero-slide-text *,
html[data-theme="light"] p.hero-slide-text,
html[data-theme="light"] .hero-slide-content .hero-slide-text,
html[data-theme="light"] #hero-slider .hero-slide-text,
html[data-theme="light"] #hero-slider p,
body.theme-light .hero-slide-text,
body.theme-light .hero-slide-text * {
    color: #334155 !important;
    text-shadow: none !important;
}

/* 1b. Carrusel de Testimonios y Proyectos en Modo Claro */
html[data-theme="light"] #testimonial h2,
html[data-theme="light"] #testimonial h3,
html[data-theme="light"] [data-tst-name],
html[data-theme="light"] .tst-card .font-heading,
html[data-theme="light"] .tst-card h3,
html[data-theme="light"] .tst-card p.text-white {
    color: #0f172a !important;
}

html[data-theme="light"] #testimonial [data-tst-quote],
html[data-theme="light"] #testimonial [data-tst-card-quote],
html[data-theme="light"] #testimonial blockquote,
html[data-theme="light"] .tst-card p,
html[data-theme="light"] .tst-card .text-gray-300 {
    color: #334155 !important;
}

html[data-theme="light"] .tst-card .glass-card,
html[data-theme="light"] [data-tst-panel] .glass-card {
    background-color: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.09) !important;
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .tst-card.is-active .glass-card {
    border-color: rgba(253, 63, 0, 0.4) !important;
    box-shadow: 0 14px 34px -8px rgba(253, 63, 0, 0.15) !important;
}

html[data-theme="light"] .tst-nav {
    background: #ffffff !important;
    color: #0f172a !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06) !important;
}

html[data-theme="light"] .tst-nav:hover {
    background: var(--c-primary, #fd3f00) !important;
    color: #ffffff !important;
    border-color: var(--c-primary, #fd3f00) !important;
}

html[data-theme="light"] .project-strip-card {
    background-color: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    box-shadow: 0 12px 30px -8px rgba(15, 23, 42, 0.1) !important;
}

html[data-theme="light"] .project-card-title {
    color: #0f172a !important;
    text-shadow: none !important;
}

html[data-theme="light"] .project-card-desc {
    color: #334155 !important;
}

html[data-theme="light"] .project-card-badge {
    background: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: var(--c-primary, #fd3f00) !important;
}

html[data-theme="light"] .project-card-year {
    background: rgba(15, 23, 42, 0.06) !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: #475569 !important;
}

html[data-theme="light"] .hero-btn-action--primary,
body.theme-light .hero-btn-action--primary {
    background-color: var(--c-primary, #fd3f00) !important;
    background-image: none !important;
    color: #ffffff !important;
    border-color: var(--c-primary, #fd3f00) !important;
    box-shadow: 0 8px 24px rgba(253, 63, 0, 0.35) !important;
}

html[data-theme="light"] .hero-btn-action--primary:hover,
body.theme-light .hero-btn-action--primary:hover {
    background-color: var(--c-primary-hover, var(--c-primary, #fd3f00)) !important;
    background-image: none !important;
    color: #ffffff !important;
}

html[data-theme="light"] .hero-btn-action--secondary,
body.theme-light .hero-btn-action--secondary {
    background-color: #ffffff !important;
    background-image: none !important;
    color: #0f172a !important;
    border-color: rgba(15, 23, 42, 0.2) !important;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.05) !important;
}

html[data-theme="light"] .hero-btn-action--secondary:hover,
body.theme-light .hero-btn-action--secondary:hover {
    background-color: #0f172a !important;
    background-image: none !important;
    color: #ffffff !important;
    border-color: #0f172a !important;
}

html[data-theme="light"] .hero-media-badge div,
body.theme-light .hero-media-badge div {
    background-color: rgba(255, 255, 255, 0.95) !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08) !important;
}

html[data-theme="light"] .hero-media-badge span.text-white,
body.theme-light .hero-media-badge span.text-white {
    color: #0f172a !important;
}

html[data-theme="light"] .slider-arrow,
body.theme-light .slider-arrow {
    background: rgba(255, 255, 255, 0.9) !important;
    color: #0f172a !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08) !important;
}

html[data-theme="light"] .slider-arrow:hover,
body.theme-light .slider-arrow:hover {
    background: var(--c-primary, #fd3f00) !important;
    color: #ffffff !important;
    border-color: var(--c-primary, #fd3f00) !important;
}

html[data-theme="light"] .slider-dot,
body.theme-light .slider-dot {
    background: rgba(15, 23, 42, 0.2) !important;
}

html[data-theme="light"] .slider-dot.is-active,
body.theme-light .slider-dot.is-active {
    background: var(--c-primary, #fd3f00) !important;
}

html[data-theme="light"] .slider-counter,
body.theme-light .slider-counter {
    color: #64748b !important;
}

/* 2. Sección de Estadísticas en Modo Claro */
html[data-theme="light"] #stats-section,
body.theme-light #stats-section {
    background-color: #f1f5f9 !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .stat-card,
body.theme-light .stat-card {
    background-color: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04) !important;
}

html[data-theme="light"] .stat-card h3.text-white,
body.theme-light .stat-card h3.text-white {
    color: #0f172a !important;
}

/* 3. Sección de Contacto en Modo Claro */
html[data-theme="light"] #contact,
body.theme-light #contact {
    background-color: #f8fafc !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .contact-form-container,
body.theme-light .contact-form-container {
    background-color: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    box-shadow: 0 25px 60px -15px rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .contact-form-container h3,
body.theme-light .contact-form-container h3 {
    color: #0f172a !important;
}

html[data-theme="light"] .contact-channel-card,
body.theme-light .contact-channel-card {
    background-color: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 8px 24px -4px rgba(15, 23, 42, 0.05) !important;
}

html[data-theme="light"] .contact-channel-card h3,
body.theme-light .contact-channel-card h3 {
    color: #0f172a !important;
}

html[data-theme="light"] .contact-channel-card a,
body.theme-light .contact-channel-card a {
    color: #0f172a !important;
}

html[data-theme="light"] .contact-channel-card a:hover,
body.theme-light .contact-channel-card a:hover {
    color: var(--c-primary, #fd3f00) !important;
}

html[data-theme="light"] .service-chip,
body.theme-light .service-chip {
    background-color: #f1f5f9 !important;
    border-color: rgba(15, 23, 42, 0.09) !important;
    color: #334155 !important;
}

html[data-theme="light"] .service-chip:hover,
body.theme-light .service-chip:hover {
    background-color: #e2e8f0 !important;
    border-color: rgba(253, 63, 0, 0.35) !important;
    color: #0f172a !important;
}

html[data-theme="light"] .service-chip.is-active,
body.theme-light .service-chip.is-active {
    background-color: var(--c-primary, #fd3f00) !important;
    border-color: var(--c-primary, #fd3f00) !important;
    color: #ffffff !important;
    box-shadow: 0 6px 18px rgba(253, 63, 0, 0.35) !important;
}

html[data-theme="light"] .budget-chip,
body.theme-light .budget-chip {
    background-color: #f1f5f9 !important;
    border-color: rgba(15, 23, 42, 0.09) !important;
    color: #64748b !important;
}

html[data-theme="light"] .budget-chip:hover,
body.theme-light .budget-chip:hover {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}

html[data-theme="light"] .budget-chip.is-active,
body.theme-light .budget-chip.is-active {
    background-color: var(--c-primary, #fd3f00) !important;
    border-color: var(--c-primary, #fd3f00) !important;
    color: #ffffff !important;
}

html[data-theme="light"] .ajax-contact-form input,
html[data-theme="light"] .ajax-contact-form textarea,
body.theme-light .ajax-contact-form input,
body.theme-light .ajax-contact-form textarea {
    background-color: #f8fafc !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    color: #0f172a !important;
}

html[data-theme="light"] .ajax-contact-form input::placeholder,
html[data-theme="light"] .ajax-contact-form textarea::placeholder,
body.theme-light .ajax-contact-form input::placeholder,
body.theme-light .ajax-contact-form textarea::placeholder {
    color: #94a3b8 !important;
}

html[data-theme="light"] #copy-email-btn,
body.theme-light #copy-email-btn {
    background-color: #f1f5f9 !important;
    border-color: rgba(15, 23, 42, 0.1) !important;
    color: #475569 !important;
}

html[data-theme="light"] #copy-email-btn:hover,
body.theme-light #copy-email-btn:hover {
    background-color: #e2e8f0 !important;
    color: #0f172a !important;
}

/* ==========================================================================
   SECCIÓN DEL TEXTO EN MOVIMIENTO (MARQUEE / TICKERS) EN MODO CLARO
   ==========================================================================
   La sección lleva fondo negro por diseño (bg-black). En modo claro ese
   fondo NO se repinta (solo el footer lo hace), pero el texto text-white
   SÍ se invierte a oscuro: texto oscuro sobre fondo negro = invisible.
   Aquí la sección pasa a superficie clara y los textos se aseguran
   oscuros/legibles, conservando las píldoras de color de marca. */

html[data-theme="light"] section.marquee-section,
body.theme-light section.marquee-section {
    background-color: var(--t-surface-2) !important;
    border-bottom-color: var(--t-border) !important;
}

/* Marquee izquierda: texto principal oscuro sobre fondo claro */
html[data-theme="light"] .marquee-section .marquee-container,
body.theme-light .marquee-section .marquee-container {
    color: #0f172a !important;
}

/* Marquee derecha: el naranja de marca se oscurece un punto para
   mantener el contraste sobre fondo claro sin perder identidad */
html[data-theme="light"] .marquee-section .marquee-container.text-\[\#fd3f00\],
body.theme-light .marquee-section .marquee-container.text-\[\#fd3f00\] {
    color: var(--c-primary-hover, var(--c-primary, #fd3f00)) !important;
}

/* Separadores "•" y estrellas: tonos neutrales legibles en claro */
html[data-theme="light"] .marquee-section .marquee-container .text-white,
body.theme-light .marquee-section .marquee-container .text-white {
    color: #334155 !important;
}

/* ==========================================================================
   BUSCADOR (MODAL DE BÚSQUEDA) EN MODO CLARO
   El overlay bg-black/95 no se remapeaba: el buscador se veía oscuro
   incluso con el tema claro. Aquí pasa a superficie clara completa. */

html[data-theme="light"] #search-modal,
body.theme-light #search-modal {
    background-color: rgba(246, 247, 249, 0.96) !important;
    -webkit-backdrop-filter: blur(18px);
    backdrop-filter: blur(18px);
}

html[data-theme="light"] .search-title .search-word,
html[data-theme="light"] .search-title,
body.theme-light .search-title .search-word,
body.theme-light .search-title {
    color: #0f172a !important;
}

html[data-theme="light"] #search-input,
body.theme-light #search-input {
    background-color: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.15) !important;
    color: #0f172a !important;
    box-shadow: 0 20px 45px -18px rgba(17, 19, 26, 0.25) !important;
}

html[data-theme="light"] #search-input::placeholder,
body.theme-light #search-input::placeholder {
    color: #94a3b8 !important;
}

html[data-theme="light"] #search-modal .bg-white\/10,
body.theme-light #search-modal .bg-white\/10 {
    background-color: rgba(17, 19, 26, 0.06) !important;
    color: #334155 !important;
}

/* Resultados y sugerencias legibles en claro */
html[data-theme="light"] .search-result-item,
body.theme-light .search-result-item {
    background-color: rgba(17, 19, 26, 0.03) !important;
}

html[data-theme="light"] .search-result-item:hover,
html[data-theme="light"] .search-result-item:focus-within,
body.theme-light .search-result-item:hover,
body.theme-light .search-result-item:focus-within {
    background-color: rgba(253, 63, 0, 0.06) !important;
}

html[data-theme="light"] .search-result-item .bg-black\/30,
html[data-theme="light"] .search-result-item .bg-black\/50,
body.theme-light .search-result-item .bg-black\/30,
body.theme-light .search-result-item .bg-black\/50 {
    background-color: transparent !important;
}

html[data-theme="light"] .search-result-desc,
body.theme-light .search-result-desc {
    color: #4b5563 !important;
}

html[data-theme="light"] .search-suggestion,
body.theme-light .search-suggestion {
    background-color: rgba(17, 19, 26, 0.05) !important;
    color: #334155 !important;
    border: 1px solid rgba(15, 23, 42, 0.10);
}

html[data-theme="light"] .search-suggestion:hover,
body.theme-light .search-suggestion:hover {
    background-color: var(--c-primary, #fd3f00) !important;
    color: #ffffff !important;
    border-color: var(--c-primary, #fd3f00);
}

html[data-theme="light"] #search-modal .text-gray-500,
body.theme-light #search-modal .text-gray-500 {
    color: #6b7280 !important;
}

/* ==========================================================================
   MARCAS DE AGUA DE SECCIONES EN MODO CLARO (NOSOTROS, TESTIMONIOS, ETC.)
   ========================================================================== */
/* NOTA: la marca de agua la gobierna custom.css con --wm-color-dark/light
   (ajustes del panel). Aquí no se fija ningún color para no anularlos. */

/* ==========================================================================
   SECCIÓN NOSOTROS — MODO CLARO (SILUETA FLOTANTE, TEXTO JUSTIFICADO, BADGES)
   ========================================================================== */
html[data-theme="light"] .about-floating-img,
body.theme-light .about-floating-img {
    filter: drop-shadow(0 20px 30px rgba(15, 23, 42, 0.20)) !important;
}

html[data-theme="light"] .about-history-text,
body.theme-light .about-history-text {
    color: #475569 !important;
}

html[data-theme="light"] .about-quote,
body.theme-light .about-quote {
    color: #334155 !important;
}

html[data-theme="light"] #about-photo-wrap .glass-card,
body.theme-light #about-photo-wrap .glass-card {
    background: #ffffff !important;
    border-color: rgba(17, 19, 26, 0.1) !important;
    box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.08) !important;
}

html[data-theme="light"] #about-photo-wrap .glass-card p.text-gray-300,
body.theme-light #about-photo-wrap .glass-card p.text-gray-300 {
    color: #64748b !important;
}

html[data-theme="light"] #about-photo-wrap .bg-black\/80,
html[data-theme="light"] #about-photo-wrap .bg-black\/85,
body.theme-light #about-photo-wrap .bg-black\/80,
body.theme-light #about-photo-wrap .bg-black\/85 {
    background: #ffffff !important;
    border-color: rgba(17, 19, 26, 0.1) !important;
    box-shadow: 0 14px 30px -10px rgba(0, 0, 0, 0.12) !important;
}

html[data-theme="light"] #about-photo-wrap .bg-black\/85 h4,
body.theme-light #about-photo-wrap .bg-black\/85 h4 {
    color: #0f172a !important;
}

/* ==========================================================================
   SECCIÓN DE RESEÑAS / TESTIMONIOS — MODO CLARO
   ========================================================================== */
html[data-theme="light"] #testimonial,
body.theme-light #testimonial {
    background-color: var(--t-surface-2) !important;
}

html[data-theme="light"] #testimonial .tst-quote-box,
body.theme-light #testimonial .tst-quote-box {
    background: #ffffff !important;
    border-color: rgba(17, 19, 26, 0.08) !important;
    box-shadow: 0 10px 25px -8px rgba(0, 0, 0, 0.06) !important;
}

html[data-theme="light"] #testimonial .tst-quote-box blockquote,
body.theme-light #testimonial .tst-quote-box blockquote {
    color: #334155 !important;
}

html[data-theme="light"] .tst-card-inner,
body.theme-light .tst-card-inner {
    background: #ffffff !important;
    border-color: rgba(17, 19, 26, 0.08) !important;
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.06) !important;
}

html[data-theme="light"] .tst-card.is-active .tst-card-inner,
body.theme-light .tst-card.is-active .tst-card-inner {
    border-color: var(--c-primary, #fd3f00) !important;
    box-shadow: 0 16px 36px -10px rgba(253, 63, 0, 0.22), 0 0 0 1px rgba(253, 63, 0, 0.15) !important;
}

html[data-theme="light"] .tst-card [data-tst-card-quote],
body.theme-light .tst-card [data-tst-card-quote] {
    color: #334155 !important;
}

html[data-theme="light"] .tst-card .font-bold.text-white,
body.theme-light .tst-card .font-bold.text-white {
    color: #0f172a !important;
}

html[data-theme="light"] .tst-card .border-t,
body.theme-light .tst-card .border-t {
    border-top-color: rgba(17, 19, 26, 0.08) !important;
}

html[data-theme="light"] .tst-nav,
body.theme-light .tst-nav {
    background: #ffffff !important;
    border-color: rgba(17, 19, 26, 0.15) !important;
    color: #0f172a !important;
    box-shadow: 0 6px 18px -4px rgba(0, 0, 0, 0.1) !important;
}

html[data-theme="light"] .tst-nav:hover,
body.theme-light .tst-nav:hover {
    background: var(--primary-color) !important;
    border-color: transparent !important;
    color: #ffffff !important;
    box-shadow: 0 10px 24px -5px rgba(253, 63, 0, 0.4) !important;
}

html[data-theme="light"] .tst-dot,
body.theme-light .tst-dot {
    background: rgba(17, 19, 26, 0.2) !important;
}

html[data-theme="light"] .tst-dot.is-active,
body.theme-light .tst-dot.is-active {
    background: var(--primary-color) !important;
}

/* ==========================================================================
   ESTILOS MEJORADOS: MARCAS ALIADAS (SHOWCASE PROFESIONAL)
   ========================================================================== */
.brand-logo-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 190px;
    height: 84px;
    padding: 0.85rem 1.75rem;
    background: #ffffff;
    border-radius: 1.125rem;
    border: 1px solid rgba(255, 255, 255, 0.25);
    box-shadow: 0 10px 24px -6px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.1);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    flex-shrink: 0;
    text-decoration: none;
}

.brand-logo-card:hover {
    transform: translateY(-4px) scale(1.03);
    border-color: var(--primary-color, #fd3f00);
    box-shadow: 0 16px 32px -6px rgba(253, 63, 0, 0.3), 0 0 0 2px rgba(253, 63, 0, 0.35);
}

.brand-logo-card .brand-logo-img {
    max-height: 48px;
    max-width: 145px;
    width: auto;
    height: auto;
    object-fit: contain;
    filter: none !important;
    opacity: 1 !important;
    transition: transform 0.3s ease;
}

.brand-logo-card:hover .brand-logo-img {
    transform: scale(1.05);
}

.brand-edge-mask-left {
    background: linear-gradient(90deg, #0d0e14 0%, rgba(13, 14, 20, 0) 100%);
}

.brand-edge-mask-right {
    background: linear-gradient(270deg, #0d0e14 0%, rgba(13, 14, 20, 0) 100%);
}

/* Modo claro: Marcas Aliadas */
html[data-theme="light"] .brands-showcase-section,
body.theme-light .brands-showcase-section {
    background-color: #f8fafc !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .brands-showcase-section h2,
body.theme-light .brands-showcase-section h2,
html[data-theme="light"] .brands-showcase-section h3,
body.theme-light .brands-showcase-section h3 {
    color: #0f172a !important;
}

html[data-theme="light"] .brand-edge-mask-left {
    background: linear-gradient(90deg, #f8fafc 0%, rgba(248, 250, 252, 0) 100%) !important;
}

html[data-theme="light"] .brand-edge-mask-right {
    background: linear-gradient(270deg, #f8fafc 0%, rgba(248, 250, 252, 0) 100%) !important;
}

html[data-theme="light"] .brand-logo-card,
body.theme-light .brand-logo-card {
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.09) !important;
    box-shadow: 0 4px 16px rgba(15, 23, 42, 0.06) !important;
}

html[data-theme="light"] .brand-logo-card:hover,
body.theme-light .brand-logo-card:hover {
    box-shadow: 0 12px 28px rgba(253, 63, 0, 0.22) !important;
    border-color: var(--primary-color, #fd3f00) !important;
}

/* ==========================================================================
   ESTILOS MEJORADOS: EQUIPO / TEAM (AVATAR CIRCULAR SIN ZOOM)
   ========================================================================== */
.team-avatar-wrapper {
    position: relative;
    user-select: none;
}

.team-avatar-circle {
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.team-card:hover .team-avatar-circle {
    border-color: var(--primary-color, #fd3f00);
    box-shadow: 0 12px 30px -5px rgba(253, 63, 0, 0.35);
}

.team-avatar-img {
    transform: none !important; /* Desactiva cualquier zoom previo */
    transition: none !important;
}

/* Modo claro: Tarjetas de equipo */
html[data-theme="light"] #team,
body.theme-light #team {
    background-color: #f8fafc !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
}

html[data-theme="light"] .team-card,
body.theme-light .team-card {
    background: #ffffff !important;
    border-color: rgba(15, 23, 42, 0.08) !important;
    box-shadow: 0 10px 30px -8px rgba(0, 0, 0, 0.06) !important;
}

html[data-theme="light"] .team-card h4,
body.theme-light .team-card h4 {
    color: #0f172a !important;
}

html[data-theme="light"] .team-card p,
body.theme-light .team-card p {
    color: #475569 !important;
}

html[data-theme="light"] .team-avatar-circle {
    background-color: #f1f5f9 !important;
    border-color: rgba(15, 23, 42, 0.12) !important;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08) !important;
}

/* ==========================================================================
   EQUIPO — CARRUSEL MODERNO (scroll-snap + flechas + puntos)
   ========================================================================== */
.team-carousel {
    position: relative;
    --team-gap: 1.5rem;
}

.team-carousel__viewport {
    position: relative;
}

.team-carousel__track {
    display: flex;
    align-items: stretch;
    gap: var(--team-gap);
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 1rem 0 1.75rem;
    scrollbar-width: none;
    -ms-overflow-style: none;
    outline: none;
}

.team-carousel__track::-webkit-scrollbar {
    display: none;
}

.team-carousel__track:focus-visible {
    outline: 2px solid var(--primary-color, #fd3f00);
    outline-offset: 4px;
    border-radius: 1.5rem;
}

.team-slide {
    flex: 0 0 calc((100% - (var(--team-gap) * 2)) / 3);
    min-width: 0;
    scroll-snap-align: start;
}

@media (max-width: 1023px) {
    .team-slide {
        flex-basis: calc((100% - var(--team-gap)) / 2);
    }
}

@media (max-width: 639px) {
    .team-slide {
        flex-basis: 100%;
    }
}

/* Tarjeta */
.team-card-v2 {
    position: relative;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    border-radius: 1.75rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, .055), rgba(255, 255, 255, .015));
    border: 1px solid rgba(255, 255, 255, .08);
    box-shadow: 0 18px 45px -30px rgba(0, 0, 0, .9);
    transition: transform .5s cubic-bezier(.22, 1, .36, 1), border-color .3s ease, box-shadow .3s ease;
}

.team-card-v2:hover {
    transform: translateY(-6px);
    border-color: rgba(253, 63, 0, .45);
    box-shadow: 0 30px 70px -28px rgba(253, 63, 0, .4);
}

.team-card-v2__media {
    position: relative;
    aspect-ratio: 5 / 6;
    overflow: hidden;
    background: #0b0c10;
}

.team-card-v2__img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    transition: transform .8s cubic-bezier(.22, 1, .36, 1);
    will-change: transform;
}

.team-card-v2:hover .team-card-v2__img {
    transform: scale(1.045);
}

.team-card-v2__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(11, 12, 16, 0) 55%, rgba(11, 12, 16, .55) 100%);
    pointer-events: none;
}

.team-card-v2__status {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 2;
    width: .85rem;
    height: .85rem;
    border-radius: 999px;
    background: #10b981;
    border: 2px solid rgba(11, 12, 16, .85);
    box-shadow: 0 0 0 4px rgba(16, 185, 129, .18);
}

.team-card-v2__socials {
    position: absolute;
    right: 1rem;
    bottom: 1rem;
    z-index: 3;
    display: flex;
    gap: .5rem;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity .3s ease, transform .3s ease;
}

.team-card-v2:hover .team-card-v2__socials,
.team-card-v2:focus-within .team-card-v2__socials {
    opacity: 1;
    transform: none;
}

.team-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.team-social:hover {
    background: var(--primary-color, #fd3f00);
    border-color: var(--primary-color, #fd3f00);
    transform: translateY(-2px);
}

.team-social svg {
    width: .95rem;
    height: .95rem;
}

.team-card-v2__body {
    display: flex;
    flex: 1;
    flex-direction: column;
    gap: .55rem;
    padding: 1.25rem 1.35rem 1.5rem;
}

.team-card-v2__role {
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--primary-color, #fd3f00);
}

.team-card-v2__name {
    font-family: var(--font-heading, inherit);
    font-size: 1.2rem;
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -.01em;
    color: #fff;
}

.team-card-v2__bio {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-size: .8rem;
    line-height: 1.55;
    color: rgba(255, 255, 255, .62);
}

/* Controles */
.team-carousel__controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-top: .5rem;
}

.team-carousel__controls[hidden] {
    display: none;
}

.team-carousel__arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 999px;
    color: #fff;
    background: rgba(255, 255, 255, .05);
    border: 1px solid rgba(255, 255, 255, .1);
    transition: background .2s ease, border-color .2s ease, transform .2s ease, opacity .2s ease;
}

.team-carousel__arrow:hover:not(:disabled) {
    background: var(--primary-color, #fd3f00);
    border-color: var(--primary-color, #fd3f00);
    transform: translateY(-2px);
}

.team-carousel__arrow:disabled {
    opacity: .3;
    cursor: not-allowed;
}

.team-carousel__arrow svg {
    width: 1rem;
    height: 1rem;
}

.team-carousel__dots {
    display: flex;
    align-items: center;
    gap: .45rem;
}

.team-dot {
    width: .45rem;
    height: .45rem;
    padding: 0;
    border-radius: 999px;
    background: rgba(255, 255, 255, .22);
    transition: width .25s ease, background .25s ease;
}

.team-dot.is-active {
    width: 1.5rem;
    background: var(--primary-color, #fd3f00);
}

/* Modo claro */
html[data-theme="light"] .team-card-v2,
body.theme-light .team-card-v2 {
    background: #fff;
    border-color: rgba(15, 23, 42, .08);
    box-shadow: 0 18px 45px -30px rgba(15, 23, 42, .35);
}

html[data-theme="light"] .team-card-v2__media,
body.theme-light .team-card-v2__media {
    background: #f1f5f9;
}

html[data-theme="light"] .team-card-v2__name,
body.theme-light .team-card-v2__name {
    color: #0f172a;
}

html[data-theme="light"] .team-card-v2__bio,
body.theme-light .team-card-v2__bio {
    color: #475569;
}

html[data-theme="light"] .team-carousel__arrow,
body.theme-light .team-carousel__arrow {
    color: #0f172a;
    background: rgba(15, 23, 42, .05);
    border-color: rgba(15, 23, 42, .12);
}

html[data-theme="light"] .team-dot,
body.theme-light .team-dot {
    background: rgba(15, 23, 42, .2);
}

/* En pantallas táctiles no hay hover: mostrar siempre las redes */
@media (hover: none) {
    .team-card-v2__socials {
        opacity: 1;
        transform: none;
    }
}

/* Accesibilidad: menos movimiento */
@media (prefers-reduced-motion: reduce) {
    .team-carousel__track {
        scroll-behavior: auto;
    }
    .team-card-v2,
    .team-card-v2__img,
    .team-carousel__arrow,
    .team-dot {
        transition: none;
    }
    .team-card-v2:hover {
        transform: none;
    }
}

/* ==========================================================================
   REDISEÑO RESPONSIVE DEL HEADER Y DEL MENÚ MÓVIL (2026)
   ========================================================================== */

/* ---------- Barra superior ---------- */
.topbar__row {
    min-height: 42px;
}

.topbar__group {
    gap: 0.85rem;
    min-width: 0;
}

.topbar__group--left {
    flex: 1 1 auto;
    overflow: hidden;
}

.topbar__group--right {
    flex: 0 0 auto;
    gap: 0.6rem;
}

.topbar-link--phone {
    flex-shrink: 0;
}

/* ---------- Navbar ---------- */
.header-bar {
    min-width: 0;
}

.site-brand {
    max-width: min(58vw, 290px);
}

.site-brand__text {
    line-height: 1;
}

.site-brand__slogan {
    margin-top: 4px;
}

.header-actions {
    min-width: 0;
}

.header-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.45rem;
    height: 2.45rem;
    flex: 0 0 auto;
}

.header-menu-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: 0.9rem;
    color: #fff;
    background: linear-gradient(135deg, rgba(253, 63, 0, 0.22), rgba(253, 63, 0, 0.08));
    border: 1px solid rgba(253, 63, 0, 0.38);
    box-shadow: 0 8px 20px -12px rgba(253, 63, 0, 0.7);
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.header-menu-btn:hover {
    background: var(--primary-color, #fd3f00);
    border-color: var(--primary-color, #fd3f00);
    transform: translateY(-1px);
}

/* El CTA y el brochure del navbar deben ocultarse de verdad en móvil:
   las clases .as-pr-btn-3 / .header-icon-btn fuerzan display y anulan
   la utilidad .hidden de Tailwind. */
.header-cta {
    display: none !important;
}

.header-brochure {
    display: none !important;
}

@media (min-width: 640px) and (max-width: 1023px) {
    .header-cta {
        display: inline-flex !important;
    }
}

@media (min-width: 640px) {
    .header-brochure {
        display: inline-flex !important;
    }
}

@media (min-width: 1280px) {
    .header-cta {
        display: inline-flex !important;
    }
}

@media (min-width: 1024px) {
    .header-menu-btn {
        display: none !important;
    }
}

@media (max-width: 767px) {
    .topbar-hide-sm,
    .topbar-status,
    .topbar-brochure,
    .topbar-intranet {
        display: none !important;
    }

    .topbar__row {
        min-height: 38px;
    }

    .topbar__group {
        gap: 0.55rem;
    }

    .topbar-link--wa {
        padding: 3px 7px;
    }

    .topbar-wa-label {
        display: none;
    }

    .topbar-lang a {
        padding: 2px 7px;
        font-size: 9.5px;
    }
}

@media (max-width: 639px) {
    .site-brand {
        max-width: 60vw;
    }

    .site-brand__slogan {
        display: none;
    }

    .site-brand__mark {
        width: 2.25rem !important;
        height: 2.25rem !important;
        font-size: 1rem !important;
    }

    .header-icon-btn {
        width: 2.25rem;
        height: 2.25rem;
    }

    .header-menu-btn {
        width: 2.45rem;
        height: 2.45rem;
    }

    .header-actions {
        gap: 0.35rem;
    }
}

@media (max-width: 359px) {
    .site-brand {
        max-width: 52vw;
    }

    .site-brand__name {
        font-size: 0.82rem;
    }

    .header-actions .header-icon-btn:not(.header-menu-btn) {
        display: none;
    }
}

/* ==========================================================================
   OFFCANVAS MÓVIL — rediseño limpio, adaptable y táctil
   ========================================================================== */
#offcanvas-menu {
    --oc-bg: #0d0e14;
    --oc-text: #ffffff;
    --oc-muted: rgba(255, 255, 255, 0.62);
    --oc-border: rgba(255, 255, 255, 0.09);
    --oc-hover: rgba(255, 255, 255, 0.055);
    --oc-blue: var(--primary-color, #fd3f00);
    --oc-blue-2: var(--primary-color, #fd3f00);
    --oc-blue-ink: var(--primary-color, #fd3f00);
    background: var(--oc-bg) !important;
    border-left: 1px solid var(--oc-border) !important;
    box-shadow: -40px 0 90px -30px rgba(0, 0, 0, 0.85);
}

html[data-theme="light"] #offcanvas-menu {
    --oc-bg: #ffffff;
    --oc-text: #0f172a;
    --oc-muted: #475569;
    --oc-border: rgba(15, 23, 42, 0.10);
    --oc-hover: rgba(15, 23, 42, 0.045);
    --oc-blue: var(--primary-color, #fd3f00);
    --oc-blue-2: var(--primary-color, #fd3f00);
    --oc-blue-ink: var(--primary-color, #fd3f00);
    background: var(--oc-bg) !important;
}

/* Se elimina el resplandor azul anterior */
#offcanvas-menu::before,
#offcanvas-menu::after {
    display: none !important;
}

#offcanvas-menu .offcanvas__deco {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(120% 55% at 100% 0%,
            color-mix(in srgb, var(--oc-blue) 16%, transparent) 0%,
            transparent 62%),
        linear-gradient(180deg,
            color-mix(in srgb, var(--oc-bg) 96%, #ffffff 4%),
            var(--oc-bg));
}

html[data-theme="light"] #offcanvas-menu .offcanvas__deco {
    background:
        radial-gradient(120% 55% at 100% 0%,
            color-mix(in srgb, var(--oc-blue) 10%, transparent) 0%,
            transparent 60%),
        linear-gradient(180deg, #ffffff, #f8fafc);
}

/* Panel lateral en todos los tamaños (no ocupa toda la pantalla en móvil) */
@media (max-width: 639px) {
    #offcanvas-menu {
        width: 92vw !important;
        max-width: 420px !important;
        border-left: 1px solid var(--oc-border) !important;
    }
    /* En móvil no se oscurece la página: el overlay es invisible pero sigue
       capturando clics para cerrar el menú. */
    #offcanvas-overlay {
        background: transparent !important;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
    }
}

/* ---------- Cabecera del panel ---------- */
.offcanvas__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex: 0 0 auto;
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--oc-border);
    background: color-mix(in srgb, var(--oc-bg) 82%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.offcanvas__brand {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    min-width: 0;
    text-decoration: none;
}

.offcanvas__logo {
    height: 2.35rem;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

.offcanvas__mark {
    width: 2.35rem !important;
    height: 2.35rem !important;
    font-size: 1.05rem !important;
    flex: 0 0 auto;
}

.offcanvas__brand-text {
    display: flex;
    flex-direction: column;
    min-width: 0;
    line-height: 1.05;
}

.offcanvas__name {
    font-family: var(--font-heading, inherit);
    font-size: 0.95rem;
    font-weight: 900;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--oc-text);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.offcanvas__tag {
    margin-top: 0.25rem;
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 0.55rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--oc-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.offcanvas__close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.5rem;
    height: 2.5rem;
    flex: 0 0 auto;
    border-radius: 0.85rem;
    color: var(--oc-text);
    background: var(--oc-hover);
    border: 1px solid var(--oc-border);
    transition: background 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.offcanvas__close:hover {
    background: color-mix(in srgb, var(--oc-blue) 16%, transparent);
    border-color: color-mix(in srgb, var(--oc-blue) 45%, transparent);
    transform: rotate(90deg);
}

/* ---------- Zona con scroll ---------- */
.offcanvas__scroll {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 1.1rem 1.1rem;
    scrollbar-width: thin;
    scrollbar-color: color-mix(in srgb, var(--oc-blue) 45%, transparent) transparent;
}

.offcanvas__scroll::-webkit-scrollbar {
    width: 5px;
}

.offcanvas__scroll::-webkit-scrollbar-thumb {
    background: color-mix(in srgb, var(--oc-blue) 45%, transparent);
    border-radius: 999px;
}

/* ---------- Navegación ---------- */
#nav-mobile {
    padding: 0;
    overflow: visible;
}

#nav-mobile > ul {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

#nav-mobile .nav-link {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.95rem 1.05rem;
    margin-bottom: 0.5rem;
    font-size: 16px;
    font-weight: 600;
    line-height: 1.25;
    border-radius: 0.95rem;
    border: 1px solid transparent;
    background: var(--oc-hover);
    color: var(--oc-text) !important;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

#nav-mobile .nav-link::before {
    display: none !important;
}

#nav-mobile .nav-link > span:first-child {
    margin-left: 0;
    flex: 1 1 auto;
    min-width: 0;
}

#nav-mobile .nav-link:hover,
#nav-mobile .nav-item.is-open > .nav-link {
    color: var(--oc-blue-ink) !important;
    background: color-mix(in srgb, var(--oc-blue) 12%, transparent);
    border-color: color-mix(in srgb, var(--oc-blue) 38%, transparent);
}

#nav-mobile .nav-link.is-current {
    color: #fff !important;
    background: linear-gradient(135deg, var(--oc-blue), color-mix(in srgb, var(--oc-blue) 78%, #000));
    border-color: transparent;
    box-shadow: 0 12px 26px -14px color-mix(in srgb, var(--oc-blue) 75%, transparent);
}

#nav-mobile .nav-link:active {
    transform: scale(0.985);
}

#nav-mobile .nav-caret {
    flex: 0 0 auto;
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

#nav-mobile .nav-item.is-open > .nav-link .nav-caret {
    transform: rotate(180deg);
    opacity: 1;
    color: var(--oc-blue);
}

/* ---------- Submenús ---------- */
#nav-mobile .submenu {
    margin: 0 0 0.65rem 0.5rem;
    padding: 0.15rem 0 0.15rem 0.85rem;
    border-left: 2px solid color-mix(in srgb, var(--oc-blue) 40%, transparent);
    background: transparent;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

#nav-mobile .nav-item.is-open > .submenu {
    max-height: 70vh;
}

#nav-mobile .submenu a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.65rem 0.8rem;
    margin-bottom: 0.2rem;
    border-radius: 0.75rem;
    font-size: 14.5px;
    font-weight: 500;
    color: var(--oc-muted);
    background: transparent;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

#nav-mobile .submenu a:hover {
    color: var(--oc-blue-ink) !important;
    background: color-mix(in srgb, var(--oc-blue) 10%, transparent);
    transform: translateX(2px);
}

/* ---------- Contacto rápido e idioma ---------- */
.offcanvas__contact {
    margin-top: 1.25rem;
    padding-top: 1.1rem;
    border-top: 1px solid var(--oc-border);
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.offcanvas__contact-row {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.8rem 0.95rem;
    border-radius: 0.85rem;
    background: var(--oc-hover);
    border: 1px solid transparent;
    color: var(--oc-text);
    font-size: 0.85rem;
    text-decoration: none;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.offcanvas__contact-row svg {
    color: var(--oc-blue);
}

.offcanvas__contact-row:hover {
    background: color-mix(in srgb, var(--oc-blue) 10%, transparent);
    border-color: color-mix(in srgb, var(--oc-blue) 30%, transparent);
}

.offcanvas__lang {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.55rem 0.2rem 0;
}

.offcanvas__lang-label {
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 0.58rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--oc-muted);
}

.offcanvas__lang .lang-switch {
    border-color: var(--oc-border);
}

.offcanvas__lang .lang-switch a {
    color: var(--oc-muted);
    padding: 0.3rem 0.7rem;
}

.offcanvas__lang .lang-switch a.is-active {
    color: #fff;
    background: var(--oc-blue);
}

/* ---------- Pie fijo ---------- */
.offcanvas__foot {
    flex: 0 0 auto;
    padding: 1rem 1.1rem calc(1rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--oc-border);
    background: color-mix(in srgb, var(--oc-bg) 88%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
}

.offcanvas__foot .as-pr-btn-3 {
    width: 100%;
    justify-content: center;
}

.offcanvas__socials {
    display: flex;
    align-items: center;
    gap: 0.45rem;
}

.offcanvas__socials-label {
    margin-right: auto;
    font-family: var(--font-mono, ui-monospace, monospace);
    font-size: 0.55rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--oc-muted);
}

.offcanvas__socials .oc-social {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    flex: 0 0 auto;
    border-radius: 0.7rem;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--oc-text);
    background: var(--oc-hover);
    border: 1px solid var(--oc-border);
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease, border-color 0.2s ease;
}

.offcanvas__socials .oc-social:hover {
    background: var(--oc-blue);
    border-color: var(--oc-blue);
    color: #fff;
    transform: translateY(-2px);
}

.offcanvas__socials .oc-social--wa {
    color: #25d366;
}

.offcanvas__socials .oc-social--wa:hover {
    background: #25d366;
    border-color: #25d366;
    color: #fff;
}

@media (prefers-reduced-motion: reduce) {
    .header-menu-btn,
    .offcanvas__close,
    #nav-mobile .nav-link,
    #nav-mobile .submenu,
    .offcanvas__socials .oc-social {
        transition: none !important;
    }
}





/* ==========================================================================
   Aureolas del hero - en tema claro y/o en movil tinen los bordes laterales
   de la pantalla. Las atenuamos (mantienen presencia, sin ensuciar los
   costados) sin tocar el diseno oscuro original.
   ========================================================================== */
@media (max-width: 768px) {
    .hero-glow { opacity: 0.12 !important; }
}

html[data-theme="light"] .hero-glow { opacity: 0.08 !important; }

@media (max-width: 768px) {
    html[data-theme="light"] .hero-glow { opacity: 0.06 !important; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-glow { filter: none; }
}

@media (max-width: 768px) {
    .hero-glow { display: none !important; }
}
