html {
    scroll-behavior: smooth;
    overflow-x: hidden;
    max-width: 100%;
}

.bg-primary-custom {
    background-color: #215A36;
}

.navbar-blur {
    backdrop-filter: blur(10px);
    background-color: rgba(255, 255, 255, 0.95);
}

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

img,
video,
svg {
    max-width: 100%;
    height: auto;
}

/* White theme: keep Bootstrap surfaces on white */
.bg-white,
.card,
.card-header,
.card-footer,
.modal-content {
    background-color: #FFFFFF !important;
}

.bg-light {
    background-color: #F3F4F6 !important;
}

main.flex-grow-1 {
    background-color: #FFFFFF;
}

.dropdown-menu {
    background-color: #FFFFFF !important;
    border: 1px solid #E5E7EB !important;
    box-shadow: 0 10px 28px rgba(33, 90, 54, 0.12) !important;
    border-radius: 0.75rem !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: rgba(33, 90, 54, 0.1) !important;
    color: #215A36 !important;
}

/* Custom Navbar Styles */
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 img {
    max-height: 72px;
    max-width: 200px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.menu-toggle {
    display: none;
    cursor: pointer;
    color: #111827;
    z-index: 1002;
    padding: 8px;
    width: 40px;
    height: 40px;
    align-items: center;
    justify-content: center;
}

.menu-toggle-icon {
    display: block;
    width: 22px;
    height: 2px;
    background: #111827;
    position: relative;
    transition: background 0.2s ease;
}

.menu-toggle-icon::before,
.menu-toggle-icon::after {
    content: "";
    position: absolute;
    left: 0;
    width: 22px;
    height: 2px;
    background: #111827;
    transition: transform 0.25s ease, top 0.25s ease;
}

.menu-toggle-icon::before { top: -7px; }
.menu-toggle-icon::after { top: 7px; }

.menu-toggle.is-open .menu-toggle-icon {
    background: transparent;
}

.menu-toggle.is-open .menu-toggle-icon::before {
    top: 0;
    transform: rotate(45deg);
}

.menu-toggle.is-open .menu-toggle-icon::after {
    top: 0;
    transform: rotate(-45deg);
}

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

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.nav-mobile-auth {
    display: none;
}

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

.nav-center a,
.nav-links a {
    color: #6b7280;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-center a:hover,
.nav-links a:hover {
    color: #215A36;
}

.nav-right a:hover .profile-picture-nav {
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(33, 90, 54, 0.4);
}

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

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

.btn-header {
    background-color: #215A36;
    color: #ffffff !important;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    transition: background-color 0.2s ease;
}

.btn-header:hover {
    background-color: #1A4729;
}

/* Mobile: dropdown under header (like reference) */
@media (max-width: 767.98px) {
    header.sticky-top {
        overflow: visible;
    }

    .menu-toggle {
        display: flex;
        margin-left: auto;
    }

    nav {
        position: static;
    }

    .nav-center {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        transform: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        background-color: #FFFFFF;
        border-bottom: 1px solid #E5E7EB;
        box-shadow: 0 14px 28px rgba(17, 24, 39, 0.08);
        z-index: 1000;
        max-height: 0;
        overflow: hidden;
        opacity: 0;
        visibility: hidden;
        padding: 0 1.25rem;
        transition: max-height 0.35s ease, opacity 0.25s ease, padding 0.35s ease, visibility 0.25s;
    }

    .nav-center.active {
        max-height: min(70vh, 520px);
        opacity: 1;
        visibility: visible;
        padding: 0.35rem 1.25rem 1.35rem;
        overflow-y: auto;
    }

    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        width: 100%;
    }

    .nav-links a {
        color: #6b7280;
        font-size: 1.2rem;
        font-weight: 500;
        padding: 0.95rem 0;
        text-align: left;
        border-bottom: 1px solid transparent;
        transition: color 0.2s ease;
    }

    .nav-links a:hover {
        color: #215A36;
        opacity: 1;
        transform: none;
    }

    .nav-mobile-auth {
        display: block;
        margin-top: 1.25rem;
        padding-top: 1.15rem;
        border-top: 1px solid #E5E7EB;
        width: 100%;
    }

    .nav-profile-link {
        color: #111827;
    }

    .nav-profile-link:hover {
        color: #215A36;
    }

    .btn-header {
        background-color: #215A36;
        color: #ffffff !important;
    }

    .btn-header:hover {
        background-color: #1A4729;
    }
}

footer a {
    transition: color 0.2s ease;
}

footer a:hover {
    color: #215A36 !important;
}

/* Keep contrast accents on green surfaces */
.bg-on-primary,
.rounded-circle.bg-white {
    background-color: #FFFFFF !important;
}

/* Pagination: use brand green instead of Bootstrap blue */
.pagination .page-link {
    color: #215A36;
}
.pagination .page-link:hover {
    color: #215A36;
    background-color: rgba(33, 90, 54, 0.08);
    border-color: #dee2e6;
}
.pagination .page-link:focus {
    box-shadow: 0 0 0 0.2rem rgba(33, 90, 54, 0.25);
}
.pagination .page-item.active .page-link {
    background-color: #215A36;
    border-color: #215A36;
    color: #fff;
}
.pagination .page-item.disabled .page-link {
    color: #6c757d;
    background-color: #fff;
}
