/* ===================================================================
   BASE CSS — Seguro con Bootstrap / Bootstrap Studio
   - No sobreescribe variables ni clases de Bootstrap
   - Solo utilidades y fixes (navbar offset, 100svh, anclas, safe-area)
   =================================================================== */

/* Import scroll animations */
@import url('/assets/css/animations.css');


/* 0) Variables y capas controladas (no pisa Bootstrap) */
:root {
    /* Colores mínimos (ajústalos si quieres) */
    --aw-ink: #111;
    --aw-ink-inv: #fff;
    --aw-muted: rgba(0, 0, 0, .6);

    /* Altura de navbar fija (JS la actualiza). Fallback razonable. */
    --nav-h: 84px;

    /* Viewport seguro en móviles (JS seteará --svh=1% del alto real) */
    --svh: 1vh;

    /* Z-index utilitarios que no chocan con .modal/.offcanvas de BS */
    --z-nav: 1040;
    /* < 1050 (modal) para no tapar modales de BS */
    --z-fab: 1030;
    --z-overlay: 1020;
}

/* 1) Normalizaciones mínimas (sin tocar tipografía o márgenes globales) */
img,
svg,
video,
canvas {
    max-width: 100%;
    height: auto;
}

/* 2) Anclas con offset: cualquier ID “anclable” respetará navbar fija */
[id] {
    scroll-margin-top: calc(var(--nav-h) + 12px);
}

/* 3) Utilidad: sección que debe respetar navbar fija (añade data-nav-offset) */
[data-nav-offset] {
    /* NO uso padding-top fijo; JS mete el valor exacto al cargar y al redimensionar */
    min-height: calc(100 * var(--svh) - var(--nav-h));
}

/* 4) Fix 100vh en iOS/Android: utilidades SVH que puedes usar en layouts */
.aw-min-svh-100 {
    min-height: calc(100 * var(--svh));
}

.aw-h-svh-100 {
    height: calc(100 * var(--svh));
}

/* 5) Contenedor ancho máximo seguro (no pisa .container de Bootstrap) */
.aw-container {
    max-width: 1200px;
    margin-inline: auto;
    padding-inline: clamp(12px, 4vw, 28px);
}

/* 6) Estados de reducción de movimiento: desactiva animaciones fuertes */
@media (prefers-reduced-motion: reduce) {
    :root {
        scroll-behavior: auto;
    }

    * {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

/* 7) Helpers de z-index (no invaden Bootstrap) */
.aw-z-nav {
    z-index: var(--z-nav) !important;
}

.aw-z-fab {
    z-index: var(--z-fab) !important;
}

.aw-z-overlay {
    z-index: var(--z-overlay) !important;
}

/* 8) Botones/links: foco visible (no cambia estilos de BS, solo asegura foco) */
.aw-focus-ring:focus-visible {
    outline: 2px solid rgba(25, 135, 84, .8);
    outline-offset: 2px;
    border-radius: 10px;
}

/* 9) Imagen de fondo cover “estable” (útil para headers) */
.aw-bg-cover {
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
}

/* 10) Fix de click-through en overlays personalizados */
.aw-overlay {
    position: relative;
}

.aw-overlay>.aw-overlay-layer {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

/* 11) Utilidad para bloquear scroll cuando abras menús propios (no BS) */
.aw-no-scroll {
    overflow: hidden !important;
    touch-action: none !important;
}

/* 12) Espaciados safe-area (iPhone con notch) */
.aw-safe-top {
    padding-top: env(safe-area-inset-top, 0);
}

.aw-safe-bottom {
    padding-bottom: env(safe-area-inset-bottom, 0);
}

.aw-safe-left {
    padding-left: env(safe-area-inset-left, 0);
}

.aw-safe-right {
    padding-right: env(safe-area-inset-right, 0);
}


/* ===================================================================
   NAVBAR COMPONENT STYLES
   Moved from components/navbar.html
   =================================================================== */
:root {
    --nav-gap: clamp(16px, 4vw, 28px);
    --pill-max: min(1120px, 88vw);
    --pill-h: 64px;
    --bd: rgba(255, 255, 255, .18);
    --glass1: rgba(255, 255, 255, .10);
    --glass2: rgba(255, 255, 255, .04);
    --shadow: 0 18px 60px rgba(0, 0, 0, .45);
    --ink: #fff;
    --muted: #cfe5ff;
    --accent: #9ed0ff;
}

/* ====== Reset ====== */
#awn,
#awn * {
    box-sizing: border-box;
}

#awn a,
#awn button {
    color: #fff;
    text-decoration: none;
}

/* ==================== DESKTOP ==================== */
.awn-desktop {
    position: fixed;
    top: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    display: none;
    z-index: 1000;
    pointer-events: none;
}

@media (min-width: 992px) {
    .awn-desktop {
        display: block;
    }
}

.awn-pill {
    pointer-events: auto;
    margin: 0 auto;
    height: var(--pill-h);
    max-width: var(--pill-max);
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;
    gap: var(--nav-gap);
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid var(--bd);
    background: linear-gradient(180deg, var(--glass1), var(--glass2));
    backdrop-filter: blur(16px) saturate(140%);
    -webkit-backdrop-filter: blur(16px) saturate(140%);
    box-shadow: var(--shadow);
}

.awn-brand {
    display: inline-flex;
    align-items: center;
    padding-left: 6px;
}

.awn-logo {
    height: 50px;
    width: auto;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .4));
    transition: filter .3s ease;
}

