/* IMMFIMA Navigation V5 */

:root {
    --ifm5-blue: #0b4d78;
    --ifm5-blue-dark: #073653;
    --ifm5-gold: #d4a12a;
    --ifm5-gold-dark: #ae7b10;
    --ifm5-text: #172338;
    --ifm5-muted: #657086;
    --ifm5-line: #dce4ee;
}

.ifm5-header,
.ifm5-header *,
.ifm5-header *::before,
.ifm5-header *::after,
.ifm5-drawer,
.ifm5-drawer *,
.ifm5-drawer *::before,
.ifm5-drawer *::after,
.ifm5-backdrop {
    box-sizing: border-box;
}

.ifm5-header {
    position: sticky;
    top: 10px;
    z-index: 1200;
    width: calc(100% - 28px);
    margin: 10px auto 0;
}

.ifm5-header__shell {
    width: min(1540px, 100%);
    margin-inline: auto;
    overflow: hidden;
    border: 1px solid var(--ifm5-line);
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 10px 30px rgba(20, 42, 70, 0.09);
    backdrop-filter: blur(14px);
}

.ifm5-header__top {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 104px;
    padding: 12px 22px;
}

.ifm5-brand {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    min-width: 0;
    color: var(--ifm5-text);
    text-decoration: none;
}

.ifm5-brand__logo {
    display: block;
    width: 82px;
    height: 82px;
    flex: 0 0 82px;
    object-fit: cover;
    border-radius: 18px;
}

.ifm5-brand__text {
    display: flex;
    min-width: 0;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
}

.ifm5-brand__text strong {
    margin: 0;
    color: #14243b;
    font-size: 1.55rem;
    font-weight: 850;
    line-height: 1;
    letter-spacing: 0.09em;
    white-space: nowrap;
}

.ifm5-brand__text small {
    margin: 0;
    color: #394a60;
    font-size: 1rem;
    line-height: 1.25;
    white-space: nowrap;
}

.ifm5-appointment {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 50px;
    padding: 12px 22px;
    border-radius: 999px;
    color: #fff;
    background: linear-gradient(135deg, var(--ifm5-gold), var(--ifm5-gold-dark));
    box-shadow: 0 8px 20px rgba(174, 123, 16, 0.24);
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
}

.ifm5-appointment--desktop {
    margin-left: auto;
}

.ifm5-toggle {
    display: none;
}

.ifm5-desktop-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(8px, 1.5vw, 24px);
    min-height: 66px;
    padding: 8px 20px;
    border-top: 1px solid var(--ifm5-line);
}

.ifm5-desktop-nav > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 9px 12px;
    border: 1px solid transparent;
    border-radius: 11px;
    color: var(--ifm5-text);
    font-size: 0.96rem;
    font-weight: 700;
    text-decoration: none;
    white-space: nowrap;
}

.ifm5-desktop-nav > a:hover,
.ifm5-desktop-nav > a:focus-visible,
.ifm5-desktop-nav > a.is-active {
    color: var(--ifm5-blue);
    background: #eef5f9;
    border-color: #cfdee9;
}

.ifm5-backdrop {
    position: fixed;
    inset: 0;
    z-index: 1500;
    visibility: hidden;
    background: rgba(4, 17, 32, 0.48);
    opacity: 0;
    pointer-events: none;
    transition: opacity 220ms ease, visibility 220ms ease;
}

.ifm5-backdrop.is-open {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

.ifm5-drawer {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 1600;
    display: flex;
    flex-direction: column;
    width: min(430px, 100%);
    height: 100dvh;
    overflow-y: auto;
    padding: 24px;
    border-left: 1px solid var(--ifm5-line);
    background: rgba(255, 255, 255, 0.995);
    box-shadow: -24px 0 64px rgba(7, 42, 79, 0.20);
    transform: translateX(102%);
    visibility: hidden;
    pointer-events: none;
    transition: transform 260ms ease, visibility 260ms ease;
}

.ifm5-drawer.is-open {
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
}

.ifm5-drawer__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ifm5-line);
}

