/* home-animation.css - JAVÍTOTT OLVASHATÓSÁG + NAVBAR csak pre-scroll alatt */

/* ===== ALAPBEÁLLÍTÁSOK ===== */
:root {
    --transition-speed: 0.8s;
    --blur-intensity: 8px;
    --darken-intensity: 0.7;
}

/* Alap body stílusok */
body.pre-scroll {
    margin: 0;
    padding: 0;
    overflow: hidden;
    height: 100vh;
}

body.scroll-enabled {
    overflow-y: auto;
    height: auto;
    min-height: 100vh;
}

/* ===== NAVBAR MAGASSÁG VÁLTOZÓK ===== */
:root {
    --transition-speed: 0.8s;
    --blur-intensity: 8px;
    --darken-intensity: 0.7;
    --navbar-height-desktop: 60px;
    --navbar-height-mobile: 50px;
}

/* ===== NAVBAR – CSAK PRE-SCROLL ÁLLAPOTBAN (ÜVEGHATÁS) ===== */
/* Csak akkor glass effect, ha a body-n ott a pre-scroll osztály */
body.pre-scroll #main-navbar {
    background: rgba(240, 248, 255, 0.4) !important;  /* Növelt átlátszatlanság */
    backdrop-filter: blur(12px) !important;
    width: 90%;
    max-width: 1200px;
    left: 50%;
    transform: translateX(-50%);
    border-radius: 60px !important;
    margin-top: 0 !important;  /* Eltávolítva a felső margó, hogy ne legyen rés */
    /* további stílusok */
}

/* Navbar linkek – sötétzöld a kontrasztért (pre-scroll alatt) */
body.pre-scroll #main-navbar .nav-item a {
    color: #1F4F3F !important;
    font-weight: 600;
    transition: color 0.2s ease;
}

body.pre-scroll #main-navbar .nav-item a:hover {
    background-color: rgba(107, 142, 35, 0.25) !important;
    color: #0F2F1F !important;
    border-radius: 40px;
}

body.pre-scroll #main-navbar .nav-item a.active {
    background-color: rgba(15, 47, 31, 0.3) !important;
    color: #FFFFFF !important;
    border-radius: 40px;
}

/* Hamburger menü ikonok (mobil) – sötétzöld (pre-scroll alatt) */
body.pre-scroll .hamburger span {
    background-color: #1F4F3F !important;
}

body.pre-scroll .hamburger:hover span {
    background-color: #8FBC8F !important;
}

/* Állapot, amikor a navbar a görgetési animáció után is üveges marad (de még pre-scroll alatt) */
body.pre-scroll #main-navbar.scrolled-navbar {
    background: rgba(240, 248, 255, 0.4) !important;  /* Növelt átlátszatlanság */
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15) !important;
}

/* ===== GLASS EFFECT A MOBIL MENÜRE (pre-scroll alatt) ===== */

body.pre-scroll #main-navbar .nav-wrapper .nav-item a {
    color: #4b8a5e !important;
}

body.pre-scroll #main-navbar .nav-wrapper .nav-item a:hover {
    background-color: rgba(107, 142, 35, 0.2) !important;
    color: #0F2F1F !important;
}

body.pre-scroll #main-navbar .nav-wrapper .nav-item a.active {
    background-color: rgba(27, 122, 40, 0.25) !important;
    color: #FFFFFF !important;
}

/* ===== HERO SECTION (Teljes képernyős kép) ===== */
.hero-section {
    position: fixed;
    top: 0;  /* Változtatva: mostantól mindig a tetején kezdődik, hogy kitöltse a teljes viewport-ot */
    left: 0;
    width: 100%;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.hero-section.active {
    pointer-events: all;
}

/* A háttérkép div */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('./kepek/IMG_1521.jpeg'); /* Cseréld ki! */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    transition: all var(--transition-speed) ease-in-out;
    will-change: filter, transform;
}

/* Aktív állapot - teljesen látható */
.hero-section.active .hero-background {
    filter: brightness(1) blur(0);
    transform: scale(1);
}

/* Homályosított állapot */
.hero-section.fading .hero-background {
    filter: brightness(var(--darken-intensity)) blur(calc(var(--blur-intensity) * 0.5));
}