.awn-logo-white {
    filter: brightness(0) invert(1) drop-shadow(0 1px 2px rgba(0, 0, 0, .4));
}

/* Menú con wrap (no se aplasta ni se encime) */
.awn-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    align-items: center;
    gap: clamp(12px, 2.8vw, 28px);
    min-width: 0;
    /* permite wrap sin empujar el logo */
}

.awn-link {
    position: relative;
    font-weight: 700;
    letter-spacing: .2px;
    padding: 8px 2px;
    opacity: .95;
    transition: opacity .15s ease, transform .15s ease;
    white-space: nowrap;
}

.awn-link:hover {
    opacity: 1;
    transform: translateY(-1px);
}

.awn-link::after {
    content: "";
    position: absolute;
    left: 10%;
    right: 90%;
    bottom: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent), #ffffff);
    border-radius: 2px;
    transition: left .18s ease, right .18s ease, opacity .18s ease;
    opacity: 0;
}

.awn-link:hover::after {
    left: 0;
    right: 0;
    opacity: 1;
}

/* Dropdown (solo en desktop) */
.has-dd {
    position: relative;
}

.awn-dd-root {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    min-width: 260px;
    max-width: 420px;
    border: 1px solid var(--bd);
    border-radius: 14px;
    padding: 10px;
    background: rgba(10, 16, 24, .92);
    box-shadow: 0 16px 40px rgba(0, 0, 0, .35), inset 0 1px rgba(255, 255, 255, .08);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .15s ease, visibility .15s step-end, transform .15s ease;
    transform: translateY(-6px);
}

.has-dd.open>.awn-dd-root {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.awn-dd-item {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border-radius: 10px;
    font-weight: 600;
    opacity: .95;
}

.awn-dd-item:hover {
    background: rgba(255, 255, 255, .08);
    opacity: 1;
}

/* ==================== MÓVIL ==================== */
.awn-mobile {
    display: none;
}

@media (max-width: 991.98px) {
    .awn-mobile {
        display: block;
    }
}

/* Logo pill superior (centrado) */
.awn-mobile-logo {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    pointer-events: none;
    /* <- no bloquea */
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, .18);
    background: linear-gradient(180deg, rgba(255, 255, 255, .10), rgba(255, 255, 255, .04));
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    padding: 6px 10px;
    box-shadow: 0 18px 60px rgba(0, 0, 0, .45);
}

.awn-mobile-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    pointer-events: auto;
    /* <- sí recibe click */
    padding: 6px 10px;
    border-radius: 999px;
    text-decoration: none;
}

.awn-mobile-logo-img {
    height: 34px;
    width: auto;
    display: block;
}

