/* ── RESET ─────────────────────────────────── */
.ops-wrap *,
.ops-wrap *::before,
.ops-wrap *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.ops-wrap {
    font-family: var(--font-body, 'Sora', sans-serif);
}

.ops-topbar {
    background: #003149;
    height: 4px;
    width: 100%;
}

/* ── NAVBAR ─────────────────────────────────── */
.ops-navbar {
    background: #f6f9fb;
    border-bottom: 1px solid #dce5e9;
    padding: 0 clamp(1rem, 2.4vw, 2.5rem);
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 70px;
    flex-wrap: nowrap;
    /* nunca romper a dos líneas */
}

/* LOGO */
.ops-brand img {
    max-width: clamp(120px, 13vw, 170px);
    height: auto;
    display: block;
    flex-shrink: 0;
}

/* HAMBURGER */
.ops-burger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    border-radius: 6px;
    z-index: 1001;
    position: relative;
    flex-shrink: 0;
    -webkit-tap-highlight-color: transparent;
}

.ops-burger span {
    display: block;
    width: 24px;
    height: 2px;
    background: #1a2b38;
    border-radius: 2px;
    margin: 5px 0;
    transition: all 0.25s ease;
}

.ops-burger.open span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.ops-burger.open span:nth-child(2) {
    opacity: 0;
}

.ops-burger.open span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* NAV DESKTOP ── fluido con clamp() */
.ops-nav {
    display: flex;
    align-items: center;
    list-style: none;
    flex: 1;
    justify-content: center;
    flex-wrap: nowrap;
    /* sin wrapping */
    gap: 0;
    overflow: visible;
}

.ops-nav>li {
    position: relative;
}

.ops-nav>li>a,
.ops-nav>li>button {
    color: #1a2b38;
    text-decoration: none;
    /* fluido: 10px en 1100px → 13.5px en 1600px+ */
    font-size: clamp(10px, 0.87vw, 13.5px);
    font-weight: 600;
    /* padding horizontal fluido */
    padding: 24px clamp(4px, 0.55vw, 11px);
    display: flex;
    align-items: center;
    gap: 3px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
    white-space: nowrap;
    border-bottom: 3px solid transparent;
    margin-bottom: -1px;
    transition: color 0.15s;
}

.ops-nav>li>a:hover,
.ops-nav>li>button:hover,
.ops-nav>li:hover>a,
.ops-nav>li:hover>button {
    color: #a70d2d;
    border-bottom-color: #a70d2d;
}

.ops-nav>li.is-active>a,
.ops-nav>li.is-active>button {
    color: #a70d2d !important;
    border-bottom-color: #a70d2d !important;
    font-weight: 700;
}

.ops-arrow {
    font-size: 8px;
    opacity: 0.5;
    transition: transform 0.2s;
    display: inline-block;
}

.ops-nav>li:hover .ops-arrow {
    transform: rotate(180deg);
}

/* DROPDOWN DESKTOP */
.ops-drop {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: #fff;
    border: 1px solid #e8ecef;
    border-top: 2px solid #a70d2d;
    border-radius: 0 0 6px 6px;
    min-width: 220px;
    z-index: 300;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.09);
}

.ops-drop a {
    display: block;
    padding: 10px 16px;
    font-size: 12.5px;
    color: #1a2b38;
    text-decoration: none;
    border-left: 3px solid transparent;
    transition: background 0.1s;
    white-space: normal;
    line-height: 1.4;
}

.ops-drop a:hover,
.ops-drop a.is-active {
    background: #f8f0f2;
    border-left-color: #a70d2d;
    color: #a70d2d;
}

.ops-drop a.is-active {
    font-weight: 600;
}

.ops-nav>li:hover>.ops-drop {
    display: block;
}

/* WEBMAIL DESKTOP ── fluido */
.ops-webmail {
    display: flex;
    align-items: center;
    gap: 7px;
    border: 1.5px solid #003149;
    border-radius: 5px;
    padding: 7px clamp(8px, 0.8vw, 13px);
    background: #fff;
    color: #003149;
    font-size: clamp(10px, 0.78vw, 12px);
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
    flex-shrink: 0;
    margin-left: clamp(4px, 0.6vw, 10px);
    white-space: nowrap;
    font-family: inherit;
    -webkit-tap-highlight-color: transparent;
}

