/* Load after the page stylesheet. Content and navigation remain available without JS. */
.reveal,
.reveal.visible {
    opacity: 1;
    transform: none;
    transition: none;
}

[hidden] { display: none !important; }

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 3px solid #e47c00;
    outline-offset: 4px;
    box-shadow: 0 0 0 2px #fff;
}

button { font: inherit; }
[data-consult] { cursor: pointer; }
.btn-cta,
.btn-card {
    appearance: none;
    justify-content: center;
    line-height: inherit;
}
.btn-card,
.btn-outline { background: transparent; }
.reg-card-foot button {
    flex: 1;
    min-width: 0;
    padding: 10px;
    border-radius: var(--radius-sm, 6px);
    font-size: 14px;
    font-weight: 500;
    text-align: center;
    line-height: inherit;
    transition: all .25s;
}
.float-sidebar button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 56px;
    padding: 12px 4px;
    border: 0;
    background: var(--primary, #1e5fbb);
    color: #fff;
    font-size: 11px;
    text-align: center;
    letter-spacing: .3px;
    line-height: inherit;
    transition: all .25s;
}
.float-sidebar button:first-child { border-radius: var(--radius-sm, 6px) 0 0 0; }
.float-sidebar button:last-child { border-radius: 0 0 0 var(--radius-sm, 6px); }
.float-sidebar button:hover { background: var(--primary-dark, #174b94); width: 62px; }
.float-sidebar button i { font-size: 18px; margin-bottom: 3px; }
.footer button[data-consult] {
    padding: 0;
    border: 0;
    background: transparent;
    color: inherit;
    text-align: inherit;
}
.skip-link {
    position: fixed;
    top: 12px;
    left: 16px;
    z-index: 2000;
    padding: 10px 16px;
    transform: translateY(-200%);
    border-radius: 6px;
    background: #fff;
    color: #17365e;
    font-size: 16px;
    box-shadow: 0 4px 16px rgba(16, 45, 82, .18);
}
.skip-link:focus { transform: none; }
.theme-logo-fallback {
    display: inline-flex;
    align-items: center;
    min-height: 50px;
    color: var(--primary, #1e5fbb);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: 2px;
    line-height: 1.2;
    white-space: nowrap;
}
.nav [data-nav-toggle] { display: none; }
.nav #primary-navigation { display: flex; }
.nav a[aria-current="page"] { background: rgba(255, 255, 255, .14); }

[data-back-to-top] { display: none; border: 0; }
.has-site-js [data-back-to-top] { display: flex; }

#consult-status {
    position: fixed;
    left: 50%;
    bottom: 24px;
    z-index: 1200;
    width: max-content;
    max-width: min(400px, calc(100vw - 32px));
    margin: 0;
    padding: 14px 18px;
    transform: translateX(-50%);
    border: 1px solid #b7cdea;
    border-radius: 10px;
    background: #fff;
    color: #17365e;
    box-shadow: 0 6px 24px rgba(16, 45, 82, .18);
    font-size: 15px;
    line-height: 1.7;
    overflow-wrap: anywhere;
}

details.faq-item { display: block; cursor: auto; }
details.faq-item > summary {
    display: flex;
    align-items: center;
    gap: 14px;
    list-style: none;
    cursor: pointer;
}
details.faq-item > summary::-webkit-details-marker { display: none; }
details.faq-item > summary i { opacity: 1; flex-shrink: 0; }
details.faq-item[open] > summary i { transform: rotate(90deg); }
details.faq-item .faq-answer {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px solid var(--border, #dfe6ef);
    font-weight: 400;
    line-height: 1.85;
}

.mobile-contact { display: none; }

@media (max-width: 1024px) {
    .nav .container { flex-wrap: wrap; }
    .nav #primary-navigation {
        position: static;
        width: 100%;
        flex-direction: column;
        border-radius: 0;
        box-shadow: none;
    }
    .nav.is-enhanced [data-nav-toggle] { display: inline-flex; }
    .nav.is-enhanced #primary-navigation {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        max-height: 65vh;
        overflow-y: auto;
        overscroll-behavior: contain;
        border-radius: 0 0 12px 12px;
        box-shadow: 0 8px 24px rgba(0, 0, 0, .2);
    }
    .nav.is-enhanced #primary-navigation.open { display: flex; }
    .nav #primary-navigation a { min-height: 44px; }
}

@media (max-width: 640px) {
    .reg-card-foot button { font-size: 16px; padding: 12px; }
    .theme-logo-fallback { min-height: 42px; font-size: 25px; }
    /* Server-render this body class too, so fixed contacts reserve space without JS. */
    body.has-mobile-contact { padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px)); }
    .mobile-contact {
        position: fixed;
        inset: auto 0 0;
        z-index: 1000;
        display: flex;
        gap: 10px;
        align-items: stretch;
        padding: 8px 12px calc(8px + env(safe-area-inset-bottom, 0px));
        border-top: 1px solid #dfe6ef;
        background: #fff;
        box-shadow: 0 -4px 16px rgba(16, 45, 82, .08);
    }
    .mobile-contact > a,
    .mobile-contact > button {
        flex: 1;
        min-width: 0;
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        padding: 8px;
        border: 1px solid var(--primary, #1e5fbb);
        border-radius: 8px;
        background: #fff;
        color: var(--primary, #1e5fbb);
        font-size: 15px;
        font-weight: 600;
        text-align: center;
        line-height: 1.4;
        text-decoration: none;
    }
    .mobile-contact > [data-consult] {
        background: var(--primary, #1e5fbb);
        color: #fff;
    }
    body.has-mobile-contact [data-back-to-top] {
        right: 16px;
        bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    }
    body.has-mobile-contact #consult-status {
        bottom: calc(86px + env(safe-area-inset-bottom, 0px));
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto !important; }
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