/* FAB gota (abre menú) */
.awn-fab {
    position: fixed;
    right: 16px;
    bottom: 18px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    width: 62px;
    height: 72px;
    border-radius: 16px;
    border: 1px solid var(--bd);
    background: linear-gradient(180deg, var(--glass1), var(--glass2));
    backdrop-filter: blur(14px) saturate(140%);
    -webkit-backdrop-filter: blur(14px) saturate(140%);
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform .18s ease, filter .18s ease;
}

.awn-fab:hover {
    transform: translateY(-2px);
    filter: brightness(1.05);
}

.awn-fab-ico {
    width: 30px;
    height: 30px;
    object-fit: contain;
}

.awn-fab-text {
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.9);
    text-transform: uppercase;
}

@media (min-width: 992px) {
    .awn-fab {
        display: none !important;
    }
}


/* Fullscreen sheet */
.awn-sheet[hidden] {
    display: none !important;
}

.awn-sheet {
    position: fixed;
    inset: 0;
    z-index: 1100;
    display: grid;
    grid-template-rows: auto 1fr;
    background: linear-gradient(180deg, rgba(10, 16, 24, .18), rgba(10, 16, 24, .60)), rgba(10, 16, 24, .35);
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    animation: awnFadeIn .22s ease both;
}

@keyframes awnFadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* X animada (no tapa contenido de la lista) */
.awn-close {
    position: absolute;
    top: 14px;
    right: 14px;
    z-index: 1110;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    border: 1px solid var(--bd);
    background: linear-gradient(180deg, var(--glass1), var(--glass2));
    display: grid;
    place-items: center;
    cursor: pointer;
}

.awn-close .x {
    position: relative;
    width: 18px;
    height: 18px;
    display: block;
}

.awn-close .x::before,
.awn-close .x::after {
    content: "";
    position: absolute;
    inset: 0;
    margin: auto;
    width: 18px;
    height: 2px;
    background: #fff;
    border-radius: 2px;
    transform-origin: center;
    transition: transform .18s ease;
}

.awn-close .x::before {
    transform: rotate(45deg);
}

.awn-close .x::after {
    transform: rotate(-45deg);
}

.awn-close:hover .x::before {
    transform: rotate(35deg);
}

.awn-close:hover .x::after {
    transform: rotate(-35deg);
}

/* Lista a la derecha */
.awn-sheet-inner {
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 70px 18px 22px;
}

.awn-sheet-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
    text-align: right;
    width: min(86vw, 520px);
}

.awn-sheet-link,
.awn-sheet-toggle {
    background: transparent;
    border: 0;
    color: #fff;
    cursor: pointer;
    font-weight: 800;
    letter-spacing: .2px;
    font-size: clamp(22px, 6vw, 32px);
    padding: 6px 2px;
    opacity: .95;
    transition: opacity .15s ease, transform .15s ease;
}

.awn-sheet-link:hover,
.awn-sheet-toggle:hover {
    opacity: 1;
    transform: translateX(-2px);
}

.awn-sheet-toggle[aria-expanded="true"] {
    color: var(--accent);
}

.awn-sublist {
    list-style: none;
    margin: 6px 0 2px;
    padding: 0 0 0 0;
    display: none;
    gap: 10px;
}

.awn-subitem {
    display: block;
    color: #dcecff;
    font-weight: 700;
    font-size: clamp(15px, 4.2vw, 18px);
    padding: 4px 0;
    opacity: .95;
}

.awn-subitem:hover {
    opacity: 1;
}

/* ===== Navbar Theme Switching ===== */
/* Light theme (dark text) - used on white/light backgrounds */
#awn.theme-light .awn-link,
#awn.theme-light .awn-dd-toggle {
    color: #0d1b28 !important;
}

#awn.theme-light .awn-dd-item {
    color: #0d1b28 !important;
}

#awn.theme-light .awn-sheet-link,
#awn.theme-light .awn-sheet-toggle,
#awn.theme-light .awn-subitem {
    color: #ffffff !important;
}

/* Dark theme (light text) - used on dark backgrounds - DEFAULT */
#awn.theme-dark .awn-link,
#awn.theme-dark .awn-dd-toggle {
    color: #ffffff !important;
}

#awn.theme-dark .awn-dd-item {
    color: #ffffff !important;
}

#awn.theme-dark .awn-sheet-link,
#awn.theme-dark .awn-sheet-toggle,
#awn.theme-dark .awn-subitem {
    color: #ffffff !important;
}

