/* =========================================================================
   JOGI ALOLDALAK (ADATKEZELÉS & IMPRESSZUM) EXTRA REZSIMJE
   ========================================================================= */

/* SZÖVEGIGAZÍTÁS ÉS TÖRÉSGÁTLÁS (Word és Könyv dokumentumokhoz) */
.page-text-content p, .document-content p, .page-text-content li, .document-content li {
    text-align: justify !important;
    text-justify: inter-word !important;
    
    /* 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; 
    text-align-last: left !important; 
}

/* =========================================================================
   1. ASZTALI MONITOROK FIXÁLÁSA (1024px felett)
   ========================================================================= */
@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;
        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 NÉZET (1024px - 1440px)
   ========================================================================= */
@media (min-width: 1024px) and (max-width: 1440px) {
    .book-spacer-top {
        height: 160px; /* Laptop képernyőkhöz igazított felső távolság */
    }
    
    /* Könyv mérete laptop kijelzőkhöz skálázva */
    .flip-book-container {
        max-height: 75vh !important;
    }
    
    /* Word lap laptop méretezése */
    .word-sheet {
        padding: 45px 40px !important;
    }
}

/* =========================================================================
   3. MOBIL TELEFONOK (768px alatt) — SOHA TÖBBÉ SZÉTESÉS
   ========================================================================= */
@media (max-width: 768px) {
    
    /* Biztonsági dobozmodell */
    *, *::before, *::after { box-sizing: border-box !important; }
    h1, h2, h3, h4, h5, p, span, li { word-wrap: break-word !important; overflow-wrap: break-word !important; max-width: 100% !important; }

    /* FEJLÉC ÉS KAPSZULA GYŰJTŐMENÜ */
    header { 
        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 { 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; }

    /* SPACER ÉS KONTÉNER IGAZÍTÁSOK MOBILRA */
    .book-spacer-top {
        height: 140px; /* Kényelmes helyet ad a kétsorosra törő mobil fejléc alatt */
    }

    .book-wrapper, .word-document-container {
        padding: 0 15px !important;
        margin-bottom: 60px !important;
    }

    /* KÖNYVLAP ÉS WORD LAP MOBIL FINALIZÁLÁS */
    .flip-book-container {
        border-radius: 12px !important;
    }

    .my-page, .word-sheet {
        padding: 30px 20px !important; /* Kisebb padding, több hely a szövegnek telón */
    }

    .page-text-content h2, .document-content h2 {
        font-size: 1.5rem !important;
        margin-bottom: 15px !important;
    }

    /* HERO SZEKCIÓ JAVÍTÁS (Impresszum oldalhoz) */
    .hero-section {
        padding: 160px 20px 30px 20px !important;
    }

    .title-main {
        font-size: 2.5rem !important;
        line-height: 1.2 !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;
    }
}