* {
    box-sizing: border-box;
}

/* General header styles */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5px;
    background-color: var(--company-light-green);
    color: var(--company-dark-green);
}

/* Ensure the logo image scales well on different screen sizes */
.logo-container img {
    width: 20%;
    height: auto;
}

.caret {
    display: none;
}

/* Hamburger menu styling */
.hamburger-menu {
    background: url('/images/menu.png') no-repeat center center;
    background-size: cover;
    border: none;
    width: 50px;
    height: 50px;
    cursor: pointer;
    display: none; /* Hidden by default, shown in media query below */
    position: absolute;
    top: 25px;
    right: 25px;
    z-index: 3;
}

/* Full navigation bar styling */
.navigation {
    display: contents;
    justify-content: center; /* Center the entire navigation bar */
    align-items: flex-start;
    width: 100%; /* Use full width to evenly space items */
    padding: 0px 0px; /* Added padding to prevent stretching to the edges */
}

.main-tab {
    font-weight: bold;
}
.main-middle-tab {
    font-weight: bold;
    align-content: center;
    text-align: center;
}

/* Styles for dropdown buttons */
.dropdown .dropbtn {
    background-color: var(--company-light-green);
    color: var(--company-dark-green) !important;
    padding: 1.55rem;
    align-content: center;
    font-size: .99rem;
    border: none;
    cursor: pointer;
    font-weight: bold;
    width: 100%;
}

.dropbtn:hover, .dropbtn:focus {
    background-color: var(--company-dark-green);
    color: var(--company-yellow) !important;
    font-weight: bold;
}

/* Initially hide dropdown content */
.dropdown-content {
    display: none; /* Keep it hidden */
    position: relative; /* Position absolutely to float below the parent */
    top: 100%; /* Position directly below the main tab */
    left: 0; /* Align with the left edge of the parent */
    width: 100%; /* Full width */
    background-color: var(--company-light-green); /* Consistent background */
    z-index: 1; /* Ensure it appears above other content */
}

/* Account action nav */
.act-nav {
    display: flex;
    align-items: center;
}

/* More specific styles for dropdown content links */
.dropdown-content a {
    padding: 5px;
    text-decoration: none;
    color: var(--company-dark-green);
    white-space: nowrap;
    background-color: var(--company-light-green);
    display: block; /* Ensures each link is on its own line */
    box-sizing: border-box;
    margin: 3px;
    color: var(--company-dark-green) !important;
}

.dropdown-content a:hover {
    background-color: var(--company-dark-green);
    color: var(--company-yellow) !important;
}

.main-nav > ul {
    display: flex;
    justify-content: center; /* Center-align the list items */
    align-items: center; /* Center the items vertically */
    list-style: none; /* Remove bullets from list items */
    padding: 0; /* Remove default padding */
    margin: auto auto; /* Center the list and remove default margin */
    max-width: 1240px; /* Prevent the list from stretching too far */
}
.main-nav > ul > li {
    flex: 1; /* Distribute space evenly to all li */
    min-width: 95px; /* Prevent text wrapping onto more than two lines */
    text-align: center; /* Center-align the text */
    display: flex;
    justify-content: center; /* Center content within each li */
    align-items: center; /* Align items vertically */
    margin: 0; /* Add space between each tab */
    flex-direction: column;
}

/* Correctly styles the dropdown buttons */
.main-nav > ul > li > button.dropbtn {
    width: 100%; /* Full width of the parent */
    text-align: center;
    padding-bottom: 2.5rem;
}

/* Shows the dropdown content when its dropdown button is clicked */
.dropdown.active .dropdown-content {
    display: flex;
    flex-direction: row; /* Aligns items vertically */
    border-color: gold;
    justify-content: center;
}




.karma-button {
    padding: 5px 10px;
    background-color: var(--company-yellow);
    color: var(--company-dark-green);
    border-color: var(--company-dark-green);
    border-radius: 5px;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
    outline: none;
    align-items: center;
}

.lucky-tabs {
    font-weight: bold !important;
}

.karma-button:hover {
    background-color: gold;
}

