/*
 * Header Styles
 * Contains all styles related to the site header and navigation
 */

/* Header Layout */
.site-header {
    background: #F5F5F0;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.site-header.hidden {
    transform: translateY(-100%);
}

.header-content {
    display: flex;
    flex-direction: row;
    justify-content: center;
    align-items: center;
    padding: 1rem 0;
    gap: 3rem;
}

/* Site Branding */
.site-title {
    font-size: 1.8rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    letter-spacing: 1px;
}

.site-title a {
    color: #2c3e50;
    text-decoration: none;
    transition: color 0.3s ease;
}

.site-title a:hover {
    color: #3498db;
}

.site-description {
    color: #7f8c8d;
    font-size: 0.9rem;
    margin: 0;
}

/* Navigation */
.main-navigation {
    display: flex;
    align-items: center;
}

.main-navigation ul {
    list-style: none;
    display: flex;
    gap: 2rem;
    margin: 0;
    justify-content: center;
}

.main-navigation a {
    color: #2c3e50;
    font-weight: 500;
    padding: 0.5rem 0;
    transition: color 0.3s ease;
    position: relative;
    text-decoration: none;
}

.main-navigation a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: #2c3e50;
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.main-navigation a:hover::after {
    width: 100%;
}

/* Dropdown Menu Styles */
.menu-item-has-children {
    position: relative;
}

.menu-item-has-children>ul {
    display: block !important;
    flex-direction: column !important;
}

.sub-menu {
    position: absolute;
    top: calc(100% + 10px);
    left: 0;
    background: #fafafa;
    padding: 0.5rem 0;
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
    list-style: none;
    margin: 0;
    display: block !important;
}

.menu-item-has-children:hover .sub-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.sub-menu li {
    margin: 0;
    padding: 0;
    width: 100%;
    display: block !important;
    float: none !important;
}

.sub-menu a {
    display: block !important;
    padding: 0.75rem 1.5rem;
    color: #2c3e50;
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    border-bottom: 1px solid #f8f9fa;
    width: 100%;
    box-sizing: border-box;
    float: none !important;
    position: static;
}

.sub-menu a::after {
    display: none;
}

.sub-menu li:last-child a {
    border-bottom: none;
}

.sub-menu a:hover {
    background: #f8f9fa;
    color: #3498db;
    padding-left: 2rem;
}

/* Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.menu-toggle-icon {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.menu-toggle-icon span {
    width: 25px;
    height: 3px;
    background: #2c3e50;
    transition: all 0.3s ease;
}

/* Mobile Menu Overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    opacity: 1 !important;
    visibility: hidden !important;
    transition: all 0.3s ease;
}

.mobile-menu-overlay.active {
    opacity: 1;
    visibility: visible !important;
}

.mobile-menu-content {
    position: absolute;
    top: 0;
    right: 0;
    width: 70%;
    min-height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    padding: 2rem 1.5rem;
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.mobile-menu-overlay.active .mobile-menu-content {
    transform: translateX(0);
}

.mobile-menu-header {
    margin-bottom: 2rem;
}

.mobile-menu-close {
    background: transparent;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-icon {
    font-size: 1.5rem;
    color: #fff;
    font-weight: bold;
}



.mobile-nav-menu {
    list-style: none;
    margin: 0;
    padding: 0;
}

.mobile-menu-item {
    padding: 1rem 0;
    border-bottom: 1px solid #666;
    position: relative;
}

.mobile-menu-item>a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    width: 100%;
}

.mobile-menu-item:last-child {
    border-bottom: none;
}


.menu-arrow {
    color: #fff;
    font-size: 1rem;
    display: inline-block;
    margin-left: 20px;
}

/* Mobile Sub-menu Styles */
.mobile-sub-menu {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-sub-menu.active {
    max-height: 500px;
}

.mobile-sub-menu li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #555;
    margin: 0;
    list-style: none;
}

.mobile-sub-menu li:last-child {
    border-bottom: none;
}

.mobile-sub-menu a {
    color: #ccc;
    font-size: 0.9rem;
    padding-left: 1rem;
    display: block;
}

.mobile-sub-menu a:hover {
    color: #fff;
}

.mobile-menu-item-has-children .menu-arrow {
    transition: transform 0.3s ease;
    transform-origin: center;
}

.mobile-menu-item-has-children.active .menu-arrow {
    transform: rotate(90deg);
}

.mobile-menu-actions {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.mobile-action-btn {
    background: #e0e0e0;
    color: #333;
    text-decoration: none;
    padding: 0.75rem 1rem;
    border-radius: 4px;
    text-align: center;
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.3s ease;
}

.mobile-action-btn:hover {
    background: #d0d0d0;
}

/* Responsive Header Styles */
@media (max-width: 768px) {
    .header-content {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        padding: 1rem 1.5rem;
        gap: 0;
    }

    .site-branding {
        flex: 1;
    }

    .site-title {
        font-size: 1.5rem;
    }

    .main-navigation {
        display: none;
    }

    .menu-toggle {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 0.25rem;
        background: #4a4a4a;
        color: #fff;
        border: none;
        padding: 0.5rem;
        border-radius: 4px;
        cursor: pointer;
    }

    .menu-toggle-text {
        font-size: 0.75rem;
        color: #fff;
        font-weight: 500;
    }

    .menu-toggle-icon {
        display: flex;
        flex-direction: column;
        gap: 3px;
    }

    .menu-toggle-icon span {
        width: 20px;
        height: 2px;
        background: #fff;
        transition: all 0.3s ease;
    }

    /* Hide desktop navigation on mobile */
    .nav-menu {
        display: none;
    }
}

@media (min-width: 769px) {
    .mobile-menu-overlay {
        display: none;
    }

    .menu-toggle {
        display: none;
    }
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}