.ops-webmail:hover {
    background: #003149;
    color: #fff;
}

.ops-webmail svg {
    width: 17px;
    height: 13px;
    flex-shrink: 0;
}

/* OVERLAY */
#opsOverlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 998;
}

#opsOverlay.open {
    display: block;
}

/* ── DESPLIEGUE AUTOMÁTICO AL INICIAR SESIÓN ─── */

/* Escritorio: forzamos el dropdown abierto sin necesidad de hover */
.ops-nav>li.ops-force-open>.ops-drop {
    display: block;
    animation: opsForceOpenPop .25s ease;
}

.ops-nav>li.ops-force-open>button {
    color: #a70d2d;
    border-bottom-color: #a70d2d;
}

.ops-nav>li.ops-force-open .ops-arrow {
    transform: rotate(180deg);
}

@keyframes opsForceOpenPop {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Pequeño resalte para llamar la atención mientras está forzado */
.ops-nav>li.ops-force-open>.ops-drop {
    box-shadow: 0 4px 16px rgba(167, 13, 45, 0.18);
}

/* ── MOBILE ( ≤ 1200px ) ────────────────────── */
@media (max-width: 1200px) {

    .ops-burger {
        display: block;
    }

    .ops-webmail-desk {
        display: none !important;
    }

    /* Drawer */
    .ops-nav {
        position: fixed;
        top: 0;
        right: 0;
        width: 290px;
        height: 100%;
        background: #fff;
        flex-direction: column;
        align-items: stretch;
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-y: auto;
        z-index: 999;
        padding-top: 64px;
        padding-bottom: 20px;
        border-left: 2px solid #e8ecef;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.15);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        gap: 0;
    }

    .ops-nav::before {
        content: 'MENU';
        position: absolute;
        top: 18px;
        left: 20px;
        font-size: 10px;
        font-weight: 700;
        letter-spacing: 2px;
        color: #a70d2d;
    }

    .ops-nav.open {
        transform: translateX(0);
    }

    .ops-nav>li {
        width: 100%;
    }

    .ops-nav>li>a,
    .ops-nav>li>button {
        padding: 16px 20px;
        font-size: 15px;
        border-bottom: 1px solid #f0f2f4;
        border-left: 3px solid transparent;
        margin-bottom: 0;
        width: 100%;
        justify-content: space-between;
        border-radius: 0;
        min-height: 52px;
        -webkit-tap-highlight-color: transparent;
    }

    .ops-nav>li.is-active>a,
    .ops-nav>li.is-active>button {
        color: #a70d2d !important;
        border-left-color: #a70d2d !important;
        background: #fdf5f7 !important;
        font-weight: 700;
    }

    .ops-nav>li.mob-open>button {
        color: #a70d2d;
        border-left-color: #a70d2d;
        background: #fdf5f7;
    }

    .ops-arrow {
        font-size: 11px;
    }

    .ops-nav>li.mob-open .ops-arrow {
        transform: rotate(180deg);
    }

    /* Dropdown acordeón */
    .ops-drop {
        position: static;
        display: none;
        border: none;
        border-radius: 0;
        box-shadow: none;
        background: #f8f9fb;
        border-left: 3px solid #a70d2d;
        min-width: 100%;
    }

    .ops-nav>li.mob-open>.ops-drop {
        display: block;
    }

    .ops-drop a {
        padding: 14px 20px 14px 24px;
        font-size: 14px;
        border-left: none;
        border-bottom: 1px solid #eef0f3;
        min-height: 48px;
        display: flex;
        align-items: center;
    }

    .ops-webmail-mob {
        display: flex !important;
        margin: 16px 20px;
        justify-content: center;
    }

    /* En móvil, si viene forzado, también abrimos el drawer completo */
    .ops-nav>li.ops-force-open>.ops-drop {
        display: block;
    }
}

@media (min-width: 1201px) {
    .ops-webmail-mob {
        display: none !important;
    }
}