/* Header Navigation Styles */
html{
    scroll-behavior: smooth;
}
.navbar-main {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 0.8rem 0;
    background: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition:
            background-color 0.3s ease,
            box-shadow 0.3s ease,
            padding 0.3s ease;
    height: auto;
}

.navbar-main .container {
    margin-bottom: 0 !important;
    padding-bottom: 0 !important;
}

.navbar-collapse {
    align-items: center;
}

body {
    padding-top: 80px;
    overflow-x: hidden;
}

.header {
    margin-top: 0;
}

.nav-item {
    margin-left: 1rem;
    margin-right: 1rem;
}

.navbar-main.is-scrolled {
    background-color: #fff !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
}

.navbar-brand img {
    height: 40px;
    width: auto;
}

.navbar-nav {
    gap: 1rem;
}

.nav-link {
    color: #333;
    font-weight: 500;
    padding: 0.5rem 1rem;
    transition: color 0.3s ease;
}

.navbar-main.is-scrolled .nav-link {
    color: #333;
}

.nav-link:hover {
    border-bottom: 2px solid #cccdcd;
}

.navbar-main .nav-link:hover {
    color: #333;
}

.navbar-main.is-scrolled .nav-link:hover {
    color: #333;
}

.nav-link.active {
    color: #cccdcd;
    font-weight: 600;
}

.nav-link:active,
.nav-link:focus {
    color: inherit;
}

.navbar-main .nav-link:active,
.navbar-main .nav-link:focus {
    color: #333;
}

.navbar-main.is-scrolled .nav-link:active,
.navbar-main.is-scrolled .nav-link:focus {
    color: #333;
}

.dropdown .btn {
    font-size: 0.95rem;
    font-weight: 500;
    background-color: transparent;
    border-color: #333;
    color: #333;
    transition: all 0.3s ease;
    padding: 0.5rem 1rem;
}

.navbar-main.is-scrolled .dropdown .btn {
    background-color: transparent;
    border-color: #333;
    color: #333;
}

.dropdown .btn:hover {
    background-color: rgba(0, 123, 255, 0.1);
    border-color: #cccdcd;
    color: #cccdcd;
}

.dropdown-menu {
    min-width: 100%;
}

/* Hover Dropdown Styles */
.dropdown-hover {
    position: relative;
}

.dropdown-menu-hover {
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #fff;
    min-width: 100%;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    padding: 0.5rem 0;
    list-style: none;
    margin: 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s;
    z-index: 1000;
    white-space: nowrap;
}

/* Desktop - only open on click */
@media (min-width: 992px) {
    .dropdown-hover.open .dropdown-menu-hover {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

.dropdown-menu-hover .dropdown-item {
    display: block;
    padding: 0.5rem 1rem;
    color: #333;
    text-decoration: none;
    transition: background-color 0.2s ease;
}

.dropdown-menu-hover .dropdown-item:hover {
    background-color: #f8f9fa;
    color: #024573;
}

.navbar-toggler {
    border-color: #cccdcd;
}

.navbar-main.is-scrolled .navbar-toggler {
    border-color: rgba(0, 0, 0, 0.1);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(255, 255, 255, 1)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

.navbar-main.is-scrolled .navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.55)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

@media (max-width: 991px) {
    .navbar-main {
        position: static;
        background-color: #fff !important;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
        padding: 0.75rem 0;
    }

    body {
        padding-top: 0;
    }

    .navbar-toggler-icon {
        background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.55)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
    }

    .navbar-collapse {
        width: 100%;
        padding: 1rem 0;
    }

    .navbar-nav {
        flex-direction: column;
        align-items: center;
        gap: 0.5rem;
        margin: 0;
    }

    .nav-link {
        color: #333 !important;
        padding: 0.5rem 1rem;
        width: 100%;
        text-align: center;
    }

    .dropdown {
        width: 100%;
        display: flex;
        flex-direction: column;
        align-items: center;
        padding: 0.5rem 0;
    }

    .dropdown .btn {
        color: #333 !important;
        border-color: #333 !important;
        width: 120px; /* set a fixed width */
    }

    .dropdown-menu {
        position: static !important;
        background-color: transparent;
        box-shadow: none;
        text-align: center;
        left: auto !important;
        right: auto !important;
        transform: none !important;
        width: 120px; /* match the button width */
        min-width: unset;
        padding: 0;
    }

    .dropdown-item {
        text-align: center;
        width: 100%;
        padding: 0.5rem 0;
    }

    /* Mobile dropdown styles */
    .dropdown-hover {
        width: 100%;
    }

    .dropdown-hover > .nav-link {
        position: relative;
        cursor: pointer;
    }

    .dropdown-hover.has-submenu > .nav-link::after {
        content: '\25BC';
        font-size: 0.7em;
        margin-left: 0.5rem;
        transition: transform 0.3s ease;
    }

    .dropdown-hover.has-submenu.open > .nav-link::after {
        transform: rotate(180deg);
    }

    .dropdown-menu-hover {
        position: static !important;
        opacity: 0;
        visibility: hidden;
        max-height: 0;
        overflow: hidden;
        transform: none;
        box-shadow: none;
        background-color: transparent;
        margin-top: 0;
        width: 100%;
        transition: max-height 0.3s ease, opacity 0.3s ease, margin-top 0.3s ease, background-color 0.3s ease;
    }

    .dropdown-hover.open .dropdown-menu-hover {
        opacity: 1;
        visibility: visible;
        max-height: 500px;
        margin-top: 0.5rem;
        background-color: #f8f9fa;
    }

    .dropdown-menu-hover .dropdown-item {
        text-align: center;
        padding: 0.5rem 1rem;
    }
}


.subpage-header {
    position: relative;
    min-height:40vh;
    max-height: 40vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    padding-top: 100px;
}
