@charset "UTF-8";

/*
 * Branding separado:
 * - Navbar: assets/img/branding/navbar/
 * - Footer: assets/img/branding/footer/
 */

/* =========================================================
   NAVBAR — LOGO A LA IZQUIERDA, OPCIONES A LA DERECHA
   ========================================================= */

.site-header .header-inner {
    width: min(calc(100% - 48px), 1500px);
    justify-content: flex-start;
    gap: 18px;
}

.navbar-brand {
    min-width: 0;
    max-width: 240px;
    height: var(--header-height);
    display: flex;
    align-items: center;
    flex: 0 1 auto;
    overflow: visible;
}

.navbar-brand-logo {
    width: auto;
    height: 64px;
    max-width: 220px;
    object-fit: contain;
    object-position: left center;
    filter: drop-shadow(0 7px 18px rgba(91, 45, 150, 0.18));
    transition: transform 180ms ease, filter 180ms ease;
}

.navbar-brand-placeholder {
    width: 112px;
    height: 44px;
    display: block;
    position: relative;
    overflow: hidden;
    border: 1px dashed color-mix(in srgb, var(--color-primary) 34%, var(--color-line));
    border-radius: 14px;
    background:
        linear-gradient(
            135deg,
            color-mix(in srgb, var(--color-primary) 8%, var(--color-surface)),
            color-mix(in srgb, var(--color-surface-2) 86%, transparent)
        );
    opacity: 0.78;
}

.navbar-brand-placeholder::before,
.navbar-brand-placeholder::after {
    content: "";
    position: absolute;
    border-radius: 999px;
    background: color-mix(in srgb, var(--color-primary) 24%, var(--color-line));
}

.navbar-brand-placeholder::before {
    width: 34px;
    height: 8px;
    left: 18px;
    top: 13px;
}

.navbar-brand-placeholder::after {
    width: 54px;
    height: 8px;
    left: 18px;
    top: 25px;
}

.navbar-brand:hover .navbar-brand-logo,
.navbar-brand:focus-visible .navbar-brand-logo {
    transform: translateY(-2px) scale(1.015);
    filter: drop-shadow(0 10px 24px rgba(91, 45, 150, 0.27));
}

.main-nav {
    min-width: 0;
    flex: 1 1 auto;
    justify-content: flex-end;
    margin-left: auto;
    gap: clamp(10px, 1vw, 18px);
}

.main-nav > a:not(.button) {
    flex: 0 0 auto;
    white-space: nowrap;
    font-size: 13.5px;
}

.nav-cta {
    flex: 0 0 auto;
    margin-left: clamp(4px, 0.7vw, 12px);
    white-space: nowrap;
}

/* Compactación antes del menú móvil. */
@media (max-width: 1180px) and (min-width: 901px) {
    .site-header .header-inner {
        width: min(calc(100% - 32px), 1500px);
        gap: 10px;
    }

    .navbar-brand {
        max-width: 180px;
    }

    .navbar-brand-logo {
        height: 55px;
        max-width: 170px;
    }

    .main-nav {
        gap: 8px;
    }

    .main-nav > a:not(.button) {
        font-size: 12.4px;
    }

    .nav-cta {
        min-height: 40px;
        padding: 10px 13px;
        font-size: 11.8px;
    }
}

/*
 * La hoja principal activa hamburguesa a 980 px.
 * Aquí se mantiene el menú de escritorio hasta 901 px.
 */
@media (max-width: 980px) and (min-width: 901px) {
    .menu-toggle {
        display: none !important;
    }

    .main-nav {
        position: static;
        inset: auto;
        padding: 0;
        display: flex !important;
        align-items: center;
        flex-direction: row;
        border: 0;
        border-radius: 0;
        background: transparent;
        box-shadow: none;
    }

    .main-nav > a:not(.button) {
        padding: 8px 0;
    }

    .main-nav > a:not(.button)::after {
        display: block;
    }

    .nav-cta {
        width: auto;
        margin-top: 0;
    }
}

/* =========================================================
   MENÚ MÓVIL
   ========================================================= */

@media (max-width: 900px) {
    .site-header .header-inner {
        width: min(calc(100% - 28px), var(--container));
        justify-content: space-between;
        gap: 12px;
    }

    .navbar-brand {
        height: var(--header-height);
        max-width: min(58vw, 205px);
    }

    .navbar-brand-logo {
        width: auto;
        height: 50px;
        max-width: min(58vw, 195px);
    }

    .navbar-brand-placeholder {
        width: 98px;
        height: 40px;
    }

    .menu-toggle {
        display: grid !important;
        flex: 0 0 46px;
    }

    .main-nav {
        position: fixed;
        inset: var(--header-height) 16px auto;
        margin-left: 0;
        padding: 20px;
        display: none;
        align-items: stretch;
        flex-direction: column;
        gap: 3px;
        border: 1px solid var(--color-line);
        border-radius: 20px;
        background: var(--color-surface);
        box-shadow: var(--shadow-lg);
    }

    .main-nav.is-open {
        display: flex !important;
    }

    .main-nav > a:not(.button) {
        padding: 12px 8px;
        font-size: 14px;
    }

    .main-nav > a:not(.button)::after {
        display: none;
    }

    .nav-cta {
        width: 100%;
        margin: 8px 0 0;
    }
}

@media (max-width: 640px) {
    .navbar-brand {
        max-width: min(62vw, 170px);
    }

    .navbar-brand-logo {
        height: 44px;
        max-width: min(62vw, 165px);
    }

    .navbar-brand-placeholder {
        width: 88px;
        height: 38px;
    }
}

/* =========================================================
   FOOTER — EMOJI INDEPENDIENTE
   ========================================================= */

.footer-brand-line {
    align-items: center;
    gap: 14px;
}

.footer-brand-logo {
    width: 66px;
    height: 66px;
    flex: 0 0 66px;
    object-fit: contain;
    object-position: center;
    filter: drop-shadow(0 8px 20px rgba(0, 0, 0, 0.24));
}

@media (max-width: 640px) {
    .footer-brand-logo {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
    }
}