/* ===== Accesibilidad / estados globales ===== */
.has-nav-open,
.has-nav-open body {
    overflow: hidden !important;
}

/* ================= FIXES SOLICITADOS ================= */

/* 1) Desktop: botón "Productos" sin fondo/blanco en ningún estado */
@media (min-width: 992px) {
    .awn-desktop .awn-dd-toggle {
        background: transparent !important;
        border: 0 !important;
        box-shadow: none !important;
        -webkit-appearance: none;
        appearance: none;
        padding: 8px 2px;
        /* igual que las demás .awn-link */
    }

    .awn-desktop .has-dd.open>.awn-dd-toggle,
    .awn-desktop .awn-dd-toggle:hover,
    .awn-desktop .awn-dd-toggle:active,
    .awn-desktop .awn-dd-toggle:focus,
    .awn-desktop .awn-dd-toggle:focus-visible {
        background: transparent !important;
        outline: none !important;
    }
}

/* 2) Móvil: lista de categorías abajo (inferior derecha, respetando safe-area) */
@media (max-width: 991.98px) {

    /* Asegura padding inferior del contenedor fullscreen */
    .awn-sheet-inner {
        padding: 70px 18px calc(env(safe-area-inset-bottom, 0px) + 22px);
        position: relative;
    }

    /* Pega la lista al fondo */
    .awn-sheet-list {
        position: fixed;
        right: 18px;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 22px);
        width: min(86vw, 520px);
    }
}


/* ===================================================================
   FOOTER COMPONENT STYLES
   Moved from components/footer.html
   =================================================================== */

.aw-footer,
.aw-card .aw-trust {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, .06);
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: 14px;
}

#siteseal {
    display: inline-flex;
    align-items: center;
}

