@font-face {
    font-family: 'IranianSans';
    src: url('/main/fonts/IranianSans.ttf') format('truetype');
}

.gh-header {
    padding: 15px 0;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: backdrop-filter 0.3s ease, background 0.3s ease;
    max-height: 70px; /* Set to maintain original header height */
    display: flex;
    align-items: center;
}

.gh-header.blurred {
    backdrop-filter: blur(8px);
    background: rgba(0, 0, 0, 0.3);
}

.gh-header-container {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 20px;
    max-height: 70px; /* Ensure container doesn't exceed header height */
}

.gh-logo {
    font-family: 'IranianSans', sans-serif;
    font-size: 26px;
    color: #FFFFFF;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    line-height: 1; /* Prevent extra vertical space */
}

.gh-logo-img {
    max-height: 50px; /* Reduced to fit within header height while maintaining 3:1 ratio */
    max-width: 150px; /* Approximate 3:1 ratio (50px * 3) */
    width: auto;
    object-fit: contain; /* Maintain aspect ratio */
    border-radius: 5px;
}

.gh-hamburger {
    background: none;
    border: none;
    color: #FFFFFF;
    font-size: 24px;
    cursor: pointer;
    display: none;
}

.gh-nav {
    display: flex;
    align-items: center;
}

.gh-nav-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
}

.gh-nav-list li {
    position: relative;
}

.gh-nav-link {
    font-family: 'IranianSans', sans-serif;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    transition: color 0.3s ease;
}

.gh-nav-link:hover {
    color: #1B5E20;
}

.gh-nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: #1B5E20;
    transition: width 0.3s ease, left 0.3s ease;
}

.gh-nav-link:hover::after {
    width: 100%;
    left: 0;
}

.gh-nav-dropdown {
    position: relative;
}

.gh-dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
}

.gh-dropdown-menu {
    display: none;
    list-style: none;
    padding: 10px 0;
    margin: 0;
    background: rgba(0, 0, 0, 0.9);
    border-radius: 5px;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 1001;
}

.gh-nav-dropdown.open .gh-dropdown-menu {
    display: block;
}

.gh-dropdown-link {
    font-family: 'IranianSans', sans-serif;
    color: #FFFFFF;
    text-decoration: none;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    transition: color 0.3s ease, background 0.3s ease;
}

.gh-dropdown-link:hover {
    color: #1B5E20;
    background: rgba(27, 94, 32, 0.2);
}

.gh-auth-buttons {
    display: flex;
    flex-direction: row;
    gap: 10px;
    padding: 0 20px;
}

.gh-btn-login, .gh-btn-register, .gh-btn-profile, .gh-btn-logout {
    font-family: 'IranianSans', sans-serif;
    color: #FFFFFF;
    text-decoration: none;
    padding: 8px 16px;
    border: 1px solid #FFFFFF;
    border-radius: 5px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

.gh-btn-login:hover, .gh-btn-register:hover, .gh-btn-profile:hover, .gh-btn-logout:hover {
    background-color: #1B5E20;
    border-color: #1B5E20;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.gh-modal-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-width: 300px;
    z-index: 2000;
}

.gh-modal {
    background: rgba(0, 0, 0, 0.8);
    color: #FFFFFF;
    padding: 12px 20px;
    border-radius: 10px;
    font-family: 'IranianSans', sans-serif;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease-out;
}

.gh-modal i {
    font-size: 18px;
    color: #FF5252;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@media (max-width: 991px) {
    .gh-hamburger {
        display: block;
    }
    .gh-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 250px;
        height: 100vh;
        background: rgba(0, 0, 0, 0.9);
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        transition: right 0.3s ease;
    }
    .gh-nav.open {
        right: 0;
    }
    .gh-nav-list {
        display: flex;
        flex-direction: column;
        margin: 60px 0 20px;
        padding: 20px;
    }
    .gh-nav-list li {
        margin: 10px 0;
    }
    .gh-nav-link::after {
        display: none;
    }
    .gh-nav-dropdown .gh-dropdown-menu {
        display: none;
        margin: 10px 20px;
        background: rgba(0, 0, 0, 0.8);
        position: static;
        box-shadow: none;
    }
    .gh-nav-dropdown.open .gh-dropdown-menu {
        display: block;
    }
    .gh-auth-buttons {
        flex-direction: column;
        padding: 20px;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
    }
    .gh-btn-login, .gh-btn-register, .gh-btn-profile, .gh-btn-logout {
        justify-content: center;
        width: 100%;
        text-align: center;
    }
    .gh-modal-container {
        max-width: 80%;
    }
    .gh-logo-img {
        max-height: 42px; /* Reduced to fit within header height for mobile */
        max-width: 126px; /* Approximate 3:1 ratio (42px * 3) */
    }
}