/* =======================
   HEADER STYLES
   ======================= */

/* Header Layout - Three column layout */
.header-layout {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 40px;
    width: 100%;
}

/* Logo as link */
.logo-wrapper {
    text-decoration: none;
    color: inherit;
    display: inline-block;
}

.logo-wrapper:hover {
    text-decoration: none;
}

/* Navigation Menu */
.main-nav {
    grid-column: 2;
    justify-self: center;
}

.nav-menu {
    display: flex;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 32px;
}

.nav-item {
    position: relative;
}

.nav-link {
    color: #666;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s ease;
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link:hover {
    color: #00b28a;
}

.nav-link.nav-cta {
    background: #00b28a;
    color: #000;
    padding: 10px 24px;
    border-radius: 24px;
    transition: all 0.3s ease;
}

.nav-link.nav-cta:hover {
    background: #00e67a;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

/* Dropdown Support */
.has-dropdown {
    position: relative;
}

.dropdown-icon {
    font-size: 10px;
    margin-left: 4px;
    transition: transform 0.3s ease;
}

.has-dropdown:hover .dropdown-icon {
    transform: rotate(180deg);
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 200px;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    list-style: none;
    padding: 8px 0;
    margin: 0;
    z-index: 1000;
}

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

.dropdown-menu .nav-item {
    display: block;
}

.dropdown-menu .nav-link {
    display: block;
    padding: 8px 16px;
    color: #333;
    font-size: 14px;
}

.dropdown-menu .nav-link:hover {
    background: rgba(0, 255, 136, 0.1);
    color: #00b28a;
}

/* Mobile Menu Toggle Animation */
.mobile-menu-toggle {
    position: relative;
    z-index: 1001;
}

.mobile-menu-toggle span {
    transition: all 0.3s ease;
    transform-origin: center;
}

.mobile-menu-toggle.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.mobile-menu-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.mobile-menu-toggle.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Body state when menu is open */
body.menu-open {
    overflow: hidden;
    position: relative;
}

/* Social Icons */
.header-social {
    display: flex;
    align-items: center;
    gap: 16px;
    justify-self: end;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.05);
    color: #666;
    transition: all 0.3s ease;
    text-decoration: none;
}

.social-icon:hover {
    background: #00b28a;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 255, 136, 0.3);
}

.social-icon svg {
    width: 18px;
    height: 18px;
}

/* Mobile Menu */
@media (max-width: 768px) {
    .header-layout {
        grid-template-columns: 1fr auto;
        gap: 20px;
    }
    
    .header-social {
        display: none;
    }
    
    /* Mobile menu backdrop */
    .nav-menu::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: -1;
    }
    
    .nav-menu.active::before {
        opacity: 1;
        visibility: visible;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        right: 0;
        bottom: 0;
        background: #ffffff;
        flex-direction: column;
        justify-content: flex-start;
        padding: 40px 20px;
        gap: 24px;
        transform: translateX(100%);
        transition: transform 0.3s ease;
        overflow-y: auto;
        z-index: 999;
        box-shadow: -4px 0 20px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        transform: translateX(0);
    }
    
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        background: rgba(0, 0, 0, 0.05);
        margin-top: 8px;
    }
    
    .has-dropdown .dropdown-menu {
        display: none;
    }
    
    .has-dropdown.open .dropdown-menu {
        display: block;
    }
    
    .has-dropdown.open .dropdown-icon {
        transform: rotate(180deg);
    }
}