/* HEADER.CSS - JAVÍTOTT VERZIÓ */

/* Alap reset és body beállítások */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
    padding-top: 67px;
    transition: padding-top 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body.header-scrolled {
    padding-top: 70px;
}

/* Header Styles - EGYSÉGES LAYOUT */
.header {
    background: linear-gradient(135deg, var(--primary-color), rgba(255,255,255,0.05)), var(--primary-color);
    color: white;
    padding: 5px 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header.scrolled {
    padding: 8px 0;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

/* ASZTALI LAYOUT - FLEXBOX */
.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: var(--transition);
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: white;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: translateY(-2px);
}

.logo img {
    height: 60px;
    margin-right: 15px;
    border-radius: 8px;
    transition: var(--transition);
}

.header.scrolled .logo img {
    height: 45px;
}

.logo h1 {
    font-size: 22px;
    font-weight: 800;
    margin: 0;
    line-height: 1.2;
    transition: var(--transition);
}

.header.scrolled .logo h1 {
    font-size: 18px;
}

.header-info {
    text-align: right;
    font-size: 14px;
    line-height: 1.4;
    color: rgba(255,255,255,0.9);
    transition: var(--transition);
}

.header.scrolled .header-info {
    font-size: 12px;
}

.header-info div {
    margin-bottom: 2px;
}

.header-info div:last-child {
    margin-bottom: 0;
}

/* Hamburger menu - REJTETT ASZTALI NÉZETBEN */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: all 0.3s ease;
    position: relative;
    z-index: 1001;
}

.hamburger-menu:hover {
    background: rgba(255,255,255,0.1);
}

.hamburger-lines {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hamburger-line {
    width: 24px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hamburger animáció */
.hamburger-menu.open .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(7px, 7px);
}

.hamburger-menu.open .hamburger-line:nth-child(2) {
    opacity: 0;
}

.hamburger-menu.open .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Desktop Navigation */
.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 14px;
}

.nav-link:hover,
.nav-link.active {
    background: rgba(255,255,255,0.1);
    color: white;
    transform: translateY(-1px);
}

/* MOBIL LAYOUT - LOGO VALÓDI KÖZÉPEN */
@media (max-width: 1024px) {
    .hamburger-menu {
        display: block;
    }
    
    .nav {
        display: none;
    }
    
    .header-content {
        display: flex;
        align-items: center;
        padding: 13px;
        position: relative;
    }
    
    .hamburger-menu {
        flex: 0 0 44px;
        width: 44px;
        z-index: 1001;
    }
    
    .logo {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        z-index: 10;
        max-width: calc(100% - 100px);
        display: flex !important;
        align-items: center !important;
        text-decoration: none !important;
        color: white !important;
        transition: none !important;
    }
    
    .logo:hover,
    .logo:focus,
    .logo:active,
    .logo:visited {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        text-decoration: none !important;
        color: white !important;
    }
    
    .header-info {
        flex: 0 0 44px;
        width: 44px;
        font-size: 12px;
        text-align: right;
        margin-left: auto;
    }
    
    .header-search-mobile-btn {
        flex: 0 0 44px;
        width: 44px;
        margin-left: auto;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 80px;
    }
    
    body.header-scrolled {
        padding-top: 60px;
    }
    
    .header {
        padding: 3px 0;
    }
    
    .header.scrolled {
        padding: 1px 0;
    }
    
    .header-content {
        padding: 0.75rem;
    }
    
    .logo {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        max-width: calc(100% - 100px);
        display: flex !important;
        align-items: center !important;
        text-decoration: none !important;
        color: white !important;
        transition: none !important;
    }
    
    .logo:hover,
    .logo:focus,
    .logo:active,
    .logo:visited {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        text-decoration: none !important;
        color: white !important;
    }
    
    .logo h1 {
        font-size: 20px;
    }
    
    .header.scrolled .logo h1 {
        font-size: 16px;
    }
    
    .logo img {
        height: 50px;
        margin-right: 10px;
    }
    
    .header.scrolled .logo img {
        height: 40px;
    }
    
    /* Header info elrejtése mobilon */
    .header-info {
        display: none;
    }
}

@media (max-width: 480px) {
    body {
        padding-top: 55px;
    }
    
    body.header-scrolled {
        padding-top: 55px;
    }
    
    .header-content {
        padding: 0.5rem;
    }
    
    .hamburger-menu {
        width: 40px;
    }
    
    .logo {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        max-width: calc(100% - 80px);
        display: flex !important;
        align-items: center !important;
        text-decoration: none !important;
        color: white !important;
        transition: none !important;
    }
    
    .logo:hover,
    .logo:focus,
    .logo:active,
    .logo:visited {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        text-decoration: none !important;
        color: white !important;
    }
    
    .logo h1 {
        font-size: 18px;
    }
    
    .header.scrolled .logo h1 {
        font-size: 15px;
    }
    
    .logo img {
        height: 45px;
        margin-right: 8px;
    }
    
    .header.scrolled .logo img {
        height: 35px;
    }
    
    .hamburger-line {
        width: 20px;
        height: 2.5px;
    }
    
    .header-search-mobile-btn {
        width: 40px;
    }
}

/* Sidebar overlay */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 99;
    opacity: 0;
    transition: opacity 0.3s ease;
}

body.sidebar-open .sidebar-overlay {
    display: block;
    opacity: 1;
}

body.sidebar-open {
    overflow: hidden;
}

/* Z-index rétegek */
.header {
    z-index: 1000;
}

.hamburger-menu {
    z-index: 1001;
}

.sidebar {
    z-index: 100;
}

.sidebar-overlay {
    z-index: 99;
}

/* Animációk */
.header-content,
.logo,
.hamburger-menu,
.nav-link {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Focus states for accessibility */
.hamburger-menu:focus,
.nav-link:focus,
.logo:focus {
    outline: 3px solid rgba(255, 255, 255, 0.3);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .header {
        box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    }
    
    .header.scrolled {
        box-shadow: 0 4px 20px rgba(0,0,0,0.4);
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .header,
    .logo,
    .hamburger-line {
        transition: none !important;
    }
}

/* Print styles */
@media print {
    .header {
        position: static;
        box-shadow: none;
        background: white !important;
        color: black !important;
    }
    
    .hamburger-menu,
    .nav {
        display: none !important;
    }
    
    body {
        padding-top: 0 !important;
    }
}