/* ===== GLOBAL HEADER SYSTEM ===== */

/* Reset and base styles */
* {
    box-sizing: border-box;
}

/* Main header container */
.vilostudios-header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.95) 0%, rgba(20, 20, 30, 0.95) 50%, rgba(0, 0, 0, 0.95) 100%);
    backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(255, 118, 0, 0.15);
    transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1) !important;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    transform: translateY(0) !important;
    height: 85px;
    overflow: hidden;
}

.vilostudios-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(255, 118, 0, 0.05) 20%, 
        rgba(255, 118, 0, 0.08) 50%, 
        rgba(255, 118, 0, 0.05) 80%, 
        transparent 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.vilostudios-header:hover::before {
    opacity: 1;
}

/* Header visibility states */
.vilostudios-header.header-hidden {
    transform: translateY(-100%) !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
    z-index: -1 !important;
}

.vilostudios-header.header-visible {
    transform: translateY(0) !important;
    visibility: visible !important;
    opacity: 1 !important;
    pointer-events: auto !important;
    z-index: 1000 !important;
}

.vilostudios-header.scrolled {
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.98) 0%, rgba(15, 15, 25, 0.98) 50%, rgba(0, 0, 0, 0.98) 100%);
    border-bottom: 1px solid rgba(255, 118, 0, 0.25);
    box-shadow: 0 6px 40px rgba(0, 0, 0, 0.4);
    height: 75px;
}

/* Navigation container */
.header-nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 85px;
    transition: height 0.3s ease;
    position: relative;
}

.vilostudios-header.scrolled .header-nav {
    height: 75px;
}

/* Brand section */
.nav-brand {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.brand-link {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    padding: 8px 12px;
    border-radius: 12px;
}

.brand-link:hover {
    transform: translateY(-2px);
    background: linear-gradient(135deg, rgba(255, 118, 0, 0.08), rgba(255, 149, 0, 0.06));
    box-shadow: 0 4px 20px rgba(255, 118, 0, 0.15);
}

.brand-logo {
    height: 50px;
    width: auto;
    object-fit: contain;
    transition: all 0.3s ease;
    filter: brightness(1.1) drop-shadow(0 0 8px rgba(255, 118, 0, 0.2));
}

.vilostudios-header.scrolled .brand-logo {
    height: 45px;
}

.brand-text {
    font-size: 1.8rem;
    font-weight: 800;
    background: linear-gradient(135deg, #ffffff 0%, #ff7600 25%, #ffa500 75%, #ffffff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    text-transform: uppercase;
    position: relative;
    font-family: 'Inter', -apple-system, sans-serif;
    text-shadow: 0 0 20px rgba(255, 118, 0, 0.3);
}

.brand-text::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #ff7600, #ffa500, #ff7600);
    transition: width 0.4s ease;
    border-radius: 1px;
}

.brand-link:hover .brand-text::after {
    width: 100%;
}

/* Main navigation */
.nav-menu {
    display: flex;
    align-items: center;
    flex: 1;
    justify-content: center;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 14px 24px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    white-space: nowrap;
    letter-spacing: 0.5px;
    background: transparent;
    border: 1px solid transparent;
}

.nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 118, 0, 0.1), rgba(255, 149, 0, 0.05));
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.nav-link:hover::before {
    opacity: 1;
}

.nav-link:hover {
    color: #ffffff;
    background: linear-gradient(135deg, rgba(255, 118, 0, 0.15), rgba(255, 149, 0, 0.1));
    border-color: rgba(255, 118, 0, 0.2);
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(255, 118, 0, 0.15);
}

.nav-link.active {
    color: #ff7600;
    background: rgba(255, 118, 0, 0.1);
    border-color: rgba(255, 118, 0, 0.3);
    font-weight: 700;
}

/* CTA section */
.nav-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.cta-button {
    display: flex;
    align-items: center;
    padding: 14px 28px;
    background: linear-gradient(135deg, #ff7600 0%, #ff9500 50%, #ff7600 100%);
    color: white;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;
    border-radius: 30px;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 6px 25px rgba(255, 118, 0, 0.3);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cta-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:hover {
    transform: translateY(-3px) scale(1.05);
    box-shadow: 0 8px 35px rgba(255, 118, 0, 0.4);
    background: linear-gradient(135deg, #ff8a00 0%, #ffa500 50%, #ff8a00 100%);
    border-color: rgba(255, 255, 255, 0.2);
}

/* Mobile menu toggle */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 12px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.mobile-menu-toggle:hover {
    background: rgba(255, 118, 0, 0.1);
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background: #ffffff;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
    background: #ff7600;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
    transform: scale(0);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
    background: #ff7600;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .header-nav {
        padding: 0 1.5rem;
    }
    
    .nav-links {
        gap: 0.25rem;
    }
    
    .nav-link {
        padding: 10px 12px;
        font-size: 0.9rem;
    }
    
    .brand-text {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-menu {
        position: fixed;
        top: 80px;
        left: 0;
        right: 0;
        background: rgba(15, 15, 15, 0.98);
        backdrop-filter: blur(20px);
        border-top: 1px solid rgba(255, 118, 0, 0.2);
        padding: 2rem 0;
        transform: translateX(-100%);
        opacity: 0;
        visibility: hidden;
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        height: calc(100vh - 80px);
        overflow-y: auto;
    }
    
    .nav-menu.active {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }
    
    .nav-links {
        flex-direction: column;
        gap: 0;
        padding: 0 2rem;
        width: 100%;
    }
    
    .nav-link {
        justify-content: flex-start;
        padding: 1.2rem 1.5rem;
        width: 100%;
        border-radius: 12px;
        margin-bottom: 0.5rem;
        border: 1px solid transparent;
    }
    
    .nav-link:hover {
        transform: translateX(8px);
        border-color: rgba(255, 118, 0, 0.3);
        background: rgba(255, 118, 0, 0.1);
    }
    
    .cta-button {
        display: none;
    }
    
    .brand-text {
        font-size: 1.3rem;
    }
    
    .brand-logo {
        height: 40px;
    }
}

@media (max-width: 480px) {
    .header-nav {
        padding: 0 1rem;
        height: 70px;
    }
    
    .vilostudios-header.scrolled .header-nav {
        height: 65px;
    }
    
    .nav-menu {
        top: 70px;
        height: calc(100vh - 70px);
    }
    
    .brand-text {
        display: none;
    }
    
    .brand-logo {
        height: 35px;
    }
    
    .nav-links {
        padding: 0 1rem;
    }
}

/* Animation for page load */
@keyframes headerSlideIn {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.vilostudios-header {
    animation: headerSlideIn 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Ensure content doesn't hide behind fixed header */
body {
    padding-top: 80px;
}

/* Smooth scroll offset for anchor links */
html {
    scroll-padding-top: 100px;
}