/* =========================================================================
   KAPCSOLAT OLDAL — TELJESEN ÖNÁLLÓ, GOLYÓÁLLÓ REZSIM (FINISH FINAL FIX)
   ========================================================================= */

/* GLOBÁLIS BIZTONSÁGI ALAPOK */
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; 
}

/* =========================================================================
   1. VASZSIGORÚ ASZTALI FEJLÉC FIXÁLÁS (1441px feletti óriás monitorokra)
   ========================================================================= */
@media (min-width: 1441px) {
    header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 20px 50px !important;
        width: 100% !important;
        position: fixed !important;
        top: 0 !important;
        z-index: 10005 !important;
        background: linear-gradient(to bottom, rgba(248, 239, 230, 1) 40%, rgba(248, 239, 230, 0)) !important;
    }
    
    header .logo img {
         height: 150px !important; width: auto !important; 
    }
    
    nav {
        display: flex !important;
        align-items: center !important;
        gap: 30px !important;
        padding: 10px 30px !important;
        white-space: nowrap !important;
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        background-color: rgba(255, 255, 255, 0.6) !important;
        backdrop-filter: blur(10px) !important;
        border-radius: 50px !important;
    }
    
    nav a {
        font-size: 0.9rem !important;
        font-weight: 600 !important;
    }

    header .btn-dark {
        padding: 12px 25px !important;
        font-size: 0.9rem !important;
    }

    .hero-section {
        padding: 220px 10% 50px 10% !important;
    }
}

/* =========================================================================
   2. LAPTOP ARÁNYOSÍTÁS (1024px - 1440px között) — PRÉMIUM KELLEMES SKÁLÁZÁS
   FARAGÁS: Finomítjuk a fejlécet, hogy tökéletesen illeszkedjen a Rólunk oldalhoz!
   ========================================================================= */
@media (min-width: 1024px) and (max-width: 1440px) {
    header {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        padding: 15px 40px !important; /* Kicsit kompaktabb védősáv */
        width: 100% !important;
        position: fixed !important;
        top: 0 !important;
        z-index: 10005 !important;
        background: linear-gradient(to bottom, rgba(248, 239, 230, 1) 40%, rgba(248, 239, 230, 0)) !important;
    }

    header .logo img {
        height: 150px !important;
        width: auto !important;
    }

    nav {
        display: flex !important;
        align-items: center !important;
        gap: 20px !important; /* Szorosabb, elegánsabb osztás */
        padding: 8px 25px !important;
        white-space: nowrap !important;
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        background-color: rgba(255, 255, 255, 0.6) !important;
        backdrop-filter: blur(10px) !important;
        border-radius: 50px !important;
    }

    nav a {
        font-size: 0.85rem !important; /* Finomabb betűméret laptopra */
        font-weight: 600 !important;
    }

    header .btn-dark {
        padding: 10px 22px !important;
        font-size: 0.85rem !important;
    }

    /* Tartalom távolsága a finomított menü alatt */
    .hero-section {
        padding: 190px 10% 4vw 10% !important;
    }
    .title-main {
        font-size: 3.8vw !important;
        line-height: 1.1 !important;
    }
    .subtitle {
        font-size: 1.1rem !important;
        max-width: 700px !important;
    }

    .contact-container {
        gap: 3vw !important;
        padding-bottom: 6vw !important;
        max-width: 1100px !important;
    }
    .contact-form {
        padding: 40px !important;
    }
}

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

    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;
        position: fixed !important;
        top: 0 !important;
        z-index: 10005 !important;
    }
    
    header .logo img { height: 45px !important; width: auto !important; margin: 0 !important; }
    header .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;
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        gap: 0 !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-section {
        padding: 180px 20px 40px 20px !important;
        display: block !important;
        text-align: center !important;
    }
    .title-main { font-size: 2.5rem !important; line-height: 1.1 !important; margin-bottom: 15px !important; }
    .subtitle { font-size: 1rem !important; line-height: 1.5 !important; }

    .contact-container {
        grid-template-columns: 100% !important;
        padding: 0 20px 60px 20px !important;
        gap: 30px !important;
    }

    .contact-form { padding: 30px 20px !important; border-radius: 20px !important; }
    .form-row { flex-direction: column !important; gap: 0 !important; }
    .form-group { margin-bottom: 15px !important; }
    .form-group input, .form-group textarea { padding: 12px 15px !important; }
    .submit-btn { padding: 15px 20px !important; }

    .contact-info { gap: 15px !important; }
    .info-card { padding: 20px !important; gap: 15px !important; border-radius: 15px !important; transform: none !important; }
    .info-card i { width: 45px !important; height: 45px !important; min-width: 45px !important; font-size: 1.1rem !important; }
    .info-card-text strong { font-size: 0.95rem !important; }

    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; }
}