/**
 * NESTPRO - Header Styles
 */

/* ============================================
   HEADER
   ============================================ */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-header);
    transition: all var(--transition);
}

.header-inner {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: all var(--transition);
}

.site-header.scrolled .header-inner {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.06);
}

.header-grid {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-height);
    transition: height var(--transition);
}

.site-header.scrolled .header-grid {
    height: var(--header-height-scrolled);
}

/* Logo */
.header-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    flex-shrink: 0;
    z-index: 10;
    padding: 8px 0;
}

.header-logo-img {
    height: 52px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
    transition: all 0.3s ease;
    display: block;
}

.site-header.scrolled .header-logo-img {
    height: 42px;
}

.logo-text {
    display: flex;
    flex-direction: column;
}

.logo-name {
    font-family: var(--font-heading);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: 3px;
    color: var(--white);
    line-height: 1;
    transition: color var(--transition);
}

.site-header.scrolled .logo-name {
    color: var(--navy);
}

.logo-accent {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-tagline {
    font-family: var(--font-accent);
    font-size: 9px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.5);
    transition: color var(--transition);
}

.site-header.scrolled .logo-tagline {
    color: var(--grey);
}

/* Navigation */
.header-nav {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.nav-list {
    display: flex;
    align-items: center;
    gap: 0;
}

.nav-item {
    position: relative;
}

.nav-item > a {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 18px;
    font-family: var(--font-accent);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.85);
    transition: all var(--transition);
    position: relative;
}

.site-header.scrolled .nav-item > a {
    color: var(--navy);
}

.nav-item > a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 18px;
    right: 18px;
    height: 2px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.4s var(--ease);
    border-radius: 2px;
}

.nav-item > a:hover::after,
.nav-item.active > a::after {
    transform: scaleX(1);
    transform-origin: left;
}

.nav-item > a:hover,
.nav-item.active > a {
    color: var(--white);
}

.site-header.scrolled .nav-item > a:hover,
.site-header.scrolled .nav-item.active > a {
    color: var(--primary);
}

.nav-arrow {
    font-size: 10px;
    transition: transform var(--transition-fast);
}

.nav-item:hover .nav-arrow {
    transform: rotate(180deg);
}

/* Dropdown Menu */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    min-width: 220px;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
    z-index: 100;
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.nav-item.has-dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

.dropdown-menu li a {
    display: block;
    padding: 10px 16px;
    font-family: var(--font-accent);
    font-size: 13px;
    font-weight: 500;
    color: var(--text);
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.dropdown-menu li a:hover {
    background: rgba(var(--primary-rgb), 0.08);
    color: var(--primary);
    padding-left: 22px;
}

/* Mega Menu */
.mega-menu {
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    background: var(--white);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12);
    padding: 40px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all var(--transition);
    z-index: 100;
    border-top: 3px solid var(--primary);
}

.site-header.scrolled .mega-menu {
    top: var(--header-height-scrolled);
}

.nav-item.has-mega:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.mega-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.mega-column {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mega-link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
    text-decoration: none;
}

.mega-link:hover {
    background: rgba(var(--primary-rgb), 0.06);
}

.mega-icon {
    font-size: 18px;
    color: var(--primary);
    flex-shrink: 0;
    margin-top: 2px;
}

.mega-text {
    display: flex;
    flex-direction: column;
}

.mega-title {
    font-family: var(--font-accent);
    font-size: 14px;
    font-weight: 600;
    color: var(--navy);
    transition: color var(--transition-fast);
}

.mega-link:hover .mega-title {
    color: var(--primary);
}

.mega-desc {
    font-size: 12px;
    color: var(--grey);
    margin-top: 2px;
    line-height: 1.4;
}

.mega-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--mid-grey);
    text-align: center;
}

/* Header Actions */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    z-index: 10;
}

.header-cta {
    font-size: 11px !important;
    padding: 10px 22px !important;
}

/* Hamburger */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    padding: 8px;
    cursor: pointer;
    z-index: 10;
    border-radius: var(--radius-md);
    transition: background var(--transition-fast);
}

.hamburger:hover {
    background: rgba(255, 255, 255, 0.1);
}

.site-header.scrolled .hamburger:hover {
    background: rgba(0, 0, 0, 0.05);
}

.hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--white);
    border-radius: 2px;
    transition: all var(--transition);
}

.site-header.scrolled .hamburger span {
    background: var(--navy);
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.hamburger.active span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Mobile Overlay */
.mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: calc(var(--z-header) - 1);
    opacity: 0;
    visibility: hidden;
    transition: all var(--transition);
}

.mobile-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ============================================
   RESPONSIVE HEADER
   ============================================ */
@media (max-width: 1024px) {
    .header-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 320px;
        height: 100vh;
        background: var(--navy);
        padding: 100px 30px 40px;
        transform: none;
        left: auto;
        transition: right var(--transition);
        overflow-y: auto;
        z-index: 5;
    }

    .header-nav.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
    }

    .nav-item > a {
        color: rgba(255, 255, 255, 0.85);
        padding: 14px 0;
        font-size: 15px;
        border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    }

    .site-header.scrolled .nav-item > a {
        color: rgba(255, 255, 255, 0.85);
    }

    .site-header.scrolled .nav-item > a:hover {
        color: var(--gold);
    }

    .nav-item > a::after {
        display: none;
    }

    .dropdown-menu,
    .mega-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        border: none;
        border-top: none;
        padding: 0 0 0 16px;
        display: none;
        background: transparent;
    }

    .nav-item.has-dropdown:hover .dropdown-menu,
    .nav-item.has-mega:hover .mega-menu {
        display: block;
    }

    .dropdown-menu li a {
        color: rgba(255, 255, 255, 0.7);
        padding: 10px 0;
        font-size: 14px;
    }

    .dropdown-menu li a:hover {
        background: transparent;
        color: var(--gold);
        padding-left: 8px;
    }

    .mega-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .mega-link {
        padding: 8px 0;
    }

    .mega-title {
        color: rgba(255, 255, 255, 0.85);
    }

    .mega-link:hover .mega-title {
        color: var(--gold);
    }

    .mega-desc {
        color: rgba(255, 255, 255, 0.4);
    }

    .mega-icon {
        color: var(--gold);
    }

    .mega-footer {
        border-top-color: rgba(255, 255, 255, 0.1);
    }

    .hamburger {
        display: flex;
    }

    .header-cta {
        display: none !important;
    }
}

@media (max-width: 480px) {
    .header-nav {
        width: 100%;
    }
    
    .logo-name {
        font-size: 22px;
    }
}

/* ============================================
   QUOTATION DROPDOWN
   ============================================ */
.header-dropdown {
    position: relative;
}

.header-dropdown-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
}

.dropdown-arrow {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.header-dropdown.open .dropdown-arrow {
    transform: rotate(180deg);
}

.header-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.08);
    min-width: 280px;
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 1000;
}

.header-dropdown.open .header-dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-dark, #1a1a2e);
    transition: all 0.2s ease;
}

.header-dropdown-item:hover {
    background: rgba(232, 106, 42, 0.06);
}

.dropdown-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.header-dropdown-item strong {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark, #1a1a2e);
}

.header-dropdown-item small {
    display: block;
    font-size: 12px;
    color: var(--text-muted, #6c757d);
    margin-top: 2px;
}

/* Mobile dropdown */
@media (max-width: 992px) {
    .header-dropdown-menu {
        right: -10px;
        min-width: 260px;
    }
}
