/* Site95 shared navigation — desktop dropdowns + mobile burger
   Dropdowns open via .is-open (JS hover + click). No pure-CSS hover gap. */

.site-header {
    position: relative;
    z-index: 100;
}

.site-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: nowrap;
}

.site-nav {
    display: none;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.15rem 0.35rem;
    font-size: 0.82rem;
    font-weight: 500;
    max-width: min(52rem, 78vw);
}

.site-nav .nav-link,
.site-nav > a.nav-link {
    color: #475569;
    transition: color 0.15s, background 0.15s;
    white-space: nowrap;
    text-decoration: none;
    padding: 0.45rem 0.55rem;
    border-radius: 0.4rem;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.site-nav .nav-link:hover,
.site-nav .nav-link:focus-visible,
.site-nav .nav-item.is-open > .nav-link {
    color: #dc2626;
    background: #fef2f2;
}

.site-nav .nav-link.is-active,
.site-nav .nav-item.is-active > .nav-link {
    color: #dc2626;
    font-weight: 600;
}

.nav-caret {
    font-size: 0.6rem;
    opacity: 0.7;
    transition: transform 0.15s;
}

.nav-item.has-dropdown {
    position: relative;
}

.nav-item.has-dropdown.is-open .nav-caret {
    transform: rotate(180deg);
}

/* Panel sits flush under the label — invisible hit area bridges to items */
.nav-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 13.5rem;
    max-width: min(18rem, 90vw);
    max-height: min(70vh, 28rem);
    /* Transparent padding on top = bridge so mouse never leaves the item */
    padding: 0.35rem 0 0;
    margin: 0;
    background: transparent;
    border: none;
    box-shadow: none;
    z-index: 200;
}

/* Keep right-side menus on screen */
.site-nav .nav-item.has-dropdown:nth-last-child(-n+2) .nav-dropdown {
    left: auto;
    right: 0;
}

.nav-item.has-dropdown.is-open .nav-dropdown {
    display: block;
}

.nav-dropdown-inner {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    padding: 0.4rem;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
    max-height: min(65vh, 26rem);
    overflow-y: auto;
}

.nav-dropdown a {
    display: block;
    padding: 0.55rem 0.75rem;
    border-radius: 0.4rem;
    color: #334155;
    font-size: 0.85rem;
    font-weight: 500;
    text-decoration: none;
    white-space: nowrap;
}

.nav-dropdown a:hover,
.nav-dropdown a:focus-visible {
    background: #f8fafc;
    color: #dc2626;
}

.menu-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #64748b;
    font-size: 1.25rem;
    padding: 0.4rem 0.5rem;
    background: transparent;
    border: none;
    border-radius: 0.4rem;
    cursor: pointer;
    line-height: 1;
}

.menu-toggle:hover,
.menu-toggle:focus-visible {
    color: #dc2626;
    background: #fef2f2;
}

.menu-toggle[aria-expanded="true"] {
    color: #dc2626;
}

.mobile-menu {
    display: none;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0.35rem 1.25rem 1rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.95rem;
    background: #fff;
    max-height: min(80vh, 34rem);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.mobile-menu.is-open {
    display: flex;
}

.mobile-menu a {
    color: #334155;
    padding: 0.6rem 0.2rem;
    border-bottom: 1px solid #f8fafc;
    text-decoration: none;
}

.mobile-menu a:hover,
.mobile-menu a:focus-visible {
    color: #dc2626;
}

.mobile-menu-label {
    display: block;
    margin-top: 0.75rem;
    margin-bottom: 0.1rem;
    padding-top: 0.45rem;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #94a3b8;
    border-top: 1px solid #f1f5f9;
}

.mobile-menu-label:first-child {
    margin-top: 0.2rem;
    border-top: none;
    padding-top: 0;
}

.mobile-menu-sub {
    padding-left: 0.85rem !important;
    font-size: 0.9rem;
    color: #64748b !important;
}

.mobile-menu-hint {
    margin: 0.75rem 0 0.25rem;
    font-size: 0.78rem;
    color: #94a3b8;
    line-height: 1.4;
}

/* Full footer link grid (shared) — 6 columns of all tools */
.site-footer .site-footer-full.footer-grid,
.site-footer-full.footer-grid {
    display: grid;
    width: 100%;
    gap: 1.5rem 1.25rem;
    grid-template-columns: 1fr;
}

@media (min-width: 560px) {
    .site-footer .site-footer-full.footer-grid,
    .site-footer-full.footer-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 900px) {
    .site-footer .site-footer-full.footer-grid,
    .site-footer-full.footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1200px) {
    .site-footer .site-footer-full.footer-grid,
    .site-footer-full.footer-grid {
        grid-template-columns: repeat(6, 1fr);
    }
}

.site-footer-full .footer-col h3 {
    margin-bottom: 0.65rem;
}

.site-footer-full ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.site-footer-full li {
    margin: 0.3rem 0;
}

.site-footer-full a {
    color: #94a3b8;
    text-decoration: none;
    font-size: 0.875rem;
}

.site-footer-full a:hover {
    color: #fff;
}


@media (min-width: 768px) {
    .site-nav {
        display: flex !important;
    }
    .menu-toggle {
        display: none !important;
    }
    .mobile-menu,
    .mobile-menu.is-open {
        display: none !important;
    }
}

@media (min-width: 1024px) {
    .site-nav {
        gap: 0.2rem 0.45rem;
        font-size: 0.88rem;
        max-width: none;
    }
    .site-nav .nav-link {
        padding: 0.5rem 0.65rem;
    }
}