/* ===== Variables ===== */
:root {
    --aw-navy: #102A3B;
    --aw-blue: #329ECE;
    --aw-green: #62A811;
    --blue-bg: radial-gradient(1200px 60% at 50% 0%, rgba(50, 158, 206, .22), transparent 60%),
        linear-gradient(180deg, #0C2C3D 0%, #0A2433 40%, #081C29 100%);
    --glass-border: rgba(255, 255, 255, .22);
    --chip-bg: rgba(255, 255, 255, .10);
    --chip-bg-h: rgba(255, 255, 255, .18);
    --soc-bg: rgba(255, 255, 255, .92);
    --soc-bd: rgba(255, 255, 255, .65);
    --img-shadow: drop-shadow(0 1px 2px rgba(0, 0, 0, .45));
    --slogan-h: clamp(72px, 11vw, 160px);
    --logo-h: clamp(56px, 8vw, 92px);
}

/* ===== Footer ===== */
.wf {
    color: #fff;
    background: transparent;
}

.wf-panel {
    position: relative;
    width: 100vw;
    left: 50%;
    transform: translateX(-50%);
    background: var(--blue-bg);
    border-top: 1px solid rgba(255, 255, 255, .18);
    box-shadow: 0 -10px 32px rgba(0, 0, 0, .25), inset 0 1px rgba(255, 255, 255, .25);
}

.wf-wrap {
    max-width: 1240px;
    margin: 0 auto;
    padding: clamp(22px, 5vw, 40px) clamp(16px, 4vw, 28px);
    display: grid;
    gap: clamp(16px, 2.8vw, 24px);
    grid-template-columns: auto 1fr auto;
    /* brand | slogan | right */
    grid-template-areas:
        "brand slogan right";
    align-items: center;
}


/* Áreas */
.wf-brand {
    grid-area: brand;
    align-self: center;
    display: grid;
    gap: 10px;
}

.wf-slogan-center {
    grid-area: slogan;
    text-align: center;
}

.wf-right {
    grid-area: right;
    display: grid;
    gap: 10px;
    align-content: start;
}

/* Slogan / Logo */
.wf-slogan-img {
    height: var(--slogan-h);
    width: auto;
    filter: var(--img-shadow);
    opacity: .98;
}

.wf-brandlink {
    text-decoration: none;
}

.wf-logo {
    height: var(--logo-h);
    width: auto;
    display: block;
    filter: var(--img-shadow);
}

.wf-tag {
    margin: 0;
    font-size: 14.5px;
    color: rgba(255, 255, 255, .9);
}

/* Teléfonos (arriba a la derecha) */
.wf-phones {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.wf-phone {
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    background: var(--chip-bg);
    border: 1px solid var(--glass-border);
    border-radius: 999px;
    padding: 8px 12px;
}

.wf-phone:hover {
    background: var(--chip-bg-h);
}

/* Legal (debajo de teléfonos) */
.wf-legal {
    text-align: right;
}

.wf-links {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.wf-link {
    color: #eaf3ff;
    text-decoration: none;
    opacity: .95;
    font-size: 14.5px;
}

.wf-link:hover {
    opacity: 1;
    text-decoration: underline dotted;
}

.wf-dot {
    opacity: .7;
    color: #d6e7ff;
}

.wf-copyr {
    margin: .25rem 0 0;
    font-size: 14px;
    color: #d6e7ff;
    opacity: .95;
}

/* Redes (hasta abajo a la derecha) */
.wf-social {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
}

.wf-soc {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    color: #0b1c2b;
    background: var(--soc-bg);
    border: 1px solid var(--soc-bd);
    box-shadow: 0 8px 18px rgba(0, 0, 0, .18), inset 0 1px rgba(255, 255, 255, .65);
    transition: transform .15s ease, opacity .15s ease;
    text-decoration: none;
    opacity: .95;
}

.wf-soc:hover {
    transform: translateY(-2px);
    opacity: 1;
}

.wf-soc svg {
    width: 18px;
    height: 18px;
}

/* Responsivo */
@media (max-width: 991.98px) {
    .wf-wrap {
        grid-template-columns: 1fr;
        grid-template-areas:
            "slogan"
            "brand"
            "right";
        gap: 12px;
    }

    .wf-brand {
        justify-self: center;
        text-align: center;
    }

    .wf-right {
        justify-items: stretch;
        width: 100%;
    }

    .wf-phones {
        justify-content: center;
    }

    .wf-legal {
        text-align: center;
    }

    .wf-social {
        justify-content: center;
    }

    :root {
        --slogan-h: clamp(64px, 18vw, 150px);
        --logo-h: clamp(52px, 14vw, 88px);
    }

    /* FIX extra para centrar todo en móvil si algo falla */
    /* REMOVED: .wf-panel { left: 0; transform: none; width: 100%; } */

}

/* Evita scroll horizontal por el full-bleed */
body {
    overflow-x: hidden;
}

#site-footer img {
    display: inline-block;
    max-width: 100%;
    height: auto;
}

@media (prefers-reduced-motion: reduce) {
    .wf-soc {
        transition: none !important;
    }
}

/* ===== Bento Grid Redesign (6 items) ===== */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr) !important;
    /* Override inline styles or other css */
    gap: 20px;
}

@media (max-width: 992px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr !important;
    }
}

.bx {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    min-height: 400px;
    background: #102a3b;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    grid-column: span 1;
    grid-row: span 1;
}

/* ===== Bento Grid Spans (Desktop/Tablet) ===== */
@media (min-width: 768px) {
    .bx--col-2 {
        grid-column: span 2;
    }

    .bx--row-2 {
        grid-row: span 2;
    }
}

.bx:hover {
    transform: translateY(-5px) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.3);
}

.bx-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover !important;
    z-index: 0;
    transition: transform 0.5s ease;
    max-width: none !important;
    /* Override potential global img styles */
    max-height: none !important;
}

.bx:hover .bx-bg {
    transform: scale(1.05);
}

.bx-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(6, 20, 38, 0.95) 0%, rgba(6, 20, 38, 0.6) 40%, rgba(6, 20, 38, 0.2) 100%);
    z-index: 1;
}

.bx-inner {
    position: relative;
    z-index: 2;
    padding: 24px;
    color: #fff;
}

.bx h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    color: #fff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.bx p {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.5;
    margin: 0;
}

/* Hide old asset container if present */
.bx-asset {
    display: none !important;
}

/* ===== Page Specific Overrides ===== */
/* #page-servicios .aw-hero handled inline in HTML */