/* Háttérképes állapot */
.hero-section.background-mode .hero-background {
    filter: brightness(0.6) blur(var(--blur-intensity));
    transform: scale(1.05);
}

/* ===== JAVÍTOTT HERO CONTENT - JOBB OLVASHATÓSÁG ===== */
.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
    padding: 2.5rem;
    background-color: rgba(20, 40, 30, 0.85);
    border-radius: 15px;
    backdrop-filter: blur(8px);
    border: 2px solid rgba(107, 142, 35, 0.6);
    max-width: 800px;
    margin: 0 auto;
    transform: translateY(0);
    transition: all var(--transition-speed) ease-in-out;
    opacity: 0.9;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.5);
    margin-top: 60px;  /* Hozzáadva, hogy a hero tartalom ne kerüljön a navbar alá (navbar magassága) */
}

.hero-section.fading .hero-content {
    opacity: 0.7;
    transform: translateY(-20px);
}

.hero-section.background-mode .hero-content {
    opacity: 0;
    pointer-events: none;
}

/* Hero cím - JOBB OLVASHATÓSÁG */
.hero-title {
    font-size: 4rem;
    margin-bottom: 1rem;
    color: #FFFFFF;
    text-shadow: 3px 3px 8px rgba(0, 0, 0, 0.9), 0 0 15px rgba(0, 0, 0, 0.5);
    font-family: 'Georgia', serif;
    font-weight: 700;
    letter-spacing: 1px;
}

.hero-subtitle {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: #8FBC8F;
    font-weight: 400;
    font-style: italic;
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.8);
    background-color: rgba(0, 0, 0, 0.2);
    display: inline-block;
    padding: 0.3rem 1rem;
    border-radius: 30px;
    margin-top: 0.5rem;
}

/* ===== ANIMÁCIÓS ÁLLAPOTOK ===== */
.hero-section.scrolled {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

.hero-section.background-image {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* ===== TARTALMI RÉSZ ===== */
.main-content {
    position: relative;
    z-index: 1;
    background-color: rgba(243, 239, 232, 0.1);
    min-height: 100vh;
    padding-top: 100px;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity var(--transition-speed) ease-out,
                transform var(--transition-speed) ease-out;
}

.main-content.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ===== RESPONSIVE STÍLUSOK (CSAK PRE-SCROLL ALATT) ===== */
@media (max-width: 768px) {
    .hero-section {
        top: 0;  /* Már a tetején van */
        height: 100vh;  /* Teljes magasság */
    }

    .hero-title {
        font-size: 2.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .hero-content {
        padding: 1.5rem;
        margin: 0 1rem;
        background-color: rgba(20, 40, 30, 0.9);
        margin-top: 50px;  /* Mobil navbar magasság */
    }
    
    .hero-background {
        background-attachment: scroll;
    }
    
    /* Mobil navbar – üveghatás csak pre-scroll alatt */
    body.pre-scroll #main-navbar {
        width: 100%;
        border-radius: 40px !important;
        margin-top: 0 !important;  /* Eltávolítva a felső margó */
        background: rgba(240, 248, 255, 0.5) !important;  /* Növelt átlátszatlanság */
        backdrop-filter: blur(10px) !important;
    }
    
    body.pre-scroll #main-navbar .nav-item a {
        color: #1F4F3F !important;
        text-shadow: none;
    }
    
    body.pre-scroll #main-navbar .nav-item a:hover {
        background-color: rgba(107, 142, 35, 0.2) !important;
    }
    
    body.pre-scroll #main-navbar .nav-item a.active {
        background-color: rgba(15, 47, 31, 0.25) !important;
        color: #FFFFFF !important;
    }
    
    body.pre-scroll .hamburger span {
        background-color: #1F4F3F !important;
    }

    /* Mobil menü glass effect */
    body.pre-scroll #main-navbar .nav-wrapper {
        background: rgba(0, 0, 0, 0.6) !important;  /* Növelt átlátszatlanság */
        backdrop-filter: blur(10px) !important;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2.2rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .hero-content {
        padding: 1rem;
        margin-top: 50px;
    }
}

/* ===== ANIMÁCIÓK ===== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

html {
    scroll-behavior: smooth;
}

@keyframes preloadFadeIn {
    from {
        opacity: 0;
        transform: scale(1.1);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.hero-section.active .hero-background {
    animation: preloadFadeIn 1.5s ease-out;
}