/* Static header – visible only before scroll */
.static-header {
    text-align: center;
    padding: 20px 0 15px;
    background-color: transparent;
    transition: opacity 0.3s ease;
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    flex-wrap: nowrap;
}

.header-logo {
    width: 60px;
    height: auto;
    display: block;
    flex-shrink: 0;
}

.header-text {
    font-size: 24px;
    font-weight: bold;
    letter-spacing: 1px;
    color: #333;
    line-height: 1.2;
    flex-shrink: 1;
}

.static-nav {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
    padding: 15px 0;
}

.nav-button {
    padding: 12px 24px;
    background-color: rgba(200, 200, 200, 0.7);
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: bold;
    min-width: 110px;
    text-align: center;
    position: relative;
    overflow: hidden;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-button:hover {
    transform: scale(1.1);
    background-color: rgba(200, 200, 200, 0.9);
}

.nav-button.active {
    background-color: white;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Sticky nav – appears only on scroll */
.sticky-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 12px 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    transition: all 0.3s ease;
    background: linear-gradient(180deg, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0.6) 100%);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    opacity: 0;
    pointer-events: none;
    transform: translateY(-100%);
}

.sticky-nav.visible {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}

/* Ha csak egy gomb van a navigációban, középre igazítás */
.static-nav:has(.nav-button:only-child),
.sticky-nav:has(.nav-button:only-child) {
    justify-content: center;
}

.single-nav-button {
    justify-content: center;
}

/* ===== MOBIL OPTIMALIZÁLÁS ===== */

/* Tablet nézet (1024px és kisebb) */
@media (max-width: 1024px) {
    .nav-button {
        padding: 12px 20px;
        min-width: 110px;
        font-size: 16px;
    }
    
    .static-nav, .sticky-nav {
        gap: 12px;
        padding: 12px 0;
    }
}

/* Mobil nézet (768px és kisebb) */
@media (max-width: 768px) {
    .header-content {
        gap: 10px;
        flex-wrap: nowrap;
    }
    
    .header-text {
        font-size: 18px;
        text-align: center;
    }
    
    .header-logo {
        width: 50px;
    }
    
    .nav-button {
        padding: 10px 18px;
        min-width: 100px;
        font-size: 15px;
        flex: 1;
        max-width: 120px;
    }
    
    .static-nav, .sticky-nav {
        gap: 8px;
        padding: 10px 8px;
        display: flex;
        justify-content: space-between;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .static-header {
        padding: 15px 0 10px;
    }
}

/* Kismobil nézet (480px és kisebb) - 1% GOMB KÖR ALAKÚ */
@media (max-width: 480px) {
    .nav-button[data-page="onepercent"] {
        width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 50%;
        min-width: auto;
        flex: 0 0 auto;
        font-size: 14px;
        font-weight: bold;
    }
    
    .nav-button:not([data-page="onepercent"]) {
        padding: 12px 16px;
        min-width: 90px;
        font-size: 14px;
        flex: 1;
        max-width: 110px;
        height: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .header-content {
        gap: 8px;
    }
    
    .header-text {
        font-size: 16px;
    }
    
    .header-logo {
        width: 45px;
    }
    
    .static-nav, .sticky-nav {
        gap: 6px;
        padding: 8px 6px;
        align-items: center;
    }
    
    .sticky-nav {
        padding: 8px 6px;
    }
    
    .static-header {
        padding: 12px 0 8px;
    }
}

/* Extra kismobil nézet (360px és kisebb) */
@media (max-width: 360px) {
    .nav-button[data-page="onepercent"] {
        width: 40px;
        height: 40px;
        font-size: 12px;
    }
    
    .nav-button:not([data-page="onepercent"]) {
        padding: 10px 12px;
        min-width: 80px;
        font-size: 13px;
        flex: 1;
        max-width: 95px;
        height: 40px;
    }
    
    .static-nav, .sticky-nav {
        gap: 4px;
        padding: 8px 4px;
    }
    
    .header-content {
        gap: 6px;
    }
    
    .header-text {
        font-size: 14px;
    }
    
    .header-logo {
        width: 40px;
    }
}

/* Nagyon szűk képernyők (320px és kisebb) */
@media (max-width: 320px) {
    .nav-button[data-page="onepercent"] {
        width: 38px;
        height: 38px;
        font-size: 11px;
    }
    
    .nav-button:not([data-page="onepercent"]) {
        padding: 8px 10px;
        min-width: 70px;
        font-size: 12px;
        flex: 1;
        max-width: 85px;
        height: 38px;
    }
    
    .static-nav, .sticky-nav {
        gap: 3px;
        padding: 6px 3px;
    }
    
    .header-text {
        font-size: 13px;
    }
    
    .header-logo {
        width: 35px;
    }
    
    .header-content {
        gap: 5px;
    }
}

/* Extra kismobil nézet további finomhangolása */
@media (max-width: 400px) {
    .static-nav, .sticky-nav {
        padding: 8px 4px;
    }
}

/* Általános stílusok */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html, body {
    height: 100%;
    min-height: 100vh;
}

body {
    background-image: url('../images/Hatter.jpg');
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: scroll;
    background-size: auto;
    min-height: 100vh;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

.main-content {
    min-height: calc(100vh - 200px);
    position: relative;
}

/* Mobil nézet optimalizálás navigációhoz */
@media (max-width: 768px) {
    body {
        font-size: 16px;
    }
    
    .main-content {
        min-height: calc(100vh - 150px);
    }
}

/* Extra kismobil nézet további finomhangolása */
@media (max-width: 400px) {
    body {
        font-size: 15px;
    }
}