/* =========================================================================
   BRANDÉPÍTÉS OLDAL — TELJESEN ÖNÁLLÓ, GOLYÓÁLLÓ REZSIM (NEM LICITÁL)
   ========================================================================= */

/* GLOBÁLIS BIZTONSÁGI ALAPOK (Kilógások ellen) */
html, body {
    max-width: 100vw !important;
    width: 100% !important;
    overflow-x: clip !important;
    margin: 0;
    padding: 0;
    background-color: #F8EFE6;
}

p, .editorial-desc, .deck-text p, .subtitle {
    text-align: justify !important;
    text-justify: inter-word !important; /* Kizárólag a szavak közötti térközt növeli */
    
    /* TELJESEN LEKAPCSOLJUK A SZÓELVÁLASZTÁST */
    -webkit-hyphens: none !important;
    -ms-hyphens: none !important;
    hyphens: none !important;
    
    /* MEGTILTJUK A SZAVAK KETTÉVÁGÁSÁT */
    word-break: keep-all !important;
    overflow-wrap: break-word !important; /* Ha egy szó extrém hosszú lenne, csak akkor töri meg, hogy ne lógjon ki a képernyőről */
    
    /* Az utolsó sor természetes, balra zárt lezárása */
    text-align-last: left !important; 
}

.hero-watermark {
    display: block !important;
    position: absolute !important;
    top: 60px !important;
    right: 5% !important;
    font-size: 15rem !important;
    font-weight: 800 !important;
    color: rgba(93, 74, 61, 0.05) !important; /* Hajszállal erősebb (0.05), hogy biztosan látszódjon */
    z-index: 0 !important; /* A tartalom mögé, de a háttérszín fölé helyezi */
    pointer-events: none !important;
    user-select: none !important;
    white-space: nowrap !important;
}

/* Biztosítjuk, hogy a hero tartalom a vízjel FELETT legyen */
.hero-content {
    position: relative !important;
    z-index: 2 !important;
}

/* Globális Hero igazítás - Lejjebb toljuk a logótól, hogy ne legyen túl közel! */
.hero-compact { 
    position: relative !important; 
    padding: 220px 10% 80px 10% !important; /* JAVÍTÁS: 160px helyett 220px, így elegáns távolságra kerül a logótól! */
    display: flex !important; 
    align-items: flex-end !important; 
    min-height: 50vh !important;
    overflow: hidden !important;
}

/* Globális vízjel igazítás - Beljebb húzzuk a D betűt */
.hero-watermark {
    display: block !important;
    position: absolute !important;
    top: 100px !important;
    right: 8% !important; /* JAVÍTÁS: 5% helyett 8%, így a D betű garantáltan nem lóg ki a képernyőről! */
    font-size: 15rem !important;
    font-weight: 800 !important;
    color: rgba(93, 74, 61, 0.05) !important;
    z-index: 0 !important;
    pointer-events: none !important;
    user-select: none !important;
    white-space: nowrap !important;
}

/* =========================================================================
   1. VASZSIGORÚ ASZTALI FEJLÉC FIXÁLÁS (1024px felett minden monitorra)
   Ez garantálja, hogy a Navigáció sehol se csússzon szét!
   ========================================================================= */
@media (min-width: 1024px) {
    header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 20px 40px !important;
        width: 100% !important;
    }
    
    nav {
        display: flex !important;
        align-items: center !important;
        gap: 20px !important;
        padding: 10px 30px !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important; /* Tilos összenyomni a menüt! */
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
    }
    
    nav a {
        font-size: 0.85rem !important;
        font-weight: 600 !important;
        white-space: nowrap !important;
    }

    .logo { flex-shrink: 0 !important; }
    .logo img { height: 150px !important; width: auto !important; }
    .btn-dark { flex-shrink: 0 !important; white-space: nowrap !important; }
}

/* =========================================================================
   2. LAPTOP ARÁNYOSÍTÁS (1024px - 1440px között) — VIEWPORT DINAMIKA
   ========================================================================= */
@media (min-width: 1024px) and (max-width: 1440px) {
    
    /* Hero szekció szellős igazítása laptopon */
    .hero-compact {
        padding: 200px 10% 60px 10% !important; /* Laptopon is megadjuk a tiszteletbeli távolságot felül */
    }

    .hero-content h1 {
        font-size: 3.5vw !important; /* Arányosan zsugorodik a monitorral */
        line-height: 1.1 !important;
    }

    .hero-content p {
        font-size: 1.1vw !important;
        max-width: 45vw !important;
    }

    .hero-watermark {
        top: 110px !important;
        right: 4% !important; /* Laptop szűkebb kijelzőjén is beljebb húzzuk a D-t */
        font-size: 13vw !important;
    }

    /* KÁRTYAPAKLI ARÁNYOSÍTÁS (Hogy ne lógjon ki a képernyőről függőlegesen) */
    .deck-container {
        padding: 20px 8% 80px 8% !important;
    }

    .deck-card {
        top: 100px !important;
        height: 62vh !important; /* Kisebb monitor magassághoz igazítva */
        min-height: 420px !important;
        padding: 40px !important;
        gap: 40px !important;
        margin-bottom: 60px !important;
        border-radius: 30px !important;
    }

    .deck-text h2 {
        font-size: 2.5vw !important;
        line-height: 1.1 !important;
        margin-bottom: 15px !important;
    }

    .deck-text p {
        font-size: 0.95vw !important;
        line-height: 1.6 !important;
        margin-bottom: 25px !important;
    }

    .deck-btn {
        padding: 12px 28px !important;
        font-size: 0.8rem !important;
    }
}

