/* =========================================================================
   TARTALOMKLUB OLDAL — TISZTA ÉS EGYSÉGESÍTETT CSS REZSIM
   ========================================================================= */

/* GLOBÁLIS BIZTONSÁGI ALAPOK */
html, body {
    max-width: 100vw !important;
    width: 100% !important;
    overflow-x: clip !important;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color, #F8EFE6);
    color: var(--text-dark, #2C241B);
}

*, *::before, *::after {
    box-sizing: border-box !important;
}

/* Sorkizárás és törésbiztonság asztali nézeten */
p, .hero-lead, .bento-card p, .phase-text p, .pill-text, .pricing-card p, .free-box p, .story-box p {
    text-align: justify !important;
    text-justify: inter-word !important;
    -webkit-hyphens: none !important;
    -ms-hyphens: none !important;
    hyphens: none !important;
    word-break: keep-all !important;
    overflow-wrap: break-word !important;
    text-align-last: left !important; 
}

/* --- HERO SZEKCIÓ & VÍZJEL --- */
.hero-compact { 
    position: relative !important; 
    padding: 220px 8% 80px 8% !important; 
    display: flex !important; 
    align-items: flex-end !important; 
    min-height: 55vh !important; 
    overflow: hidden !important; 
}

.hero-watermark {
    display: block !important;
    position: absolute !important;
    top: 100px !important;
    right: 8% !important;
    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;
}

.hero-content {
    position: relative !important;
    z-index: 2 !important;
    max-width: 650px !important;
}

.hero-content h1 span.highlight-end { 
    font-family: 'Playfair Display', serif !important; 
    font-style: italic !important; 
    color: var(--text-emerald, #314c37) !important; 
    display: inline-block; 
}

/* Interaktív szavankénti hover a címsorban */
.hero-word {
    display: inline-block;
    cursor: default;
    transform: translateY(0);
    transition: transform .24s cubic-bezier(.22,1,.36,1), text-shadow .24s ease;
    will-change: transform;
}
.hero-word:hover {
    transform: translateY(-9px);
    text-shadow: 0 7px 18px rgba(44,36,27,.12);
}

/* =========================================================================
   1. ASZTALI FEJLÉC FIXÁLÁS (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 ARÁNYOSÍTÁS (1024px - 1440px)
   ========================================================================= */
@media (min-width: 1024px) and (max-width: 1440px) {
    .hero-compact {
        padding: 200px 8% 60px 8% !important;
    }

    .hero-content h1 {
        font-size: 3.5vw !important;
        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;
        font-size: 13vw !important;
    }
}

/* =========================================================================
   3. MOBIL TELEFONOK OPTIMALIZÁLÁSA (768px alatt)
   ========================================================================= */
@media (max-width: 768px) {
    h1, h2, h3, h4, h5, p, span { 
        word-wrap: break-word !important; 
        overflow-wrap: break-word !important; 
        max-width: 100% !important; 
    }

    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;
        gap: 15px !important;
    }
    nav::-webkit-scrollbar { display: none !important; }
    nav a { color: var(--text-dark, #2C241B) !important; opacity: 0.8 !important; text-decoration: none; padding: 0 5px !important; font-size: 0.85rem !important; }
    nav a.active-link, nav a.active { color: var(--text-emerald, #314c37) !important; opacity: 1 !important; }

    /* Mobil Hero & Vízjel */
    .hero-compact {
        padding: 180px 25px 60px 25px !important;
        min-height: auto !important;
        display: block !important;
    }

    .hero-content {
        width: 100% !important;
        max-width: none !important;
    }

    .hero-content h1 {
        font-size: 2.4rem !important;
        line-height: 1.1 !important;
        margin-bottom: 15px !important;
    }

    .hero-watermark {
        font-size: 26vw !important; 
        top: 120px !important;
        right: 2% !important;
        opacity: 1 !important;
        color: rgba(93, 74, 61, 0.04) !important;
    }

    /* Szövegek igazítása mobilon (balra zárás a törések elkerülésére) */
    p, .hero-lead, .bento-card p, .phase-text p, .pill-text, .pricing-card p, .free-box p, .story-box p {
        text-align: left !important;
        text-justify: none !important;
        text-align-last: left !important;
    }

    .section-wrap {
        width: 100% !important;
        max-width: 100% !important;
        padding-left: 20px !important;
        padding-right: 20px !important;
    }

    .bento-grid, .pill-grid { grid-template-columns: 1fr !important; }
    .bento-card { width: 100% !important; padding: 30px 25px !important; }
    .bento-card h3 { font-size: 1.35rem !important; line-height: 1.25 !important; }

    .phase-container { width: 100% !important; padding: 25px !important; }
    .phase-tabs { grid-template-columns: 1fr 1fr !important; }
    .phase-display {
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
        padding: 25px !important;
        gap: 20px !important;
    }
    .phase-text { width: 100% !important; }

    .pill-item { width: 100% !important; padding: 18px 20px !important; }
    .pill-text { font-size: 0.9rem !important; line-height: 1.45 !important; }

    .pricing-card { width: 100% !important; padding: 45px 25px !important; }
    .price { font-size: 2.8rem !important; }

    .story-box { width: 100% !important; padding: 35px 25px !important; }
    .story-box h3 { font-size: 1.8rem !important; line-height: 1.25 !important; }

    .free-box { width: 100% !important; padding: 35px 25px !important; }
    .free-form { width: 100% !important; flex-direction: column !important; }
    .free-input { width: 100% !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;
        display: flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        gap: 10px !important;
    }
    .footer-links a { margin: 0 5px !important; }
}

@media (max-width: 480px) {
    .hero-compact { padding: 160px 20px 50px 20px !important; }
    .hero-content h1 { font-size: 2.25rem !important; }
    .phase-tabs { grid-template-columns: 1fr !important; }
}

/* --- ANIMÁCIÓK --- */
html { scroll-behavior: smooth; }

.scroll-reveal {
    opacity: 0;
    transform: translate3d(0, 70px, 0) scale(.985);
    filter: blur(5px);
    transition: opacity .85s cubic-bezier(.22, 1, .36, 1), transform .95s cubic-bezier(.22, 1, .36, 1), filter .95s cubic-bezier(.22, 1, .36, 1);
}
.scroll-reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    filter: blur(0);
}