html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
    font-family: 'Inter', sans-serif;
    background-color: #ffffff !important;
    color: #111827;
}

.bg-primary-custom {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
}

/* Navbar matches white page background */
.navbar-blur {
    backdrop-filter: blur(12px);
    background-color: #ffffff !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06) !important;
    z-index: 1030;
}

main.flex-grow-1 {
    background-color: #ffffff !important;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.25rem 0;
    position: relative;
    min-height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    height: auto;
    flex: 0 0 auto;
}

.logo .brand-logo {
    height: 52px;
    width: auto;
    max-width: 220px;
    object-fit: contain;
    display: block;
    image-rendering: auto;
}

.brand-logo--footer {
    height: 64px;
    max-width: 260px;
}

/* Crisp vector wordmark — kept as optional fallback, not used in nav */
.equus-wordmark {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    color: #C2B8A3;
    line-height: 1;
    user-select: none;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.equus-wordmark__name {
    font-family: 'Playfair Display', Georgia, 'Times New Roman', serif;
    font-weight: 700;
    font-size: 1.85rem;
    letter-spacing: -0.04em;
    line-height: 0.92;
    text-transform: lowercase;
    color: inherit;
}

.equus-wordmark__tag {
    align-self: flex-end;
    font-family: 'Inter', Arial, Helvetica, sans-serif;
    font-weight: 500;
    font-size: 0.42rem;
    letter-spacing: 0.32em;
    margin-top: 0.2rem;
    margin-right: 0.05em;
    text-transform: uppercase;
    color: inherit;
}

.equus-wordmark--sm .equus-wordmark__name { font-size: 1.35rem; }
.equus-wordmark--sm .equus-wordmark__tag { font-size: 0.32rem; letter-spacing: 0.28em; }

.equus-wordmark--md .equus-wordmark__name { font-size: 1.85rem; }
.equus-wordmark--md .equus-wordmark__tag { font-size: 0.42rem; }

.equus-wordmark--lg .equus-wordmark__name { font-size: 2.5rem; }
.equus-wordmark--lg .equus-wordmark__tag { font-size: 0.55rem; letter-spacing: 0.34em; }

.logo .brand-name {
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #111827 !important;
    line-height: 1;
}

.menu-toggle {
    display: none;
    font-size: 28px;
    cursor: pointer;
    color: #111827;
    z-index: 1001;
    padding: 8px;
}

.nav-center {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 0 0 auto;
    margin-left: auto;
}

.nav-center a {
    color: #5c5346 !important;
    text-decoration: none;
    font-weight: 500;
    padding: 0.4rem 0.85rem;
    border-radius: 0.875rem;
    transition: color 0.2s ease, background-color 0.2s ease;
}

.nav-center a:hover,
.nav-center a.active {
    color: #ffffff !important;
    background-color: var(--primary-color) !important;
}

.nav-right a:hover .profile-picture-nav {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(194, 184, 163, 0.45);
}

.nav-right a {
    transition: transform 0.2s ease;
}

.nav-right a:hover {
    transform: scale(1.05);
}

.btn-header {
    background-color: var(--primary-color) !important;
    color: #ffffff !important;
    padding: 0.5rem 1.5rem;
    border-radius: 0.875rem;
    font-weight: 600;
    border: none;
    transition: background-color 0.2s ease;
}

.btn-header:hover {
    background-color: var(--primary-dark) !important;
    color: #ffffff !important;
}

.close-btn {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 36px;
    color: #ffffff;
    cursor: pointer;
    z-index: 1002;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
}

.card,
.session-card,
.surface-light {
    border-radius: var(--card-radius) !important;
}

/* Bootstrap helpers — keep page white */
.bg-body,
.min-vh-100.bg-white {
    background-color: #ffffff !important;
}

footer.site-footer {
    background-color: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.08) !important;
}

footer a {
    transition: color 0.2s ease;
}

footer a:hover {
    color: var(--primary-dark) !important;
}

.powered-by a {
    color: var(--primary-dark);
}

.powered-by a:hover {
    color: var(--primary-color) !important;
    text-decoration: underline !important;
}

@media (max-width: 767.98px) {
    header.navbar-blur {
        position: sticky;
        overflow: visible;
    }

    header.navbar-blur > .container {
        position: relative;
    }

    nav {
        flex-wrap: nowrap;
        row-gap: 0;
    }

    .menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        margin-left: auto;
        width: 42px;
        height: 42px;
        color: #5c5346;
        border: 1px solid #e5e1d8;
        border-radius: 0.75rem;
        background-color: #ffffff;
        padding: 0;
        z-index: 2;
    }

    .menu-toggle-bars {
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: stretch;
        gap: 4px;
        width: 18px;
        height: 14px;
    }

    .menu-toggle-bars span {
        display: block;
        height: 2px;
        width: 100%;
        border-radius: 1px;
        background-color: currentColor;
    }

    .nav-center {
        display: flex;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        height: auto;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        background-color: #ffffff;
        z-index: 1040;
        padding: 0 1rem;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        box-shadow: 0 12px 28px rgba(0, 0, 0, 0.08);
        transform: translateY(-8px);
        transition:
            max-height 0.4s cubic-bezier(0.22, 1, 0.36, 1),
            opacity 0.3s ease,
            transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
            visibility 0.35s,
            padding 0.35s ease;
        margin-top: 0;
        order: unset;
    }

    .nav-center.active {
        max-height: 480px;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        padding: 0.75rem 1rem 1.15rem;
        transform: translateY(0);
    }

    .nav-center > a {
        color: #6b7280 !important;
        font-size: 1rem;
        font-weight: 500;
        background: transparent !important;
        border-radius: 0;
        padding: 0.85rem 0.25rem;
        width: 100%;
        border-bottom: 2px solid transparent;
    }

    .nav-center > a:hover,
    .nav-center > a.active {
        color: var(--primary-color) !important;
        background-color: transparent !important;
        border-bottom-color: var(--primary-color);
        opacity: 1;
        transform: none;
    }

    .nav-center .mobile-auth {
        width: 100%;
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(0, 0, 0, 0.06);
    }

    .nav-center .mobile-auth .mobile-profile-label {
        color: #5c5346 !important;
    }

    .btn-header {
        background-color: var(--primary-color) !important;
        color: #ffffff !important;
    }

    .btn-header:hover {
        background-color: var(--primary-dark) !important;
        color: #ffffff !important;
    }

    .close-btn {
        display: none !important;
    }
}

/* Pagination: Equus brand taupe instead of Bootstrap blue */
.pagination .page-link {
    color: #C2B8A3;
}
.pagination .page-link:hover {
    color: #A89F8A;
    background-color: rgba(194, 184, 163, 0.12);
    border-color: #dee2e6;
}
.pagination .page-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(194, 184, 163, 0.35);
}
.pagination .page-item.active .page-link {
    background-color: #C2B8A3;
    border-color: #C2B8A3;
    color: #fff;
}
.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
}
