/* --- style.css: A kért módosításokkal ellátott verzió --- */

/* --- Alapbeállítások --- */
html, body {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}
*, *::before, *::after {
    box-sizing: inherit;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    line-height: 1.6;
    /* A kért háttérkép, fixen pozícionálva */
    background-image: url('Pics/szolg.png');
    background-attachment: fixed;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    color: #333;
}

h1, h2, h3 {
    margin-bottom: 1rem;
    color: #111;
}

/* --- Fejléc és Tartalom Konténer --- */
.header {
    display: flex;
    justify-content: center;
    padding: 40px 20px;
    text-align: center;
    /* FEJLÉC HÁTTÉR: A kérésnek megfelelően 90%-os áttetszőség (átlátszó fehér) */
    background: rgba(255, 255, 255, 0.9); 
    width: 100%;
    align-items: center;
}

/* Ez a fő tartalom konténer a 90%-os láthatósággal. A container láthatatlan, csak a háttérszíne látszik. */
.content-wrapper {
    max-width: 1100px;
    margin: 20px auto;
    padding: 30px;
    /* TARTALOM HÁTTÉR: 90%-os fehér háttér, így valósul meg a 90% láthatóság a kép felett */
    background-color: rgba(255, 255, 255, 0.9); 
    
    /* Eltávolítottam a box-shadow-t és border-radius-t, hogy ne látszódjon a "container" */
    /* border-radius: 8px; */
    /* box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05); */
}

#content-container {
    /* min-height: 300px;  - Ezt a sort kommenteltem, hogy ne legyen minimális magasság, 
                                és automatikusan méreteződjön. */
    overflow: auto;    /* Biztosítja, hogy a container megnőjön a dinamikus tartalommal */
}

/* --- Asztali Navigáció --- */
#navbar {
    position: relative;
    background-color: #333;
    width: 100%;
    z-index: 1000;
    transition: background-color 0.3s ease;
}

/* Ez az osztály kerül rá a menüre görgetéskor (JavaScript) */
#navbar.sticky {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background-color: #333;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

.logo {
    width: 60%;
    vertical-align: middle;
}

.nav-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0 20px;
}

.desktop-nav {
    list-style-type: none;
    display: flex;
}

.desktop-nav li {
    position: relative;
}

.desktop-nav li a {
    display: block;
    color: white;
    text-decoration: none;
    padding: 18px 20px;
    transition: background-color 0.3s ease;
}

.desktop-nav li a:hover,
.desktop-nav li a:focus {
    background-color: #555;
}

.desktop-nav .fas {
    font-size: 0.7em;
    margin-left: 5px;
}

/* Lenyíló almenük */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #f9f9f9;
    min-width: 260px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
    z-index: 1;
    list-style-type: none;
}

.dropdown-content li a {
    color: black;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown-content li a:hover {
    background-color: #ddd;
}

/* Lenyíló menü megjelenítése */
.dropdown:hover .dropdown-content {
    display: block;
}

/* --- Mobil Navigáció (Hamburger) --- */
.hamburger-menu {
    display: none; /* Alapból rejtve asztali nézetben */
    font-size: 24px;
    color: white;
    cursor: pointer;
    padding: 15px 0;
}

.sidenav {
    height: 100%;
    width: 280px; /* Mobil menü szélessége */
    position: fixed;
    z-index: 1001;
    top: 0;
    left: -280px; /* Balról kint van alapból */
    background-color: #222;
    overflow-x: hidden;
    transition: 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    padding-top: 60px;
}

/* A "behúzó" osztály, amit a JS ad hozzá */
.sidenav.open {
    left: 0;
    box-shadow: 5px 0 15px rgba(0,0,0,0.3);
}

.sidenav a {
    padding: 12px 15px 12px 32px;
    text-decoration: none;
    font-size: 1.1rem;
    color: #f1f1f1;
    display: block;
    transition: 0.3s;
}

.sidenav a:hover {
    color: #fff;
    background-color: #444;
}

.sidenav .close-btn {
    position: absolute;
    top: 10px;
    right: 25px;
    font-size: 36px;
    color: #818181;
}

.sidenav .sub-nav a {
    padding-left: 48px;
    font-size: 0.95rem;
    color: #ccc;
}

/* Sötétítő réteg a tartalom fölé, ha a menü nyitva */
#overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 150;
    display: none; /* Alapból rejtve */
    transition: opacity 0.4s ease;
}

#overlay.active {
    display: block;
}

#navbar-placeholder {
    display: block;
    width: 100%;
    height: 0; /* JS majd kitölti */
}

/* --- Törölve az eredeti "subpage" teszt elem, nincs rá szükség --- */
/*
.subpage {
    width: 100%; 
    height: 100px; 
    background-color: #f4f4f4; 
    text-align: center; 
    line-height: 100px; 
    margin-top: 20px;
}
*/

/* --- Reszponzivitás (Töréspont) --- */
.fade-out { 
    opacity: 0; 
    transition: opacity 0.5s ease; 
}

.fade-in {
    opacity: 0;
    animation: fadeInMove 0.5s ease forwards;
}

@keyframes fadeInMove {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 768px alatt váltunk mobil nézetre */
@media screen and (max-width: 768px) {
    .desktop-nav {
        display: none; /* Asztali menü elrejtése */
    }
    .hamburger-menu {
        display: block; /* Hamburger ikon megjelenítése */
    }
    .nav-container {
        justify-content: flex-start; /* Hamburger a bal oldalra */
        padding: 0 20px;
    }
    .logo {
        width: 100%;
    }
}