/*
 * Header Styles
 * Styles for the main application header, including its layout, typography, and visual appearance.
 */
header {
    top: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 96px;
    width: 100%;
    flex-shrink: 0;
    background-color: var(--white);
    z-index: 900;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
}

.header-container {
    width: 100%;
    max-width: 1688px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
}

header h2 {
    font-size: 20px;
    font-weight: 400;
    padding-left: 80px;
}

/*
 * Header Navigation Styles
 * Styles for the navigation elements within the header, including icons and links.
 */
.header-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    padding-top: 20px;
    padding-right: 40px;
    padding-bottom: 20px;
}

.header-nav svg {
    width: 20px;
    height: 20px;
    transition: transform 0.2s ease;
}

.header-nav svg:hover {
    transform: scale(1.1);
}

.header-nav a {
    height: 40px;
    width: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/*
 * Header Profile Styles
 * Styles for the user profile icon/avatar in the header.
 */
.header-profile {
    width: 56px;
    height: 56px;
    border: 2px solid var(--dark);
    color: var(--lightBlue);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
}

.header-profile:hover {
    background-color: var(--grey);
}

/*
 * General Link Styles
 * Universal styling for anchor tags to remove default text decoration.
 */
a {
    text-decoration: none;
}

/*
 * Profile Dropdown Menu Styles
 * Styles for the container and links within the profile dropdown menu.
 */
.profile-wrapper {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 96px;
    right: 20px;
    background-color: var(--dark);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    border-radius: 20px 0 20px 20px;
    overflow: hidden;
    display: none;
    flex-direction: column;
    justify-content: center;
    min-width: 150px;
    height: 158px;
    z-index: 1000;
    padding: 10px;
    font-weight: 100;
}

.dropdown-menu a {
    padding: 12px 4px;
    text-decoration: none;
    font-size: 16px;
    color: var(--grey);
}

.dropdown-menu a:hover {
    background-color: var(--darkBlue);
}

.dropdown-menu.show {
    display: flex;
}

/*
 * Utility Classes
 * Classes for hiding specific elements conditionally.
 */
.hide-help-icon .header-nav a[href*="help.html"] {
    display: none;
}

.hide-initials #initials {
    display: none;
}

.join-logo-header {
    display: none;
}

.dropdown-help {
    display: none;
}

/*
 * Responsive Styles for Screens up to 1024px Wide
 * Adjustments for header layout, element visibility, and dropdown positioning on larger tablets.
 */
@media (max-width: 1024px) {
    header {
        padding: 2px 40px;
        height: 80px !important;
    }

    header h2 {
        display: none;
    }

    .header-nav a {
        display: none;
    }

    header img {
        height: 40px;
        width: 32px;
    }

    .header-nav {
        padding-top: 0px;
        padding-right: 0px;
        padding-bottom: 0px;
    }

    .dropdown-menu {
        top: 69px;
        right: -16px;
        height: 185px;
    }

    .join-logo-header {
        display: block !important;
        height: 40px;
        width: auto;
    }

    .dropdown-help {
    display: block;
}
}

/*
 * Responsive Styles for Screens up to 768px Wide
 * Further adjustments for smaller tablets and mobile devices, focusing on dropdown and header profile.
 */
@media (max-width: 768px) {
    .dropdown-menu {
        top: 40px;
        right: -10px;
    }

    header {
        padding: 2px 16px;
    }

    .header-profile {
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}