/* =========================================================================
   3. MOBIL TELEFONOK OPTIMALIZÁLÁSA (768px alatt) — SOHA TÖBBÉ SZÉTESÉS
   ========================================================================= */
@media (max-width: 768px) {
    
    /* Dobozmodell és törésbiztonság a hosszú szavak ellen */
    *, *::before, *::after { box-sizing: border-box !important; }
    h1, h2, h3, h4, h5, p, span { word-wrap: break-word !important; overflow-wrap: break-word !important; max-width: 100% !important; }

    /* FEJLÉC ÉS AZ OKOS GÖRDÜLŐ MENÜ KAPSZULA */
    header, header.scrolled { 
        display: flex !important; 
        flex-wrap: wrap !important; 
        justify-content: space-between !important;
        align-items: center !important; 
        padding: 15px 20px !important; 
        background-color: #F8EFE6 !important; 
        box-shadow: 0 5px 20px rgba(0,0,0,0.05) !important; 
        width: 100% !important;
    }
    
    .logo { font-size: 1.1rem !important; margin: 0 !important; }
    .logo img { height: 45px !important; width: auto !important; margin-right: 10px !important; }
    .btn-dark { width: auto !important; padding: 10px 15px !important; font-size: 0.8rem !important; margin: 0 !important; }
    
    nav { 
        order: 3 !important; 
        width: 100% !important; 
        position: static !important; 
        transform: none !important;
        overflow-x: auto !important; 
        white-space: nowrap !important; 
        justify-content: flex-start !important; 
        padding: 12px 15px !important; 
        margin-top: 10px !important;
        border-radius: 25px !important; 
        border: 1px solid rgba(0, 0, 0, 0.05) !important; 
        background-color: rgba(255, 255, 255, 0.9) !important; 
        box-shadow: none !important;
    }
    nav::-webkit-scrollbar { display: none !important; }
    nav a { color: var(--text-dark) !important; opacity: 0.8 !important; text-decoration: none; margin-left: 0 !important; padding: 0 10px !important; }
    nav a.active-link { color: var(--text-emerald) !important; opacity: 1 !important; }

    /* HERO MOBILRA */
    .hero-compact {
        padding: 180px 25px 60px 25px !important; /* Elég hely a mobil fejlécnek, de nem nyomja össze a szöveget */
        min-height: auto !important;
        display: block !important;
    }

    .hero-content h1 {
        font-size: 2.4rem !important;
        line-height: 1.1 !important;
        margin-bottom: 15px !important;
    }

    .hero-content p {
        font-size: 1rem !important;
        line-height: 1.5 !important;
    }

    .hero-watermark {
        font-size: 22vw !important;
        top: 140px !important;
        right: 2% !important;
    }

    /* KÁRTYÁK MOBIL JAVÍTÁSA (Kikapcsoljuk a sticiky-t, mert mobilon megfojtja a képernyőt) */
    .deck-container {
        padding: 40px 20px 60px 20px !important; /* Külső védőzóna a paklinak */
    }

    .deck-card, .deck-card:nth-child(even) {
        position: relative !important;
        top: 0 !important;
        height: auto !important; /* Elengedjük a merev magasságot! */
        max-height: none !important;
        min-height: auto !important;
        flex-direction: column !important; 
        padding: 40px 25px !important; /* Belül is dúsabb padding, hogy ne legyen zsúfolt az érzet */
        gap: 35px !important; /* Biztonságos távolság a szöveg és a kártya képe között */
        margin-bottom: 40px !important; /* Kártyák közötti szép, tiszta távolság */
        border-radius: 30px !important;
    }

    .deck-text h2 {
        font-size: 1.8rem !important;
        line-height: 1.2 !important;
    }

    .deck-text {
        width: 100% !important;
        padding-bottom: 10px !important;
    }

    .deck-visual {
        width: 100% !important;
        height: 280px !important; /* Kicsit magasabb kép, szebb magazin arány mobilon is */
        border-radius: 20px !important;
    }

    .deck-visual {
        width: 100% !important;
        height: 240px !important; /* Fix, biztonságos mobil magasság a képeknek */
        border-radius: 15px !important;
    }

    /* LÁBLÉC MOBILRA */
    footer {
        flex-direction: column !important;
        text-align: center !important;
        gap: 15px !important;
        padding: 30px 20px !important;
    }
    
    footer .logo img {
        height: 60px !important;
        margin: 0 !important;
    }

    .footer-links {
        margin-top: 5px !important;
    }
    .footer-links a {
        margin: 0 10px !important;
    }
}