@media screen and (max-width: 770px) {
    /* Styles that should apply from 1240px and below */
    .main-nav > ul > li {
        min-width: .75rem; /* Allow the tabs to shrink on smaller screens */
        padding: .2rem .2rem; /* Adjust padding to fit content */
    }

    /* Ensuring NCAA Mens Basketball only takes two lines maximum */
    .sport-tab {
        max-width: 100rem; /* Set a maximum width to control wrapping */
    }

    .header-container {
        flex-wrap: wrap;
        padding: 1rem;
        padding-top: 2rem;
    }

    .caret {
        display: inline;
    }

    .hamburger-menu {
        display: block; /* Show hamburger menu */
    }

    /* Full navigation bar styling for active state */
    .navigation.active {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        position: fixed;
        top: 0;
        right: 0;
        width: 55%;
        height: 100%;
        background-color: var(--company-light-green);
        z-index: 2;
        overflow-y: auto;
        box-shadow: -5px 0 5px rgba(0,0,0,0.2);
        min-width: 8rem;
    }

    .dropdown-content a {
        padding: 5px;
        text-decoration: none;
        color: var(--company-dark-green);
        white-space: nowrap;
        background-color: var(--company-light-green);
        margin: auto auto;
        display: block; /* Ensures each link is on its own line */
        box-sizing: border-box;
        margin: 3px;
        color: var(--company-dark-green) !important;
    }

    .navigation.active .main-nav {
        display: flex; /* Use flex to organize child elements */
        flex-direction: column; /* Stack children vertically */
        padding-top: 5.5rem; /* Reset padding */
        position: static; /* Allow natural document flow */
        width: 100%; /* Full width to match the parent */
        box-shadow: none; /* Optionally remove shadow */
    }
    .navigation.active .main-nav > ul > li:not(.dropdown) {
        display: none; /* Initially hides non-dropdown menu items */
    }
    .navigation.active .main-nav > ul > li.dropdown.active > .dropdown-content {
        display: flex; /* Only show the dropdown content when its parent li is active */
    }

    .karma-button {
        padding-top: 4px;
        padding-bottom: 4px;
        text-align: center;
        align-self: center;
    }

    .navigation.active {
        align-self: flex-start; /* Aligns the karma button to the left */
        text-align: left; /* Align the text to the left */
    }

    .navigation.active .act-nav,
    .navigation.active .dropdown {
        display: flex; /* Use flex to organize child elements */
        flex-direction: column; /* Stack children vertically */
        padding: 2px; /* Reset padding */
        position: static; /* Allow natural document flow */
        width: 100%; /* Full width to match the parent */
        box-shadow: none; /* Optionally remove shadow */
    }

    .main-nav > ul {
        display: flex;
        flex-direction: column;
        padding-left: 0; /* Removes default padding */
        margin: 0; /* Removes default margin */
    }

    /* Hide the navigation and account action lists by default */
    .main-nav, .act-nav {
        display: none;
    }

    /* Styles for dropdown buttons */
    .dropdown .dropbtn {
        width: 100%; /* Full width for smaller screens */
        font-size: 1.5rem;
    }

    .navigation.active .dropdown .dropbtn {
        display: block; /* Ensures buttons stack vertically */
        width: 100%; /* Full width */
        /* Add any additional styling for buttons here */
    }

    .dropdown.active .dropdown-content {
        display: block; /* Show dropdown content */
        position: static; /* Allow natural document flow */
        width: 100%; /* Full width */
        /* Ensure there is no box shadow or set it as per design */
    }

    .navigation.active .dropdown-content a:hover {
        background-color: var(--company-dark-green); /* Highlight on hover */
        color: var(--company-yellow); /* Text color on hover */
    }

    .navigation.active .dropdown-content a {
        display: block; /* Ensure links take up the full width of the dropdown */
        padding: 10px 20px; /* Provide ample clickable area */
        background-color: var(--company-light-green); /* Consistent background */
        color: var(--company-dark-green); /* Consistent text color */
        text-decoration: none; /* Remove underline from links */
        box-sizing: border-box; /* Include padding in width */
    }
    /* Hide all dropdown content by default */
    .dropdown-content {
        display: none;
    }

    .dropdown.active .dropdown-content {
        display: flex;
        flex-direction: column; /* Aligns items vertically */
    }
}