.ifm5-drawer__eyebrow {
    display: inline-block;
    margin-bottom: 6px;
    color: var(--ifm5-gold-dark);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.ifm5-drawer__head h2 {
    margin: 0;
    color: var(--ifm5-blue-dark);
    font-size: 1.55rem;
}

.ifm5-drawer__close {
    position: relative;
    display: inline-grid;
    width: 48px;
    height: 48px;
    flex: 0 0 48px;
    place-items: center;
    border: 1px solid var(--ifm5-line);
    border-radius: 14px;
    color: var(--ifm5-blue);
    background: #fff;
    cursor: pointer;
}

.ifm5-drawer__close span {
    position: absolute;
    width: 24px;
    height: 3px;
    border-radius: 999px;
    background: currentColor;
}

.ifm5-drawer__close span:first-child {
    transform: rotate(45deg);
}

.ifm5-drawer__close span:last-child {
    transform: rotate(-45deg);
}

.ifm5-drawer__nav {
    display: grid;
    gap: 6px;
    padding: 20px 0;
}

.ifm5-drawer__nav > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 54px;
    padding: 13px 15px;
    border: 1px solid transparent;
    border-radius: 14px;
    color: var(--ifm5-text);
    font-size: 1rem;
    font-weight: 800;
    text-decoration: none;
}

.ifm5-drawer__nav > a:hover,
.ifm5-drawer__nav > a:focus-visible,
.ifm5-drawer__nav > a.is-active {
    border-color: rgba(212, 161, 42, 0.32);
    background: rgba(212, 161, 42, 0.10);
}

.ifm5-drawer__footer {
    display: grid;
    gap: 16px;
    margin-top: auto;
    padding-top: 20px;
    border-top: 1px solid var(--ifm5-line);
}

.ifm5-drawer__contact-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
}

.ifm5-drawer__contact-grid > a {
    display: grid;
    min-height: 106px;
    place-items: center;
    gap: 3px;
    padding: 12px 8px;
    border: 1px solid var(--ifm5-line);
    border-radius: 15px;
    color: var(--ifm5-text);
    background: #fff;
    text-align: center;
    text-decoration: none;
}

.ifm5-drawer__contact-grid > a > span {
    font-size: 1.3rem;
}

.ifm5-drawer__contact-grid strong {
    font-size: 0.84rem;
}

.ifm5-drawer__contact-grid small {
    color: var(--ifm5-muted);
    font-size: 0.69rem;
}

.ifm5-drawer__meta {
    display: flex;
    justify-content: center;
    gap: 18px;
}

.ifm5-drawer__meta a {
    color: var(--ifm5-muted);
    font-size: 0.82rem;
    font-weight: 700;
    text-decoration: none;
}

body.ifm5-menu-open {
    overflow: hidden;
}

@media (max-width: 1320px) {
    .ifm5-desktop-nav,
    .ifm5-appointment--desktop {
        display: none;
    }

    .ifm5-toggle {
        display: inline-grid;
        width: 56px;
        height: 56px;
        margin-left: auto;
        place-items: center;
        border: 1px solid var(--ifm5-line);
        border-radius: 14px;
        color: var(--ifm5-blue);
        background: #fff;
        cursor: pointer;
    }

    .ifm5-toggle__bars {
        position: relative;
        display: block;
        width: 26px;
        height: 20px;
    }

    .ifm5-toggle__bars span {
        position: absolute;
        left: 0;
        width: 100%;
        height: 3px;
        border-radius: 999px;
        background: currentColor;
    }

    .ifm5-toggle__bars span:nth-child(1) { top: 0; }
    .ifm5-toggle__bars span:nth-child(2) { top: 8px; }
    .ifm5-toggle__bars span:nth-child(3) { top: 16px; }
}

@media (max-width: 760px) {
    .ifm5-header {
        top: 5px;
        width: calc(100% - 14px);
        margin-top: 6px;
    }

    .ifm5-header__shell {
        border-radius: 16px;
    }

    .ifm5-header__top {
        min-height: 78px;
        padding: 9px 12px;
    }

    .ifm5-brand {
        gap: 11px;
    }

    .ifm5-brand__logo {
        width: 58px;
        height: 58px;
        flex-basis: 58px;
        border-radius: 13px;
    }

    .ifm5-brand__text strong {
        font-size: 1.15rem;
    }

    .ifm5-brand__text small {
        font-size: 0.85rem;
    }

    .ifm5-toggle {
        width: 50px;
        height: 50px;
        flex: 0 0 50px;
    }

    .ifm5-drawer {
        width: 100%;
        padding: 18px;
        border-left: 0;
    }

    .ifm5-drawer__contact-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 430px) {
    .ifm5-brand__text small {
        display: none;
    }
}
