.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 4%;
    background-color: var(--white-color);
    box-shadow: var(--shadow);
    z-index: 1000;
    transition: all 0.3s ease;
}

.main-header .logo img {
    height: 60px; 
    display: block;
    transition: height 0.3s ease;
}

.main-nav {
    margin: 0 20px;
    flex-grow: 1;
    display: flex;
    justify-content: center;
}
.main-nav ul {
    list-style: none;
    display: flex;
    gap: 25px;
    padding: 0;
    margin: 0;
}
.main-nav a {
    text-decoration: none;
    color: #333;
    font-weight: 600;
    padding: 8px 15px;
    border-radius: 5px;
    white-space: nowrap; 
    transition: background-color 0.3s, color 0.3s;
    font-size: 0.95rem;
}
.main-nav a:hover,
.main-nav a.active {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0; 
}

.header-contact-info {
    text-align: right;
}
.header-contact-info span {
    display: block;
    font-size: 0.85rem;
    color: #666;
}
.header-contact-info a {
    text-decoration: none;
    color: var(--secondary-color);
    font-weight: bold;
    font-size: 1.2rem;
    white-space: nowrap;
}

.guest-actions {
    display: flex;
    gap: 10px;
}
.guest-actions .btn {
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-weight: 600;
    border: 1px solid transparent;
    transition: all 0.2s;
    font-size: 0.9rem;
    white-space: nowrap;
}
.guest-actions .btn-primary {
    background-color: var(--primary-color);
    color: var(--white-color);
}
.guest-actions .btn-secondary {
    color: var(--primary-color);
    border-color: var(--primary-color);
}
.guest-actions .btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--white-color);
}

.user-menu {
    position: relative;
    display: inline-block;
}

.user-menu-button {
    background: transparent;
    border: 1px solid #e0e0e0;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #333;
    padding: 8px 16px;
    border-radius: 50px;
    transition: all 0.2s ease;
    background-color: #fff;
}

.user-menu-button:hover {
    background-color: #f8f9fa;
    border-color: #ccc;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.user-icon {
    width: 20px;
    height: 20px;
    fill: #555;
}

.chevron-down {
    width: 12px;
    height: 12px;
    fill: #777;
    transition: transform 0.2s ease;
}

.user-menu.active .chevron-down {
    transform: rotate(180deg);
}

.user-menu-dropdown {
    position: absolute;
    top: 120%; 
    right: 0;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border: 1px solid #f0f0f0;
    width: 200px;
    display: none; 
    flex-direction: column;
    overflow: hidden;
    z-index: 1000;
    animation: slideDown 0.2s ease forwards;
}

.user-menu-dropdown.active {
    display: flex;
}

.user-menu-dropdown a {
    padding: 14px 20px;
    text-decoration: none;
    color: #2c3e50;
    font-size: 0.95rem;
    font-weight: 500;
    border-bottom: 1px solid #f9f9f9;
    transition: background 0.2s;
    text-align: left;
}

.user-menu-dropdown a:hover {
    background-color: #f8f9fa;
    color: #003366; 
    padding-left: 25px; 
}

.logout-link {
    color: #dc3545 !important; 
    font-weight: 600 !important;
}

.logout-link:hover {
    background-color: #fff5f5 !important;
}



@media (max-width: 1024px) {
    .main-header {
        padding: 10px 3%;
        flex-wrap: wrap; 
    }
    .header-contact-info span { display: none; }
    .header-contact-info a { font-size: 1rem; }
    .main-nav ul { gap: 15px; }
}

@media (max-width: 768px) {
    .main-header {
        padding: 10px 15px;
        flex-direction: column; 
        gap: 12px;
        align-items: stretch; 
    }

    .main-header > .logo { order: 1; width: auto; align-self: flex-start; margin-right: auto;}
    .header-actions { 
        order: 1; 
        position: absolute; 
        top: 15px; 
        right: 15px; 
        gap: 10px;
    }

    .main-header .logo img { height: 40px; } 

    .header-contact-info { display: none; } 
    
    .user-menu-button span { display: none; } 

    
    .main-nav {
        order: 2;
        width: 100%;
        margin: 0;
        overflow-x: auto; 
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        justify-content: flex-start;
    }
    
    .main-nav ul {
        width: max-content; 
        gap: 10px;
        padding: 0 2px;
    }
    
    .main-nav::-webkit-scrollbar { height: 0; width: 0; display: none; } 
    
    .main-nav a {
        padding: 6px 14px;
        font-size: 0.85rem;
        background-color: #f8f9fa; 
        border: 1px solid #eee;
    }
}
@keyframes slideDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}