/* Responsive styling */
@media screen and (min-width: 771px) and (max-width: 1240px) {
    /* Styles that should apply from 1240px and below */
    .main-nav > ul > li {
        min-width: .75rem; /* Allow the tabs to shrink on smaller screens */
        padding: .2rem .2rem; /* Adjust padding to fit content */
    }

    /* Ensuring NCAA Mens Basketball only takes two lines maximum */
    .sport-tab {
        max-width: 100rem; /* Set a maximum width to control wrapping */
    }

    .header-container {
        flex-wrap: wrap;
        padding: 1rem;
        padding-top: 2rem;
    }

    .caret {
        display: inline;
    }

    .hamburger-menu {
        display: block; /* Show hamburger menu */
    }

    /* Full navigation bar styling for active state */
    .navigation.active {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        position: fixed;
        top: 0;
        right: 0;
        width: 35%;
        height: 100vh;
        background-color: var(--company-light-green);
        z-index: 2;
        overflow-y: auto;
        box-shadow: -5px 0 5px rgba(0,0,0,0.2);
        min-width: 8rem;
    }

    .dropdown-content a {
        padding: 5px;
        text-decoration: none;
        color: var(--company-dark-green);
        white-space: nowrap;
        background-color: var(--company-light-green);
        margin: auto auto;
        display: block; /* Ensures each link is on its own line */
        box-sizing: border-box;
        margin: 3px;
        color: var(--company-dark-green) !important;
    }

    .navigation.active .main-nav {
        display: flex; /* Use flex to organize child elements */
        flex-direction: column; /* Stack children vertically */
        padding-top: 5.5rem; /* Reset padding */
        position: static; /* Allow natural document flow */
        width: 100%; /* Full width to match the parent */
        box-shadow: none; /* Optionally remove shadow */
    }
    .navigation.active .main-nav > ul > li:not(.dropdown) {
        display: none; /* Initially hides non-dropdown menu items */
    }
    .navigation.active .main-nav > ul > li.dropdown.active > .dropdown-content {
        display: flex; /* Only show the dropdown content when its parent li is active */
    }

    .karma-button {
        padding-top: 4px;
        padding-bottom: 4px;
        text-align: center;
        align-self: center;
    }

    .navigation.active {
        align-self: flex-start; /* Aligns the karma button to the left */
        text-align: left; /* Align the text to the left */
    }

    .navigation.active .act-nav,
    .navigation.active .dropdown {
        display: flex; /* Use flex to organize child elements */
        flex-direction: column; /* Stack children vertically */
        padding: 2px; /* Reset padding */
        position: static; /* Allow natural document flow */
        width: 100%; /* Full width to match the parent */
        box-shadow: none; /* Optionally remove shadow */
    }

    .main-nav > ul {
        display: flex;
        flex-direction: column;
        padding-left: 0; /* Removes default padding */
        margin: 0; /* Removes default margin */
    }

    /* Hide the navigation and account action lists by default */
    .main-nav, .act-nav {
        display: none;
    }

    /* Styles for dropdown buttons */
    .dropdown .dropbtn {
        width: 100%; /* Full width for smaller screens */
    }

    .navigation.active .dropdown .dropbtn {
        display: block; /* Ensures buttons stack vertically */
        width: 100%; /* Full width */
        /* Add any additional styling for buttons here */
    }

    .dropdown.active .dropdown-content {
        display: block; /* Show dropdown content */
        position: static; /* Allow natural document flow */
        width: 100%; /* Full width */
        /* Ensure there is no box shadow or set it as per design */
    }

    .navigation.active .dropdown-content a:hover {
        background-color: var(--company-dark-green); /* Highlight on hover */
        color: var(--company-yellow); /* Text color on hover */
    }

    .navigation.active .dropdown-content a {
        display: block; /* Ensure links take up the full width of the dropdown */
        padding: 10px 20px; /* Provide ample clickable area */
        background-color: var(--company-light-green); /* Consistent background */
        color: var(--company-dark-green); /* Consistent text color */
        text-decoration: none; /* Remove underline from links */
        box-sizing: border-box; /* Include padding in width */
    }
    /* Hide all dropdown content by default */
    .dropdown-content {
        display: none;
    }

    .dropdown.active .dropdown-content {
        display: flex;
        flex-direction: column; /* Aligns items vertically */
    }
}

/* Styles for the 'active' state of the dropdown */
.dropdown.active-tab .dropdown-content {
    display: flex; /* Display flex to take the full width of the dropdown */
    justify-content: space-around; /* Spread sub-items evenly */
    position: absolute; /* Position absolutely to float below the parent tab */
    width: 100%; /* Take the full width of the parent */
    box-sizing: border-box; /* Include padding in the element's width */
    top: 100%; /* Position right below the parent item */
    left: 0; /* Align with the left edge of the parent */
}
