/* -------------------------------
   Base Reset and Font Setup
-------------------------------- */
html {
    font-size: 100%; /* 1rem = 16px */
}
body, html {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}
body {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
}
.navbar, .navbar a, .navbar ul, .navbar li {
    font-family: 'Poppins', sans-serif;
}

/* -------------------------------
   Navbar Container
-------------------------------- */
.navbar {
    position: fixed;
    top: 0;
    z-index: 1000;
    width: 100%;
    max-width: 100vw;
    padding: 1rem 2rem;
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    background-color: #001F3F;
    margin: 0;
    box-sizing: border-box;
}
.navbar * {
    box-sizing: border-box;
}

/* -------------------------------
   Logo
-------------------------------- */
.logo-container {
    flex: 1;
    display: flex;
    align-items: center;
}
.logo {
    height: 3rem;
    max-width: 100%;
    object-fit: contain;
    transition: height 0.3s ease;
}

/* -------------------------------
   Toggle Button (Mobile)
-------------------------------- */
.nav-toggle {
    display: none;
    font-size: 1.5rem;
    background: none;
    border: none;
    color: #fff;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 1100;
}

/* -------------------------------
   Navigation Links
-------------------------------- */
.nav-links {
    display: flex;
    flex: 2;
    gap: 1.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
    justify-content: flex-end;
    flex-wrap: wrap;
    transition: all 0.3s ease;
}

.nav-link {
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    position: relative;
    font-size: 1rem;
    transition: color 0.3s ease;
}
.nav-link:hover {
    color: #E2A52A;
}

.nav-link.active,
.dropdown-menu li a.active {
    color: #E2A52A;
    font-weight: 600;
    border-bottom: 2px solid #E2A52A;
}

/* -------------------------------
   Dropdown
-------------------------------- */
.dropdown {
    position: relative;
}

/* Initial hidden state */
.dropdown-menu {
    position: absolute;
    top: 1.5rem;
    left: 0;
    background-color: #fffffff6;
    border-radius: 0.5rem;
    min-width: 16rem;
    box-shadow: 0 .3rem 0.3125rem rgba(255, 255, 255, 0.089);
    z-index: 999;
    flex-direction: column;
    
    /* Transition styles */
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s ease;
    pointer-events: none; /* prevent hover when invisible */
}

/* Show dropdown with animation */
.dropdown:hover .dropdown-menu,
.dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

/* List items */
.dropdown-menu li {
    width: 100%;
}

.dropdown-menu li a {
    padding: 0.5rem 1rem;
    display: block;
    color: #001f3f;
    text-decoration: none;
    font-size: 0.9rem;
    transition: background-color 0.3s ease, color 0.3s ease, padding-left 0.3s ease;
}

.dropdown-menu li a:hover {
    background-color: #ffffff;
    color: #E2A52A;
    padding-left: 1.1rem;
}

/* Arrow animation */
.dropdown-arrow {
    margin-left: 0.5rem;
    display: inline-block;
    transition: transform 0.3s ease;
}
.dropdown:hover .dropdown-arrow,
.dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}


/* -------------------------------
   Be A Member Now Button
-------------------------------- */
.button-container {
    margin-left: 2vw;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}
.button {
    width: 15rem;
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
    font-weight: bold;
    color: #001F3F;
    background-color: #FFB400;
    text-decoration: none;
    border-radius: 0.5rem;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease;
    text-align: center;
}
.button:hover {
    background-color: #fff;
    color: #01185E;
    transform: scale(1.03);
}

/* -------------------------------
   Mobile-Only Elements
-------------------------------- */
.mobile-only {
    display: none;
}
.desktop-only {
    display: block;
}

/* -------------------------------
   Responsive Styling
-------------------------------- */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100%;
        background-color: #001f3fec;
        padding: 2rem 1.5rem;
        flex-direction: column;
        align-items: flex-start;
        justify-content: flex-start;
        gap: 1rem;
        display: flex !important;
        transition: right 0.3s ease-in-out;
        z-index: 1000;
    }

    .nav-links.open {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .dropdown-menu {
        position: static;
        background: none;
        box-shadow: none;
        opacity: 1 !important;
        visibility: visible !important;
        padding-left: 1rem;
        display: none;
        flex-direction: column;
        gap: 0.5rem;
    }

    .dropdown.open .dropdown-menu {
        display: flex;
    }

    .button-container {
        width: 100%;
        margin-left: 0;
        padding: 1rem;
        justify-content: center;
    }

    .button {
        width: 100%;
        font-size: 1rem;
        padding: 1rem;
    }

    .logo {
        height: 2.8125rem;
    }

    .mobile-only {
        display: block;
        width: 100%;
        margin-top: 1rem;
        text-align: center;
    }

    .mobile-only .button {
        width: 100%;
        padding: 1rem;
    }

    .desktop-only {
        display: none !important;
    }

    .drawer-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background-color: rgba(0, 0, 0, 0.726);
        z-index: 999;
    }

    .drawer-backdrop.active {
        display: block;
    }

    .mobile-drawer {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background-color: #001f3f;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        padding: 2rem 1.5rem;
        z-index: 1000;
        transition: right 0.3s ease-in-out;
        box-shadow: -2px 0 5px rgba(0, 0, 0, 0.2);
    }

    .mobile-drawer.active {
        right: 0;
    }

    .mobile-drawer .nav-links {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    .mobile-drawer .dropdown-menu {
        position: static;
        box-shadow: none;
        opacity: 1 !important;
        visibility: visible !important;
        padding-left: 1rem;
        display: none;
        flex-direction: column;
    }

    .mobile-drawer .dropdown.open .dropdown-menu {
        display: flex;
    }

    .dropdown-menu li a {
        padding: 0.75rem 1rem;
        display: block;
        color: #ffffff;
        text-decoration: none;
        font-size: 1rem;
        transition: background-color 0.3s ease, color 0.3s ease;
    }
}

/* --------------------------------
   Fancy Active Link Effects
-------------------------------- */
.nav-link {
    position: relative;
    text-decoration: none;
    transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-link::after,
.dropdown-menu li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: -0.2rem;
    width: 0;
    height: 2px;
    background-color: #E2A52A;
    transition: width 0.4s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.nav-link:hover {
    color: #E2A52A;
    text-shadow: 0 0 5px #000000;
}

.nav-link.active {
    color: #ffe7b6;
    font-weight: 600;
}

.dropdown-menu li a.active {
    color: #E2A52A;
    font-weight: 600;
}

.nav-link.active::after,
.dropdown-menu li a.active::after {
    width: 100%;
}
