/* Sticky site header + integrated nav search */
.site-header {
    position: sticky;
    top: 0;
    z-index: 999;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: none;
    padding: 0.625rem 0.625rem 0;
    transition: box-shadow 0.25s ease;
}
.site-header.is-scrolled {
    box-shadow: none;
}
.site-nav {
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid rgba(229, 231, 235, 0.95);
    border-radius: 9999px;
    padding: 0.45rem 0.65rem;
    box-shadow:
        0 4px 16px rgba(17, 24, 39, 0.08),
        0 1px 3px rgba(17, 24, 39, 0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease, padding 0.35s ease;
}
.site-header.is-scrolled .site-nav {
    box-shadow:
        0 10px 32px rgba(17, 24, 39, 0.14),
        0 4px 10px rgba(17, 24, 39, 0.08);
    transform: translateY(1px);
}
.site-header.search-active .site-nav {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
}
@media (min-width: 768px) {
    .site-header {
        padding: 0.75rem 1.25rem 0;
    }
    .site-nav {
        padding: 0.65rem 1.25rem;
    }
    .site-header.search-active .site-nav {
        padding-top: 0.65rem;
        padding-bottom: 0.65rem;
    }
}
@media (min-width: 1024px) {
    .site-header {
        padding: 1rem 2rem 0;
    }
    .site-nav {
        padding: 0.75rem 1.75rem;
    }
    .site-header.search-active .site-nav {
        padding-top: 0.75rem;
        padding-bottom: 0.75rem;
    }
}
.nav-center {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}
.nav-cluster {
    display: none;
    align-items: center;
    background: #f3f4f6;
    border-radius: 9999px;
    padding: 0.375rem;
    gap: 0;
    max-width: 100%;
    min-width: 0;
    overflow: hidden;
    transition: box-shadow 0.35s ease;
}
@media (min-width: 768px) {
    .nav-cluster {
        display: flex;
    }
}
.site-header.search-active .nav-cluster {
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.18);
}
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    flex-shrink: 0;
}
.nav-links a {
    padding: 0.5rem 1.25rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    color: #4b5563;
    text-decoration: none;
    white-space: nowrap;
    transition: color 0.2s ease, background 0.2s ease;
}
.nav-links a:hover {
    color: #111827;
    background: #e5e7eb;
}
.nav-search-divider {
    width: 1px;
    height: 1.5rem;
    background: #d1d5db;
    margin: 0 0.125rem;
    flex-shrink: 0;
    opacity: 0;
    transform: scaleY(0.4);
    transition: opacity 0.35s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.site-header.search-active .nav-search-divider {
    opacity: 1;
    transform: scaleY(1);
}
.sticky-search {
    display: flex;
    align-items: center;
    max-width: 0;
    min-width: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    transition: max-width 0.45s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.sticky-search.visible {
    max-width: 13.5rem;
    flex: 0 1 13.5rem;
    opacity: 1;
    pointer-events: auto;
}
.sticky-search-form {
    display: flex;
    align-items: center;
    width: max-content;
    max-width: 13.5rem;
    min-width: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    overflow: hidden;
    padding: 0 0.25rem 0 0.35rem;
    box-shadow: none;
}
.sticky-search-form:focus-within {
    box-shadow: none;
}
.sticky-search-form input {
    flex: 0 1 auto;
    width: 7.5rem;
    min-width: 0;
    padding: 0.5rem 0.4rem;
    background: transparent;
    border: none;
    outline: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: #111827;
    opacity: 0;
    transition: opacity 0.25s ease 0.12s;
}
.sticky-search.visible .sticky-search-form input {
    opacity: 1;
}
.sticky-search-form input::placeholder {
    color: #9ca3af;
}
.sticky-search-form button {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 9999px;
    background: #f59e0b;
    color: #111827;
    font-size: 0.875rem;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    opacity: 0;
    transform: translateX(6px);
    transition: filter 0.2s ease, transform 0.35s cubic-bezier(0.4, 0, 0.2, 1) 0.08s,
                opacity 0.3s ease 0.08s;
}
.sticky-search.visible .sticky-search-form button {
    opacity: 1;
    transform: translateX(0);
}
.sticky-search-form button:hover {
    filter: brightness(1.05);
}
@media (min-width: 768px) and (max-width: 1279px) {
    .nav-links a {
        padding: 0.45rem 0.75rem;
        font-size: 0.8125rem;
    }
    .sticky-search.visible {
        max-width: 9.25rem;
        flex: 0 1 9.25rem;
    }
    .sticky-search-form {
        max-width: 9.25rem;
        padding: 0 0.125rem 0 0.25rem;
    }
    .sticky-search-form input {
        width: 6.5rem;
        padding: 0.5rem 0.3rem;
        font-size: 0.8125rem;
    }
    .sticky-search-btn-label {
        display: none;
    }
    .sticky-search-form button {
        padding: 0.5rem 0.625rem;
        gap: 0;
    }
}
@media (min-width: 768px) and (max-width: 900px) {
    .nav-links a {
        padding: 0.4rem 0.55rem;
        font-size: 0.75rem;
    }
    .sticky-search.visible {
        max-width: 8.75rem;
        flex: 0 1 8.75rem;
    }
    .sticky-search-form {
        max-width: 8.75rem;
    }
    .sticky-search-form input {
        width: 6rem;
    }
}
.nav-login-btn {
    transition: padding 0.3s ease, gap 0.3s ease, opacity 0.3s ease,
                width 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                min-width 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
@media (max-width: 767px) {
    input,
    select,
    textarea {
        font-size: 16px !important;
    }
    .nav-center {
        display: none;
    }
    .nav-end {
        flex: 1;
        min-width: 0;
        justify-content: flex-end;
    }
    .nav-login-btn {
        display: none;
    }
    .mobile-sticky-search {
        display: flex;
        align-items: center;
        flex: 0 0 auto;
        max-width: 2.25rem;
        min-width: 2.25rem;
        opacity: 1;
        pointer-events: auto;
    }
    .mobile-sticky-search-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 2.25rem;
        height: 2.25rem;
        border-radius: 9999px;
        background: #f59e0b;
        color: #111827;
        text-decoration: none;
        flex-shrink: 0;
        transition: filter 0.2s ease, transform 0.2s ease;
    }
    .mobile-sticky-search-btn:hover {
        filter: brightness(1.05);
    }
    .mobile-sticky-search-btn:active {
        transform: scale(0.96);
    }
    .mobile-sticky-search-btn .material-icons-round {
        font-size: 1.125rem;
    }
    body.mobile-menu-open .mobile-sticky-search {
        pointer-events: auto;
    }
    body.mobile-menu-open .site-nav {
        border-bottom-left-radius: 1.25rem;
        border-bottom-right-radius: 1.25rem;
    }
    #mobile-menu {
        margin: 0.5rem 0.625rem 0;
        border-radius: 1.25rem;
        border: 1px solid #e5e7eb;
        box-shadow: 0 10px 28px rgba(17, 24, 39, 0.12);
        overflow: hidden;
    }
}
@media (min-width: 768px) {
    .mobile-sticky-search {
        display: none;
    }
}
/* Wordmark */
@media (max-width: 360px) {
    .site-wordmark { display: none; }
}
