﻿/* --- ALAPBEÁLLÍTÁSOK ÉS VÁLTOZÓK --- */
:root {
    /* Színek - Fejléc */
    --header-top-bg: #b8860b; 
    --header-top-text: #ffffff;
    --header-menu-bg: #fff8dc; 
    --header-menu-text: #333333;
    --header-menu-hover: #b8860b;

    /* Színek - Lábléc */
    --footer-bg: #002147; 
    --footer-text: #d3d3d3;

    /* Színek - Tartalom */
    --body-bg: #fdfdfd;
    --text-color: #333;
    --link-color: #0056b3;
    --card-bg: #ffffff;
    
    /* Betűtípusok */
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    --font-heading: 'Georgia', serif;

    /* Méretek */
    --container-width: 1200px;
    
    /* Fejléc magasságok a kompenzációhoz */
    --header-total-height: 150px; 
}

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-main);
    background-color: var(--body-bg);
    color: var(--text-color);
    overflow-x: hidden;
    /* FONTOS: Helyet hagyunk a fix fejlécnek, hogy ne takarja ki a tartalmat */
    padding-top: var(--header-total-height);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; padding: 0; margin: 0; }

/* --- HEADER (FIXED & ANIMÁLT) --- */

/* 1. Felső információs csík */
.header-top {
    background: linear-gradient(135deg, #a0720b 0%, var(--header-top-bg) 50%, #d4af37 100%);
    color: var(--header-top-text);
    text-align: center;
    padding: 0; /* Padding helyett fix magasságot és flexboxot használunk a stabilitásért */
    text-transform: uppercase;
    font-weight: 900;
    letter-spacing: 3px;
    font-size: 1.4rem;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    border-bottom: 4px solid rgba(0,0,0,0.1);
    
    /* FIXED POZÍCIÓ - Kikerül a folyamból, nem rángatja az oldalt */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1002;
    transition: all 0.3s ease-in-out;
    height: 60px; /* Fix magasság */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 2. Navigációs sáv */
.header-nav {
    background-color: rgba(255, 248, 220, 0.95); 
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(184, 134, 11, 0.2);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    
    /* FIXED POZÍCIÓ */
    position: fixed;
    /* A header-top magassága alá kerül kezdetben */
    top: 60px; 
    left: 0;
    width: 100%;
    z-index: 1001;
    transition: all 0.3s ease-in-out;
    height: 90px; /* Kezdeti magasság */
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 25px;
    height: 100%; /* Kitölti a szülőt */
}

/* LOGO */
.school-logo {
    position: relative;
    z-index: 1003;
    /* Belógatjuk */
    transform: translateY(40%); 
    transition: all 0.3s ease-in-out;
}

.school-logo img {
    height: 150px;
    width: 150px;
    background: #fff;
    border-radius: 50%;
    border: 6px solid #fff; 
    box-shadow: 0 0 0 1px rgba(0,0,0,0.05), 0 10px 25px rgba(0,0,0,0.2);
    transition: all 0.3s ease-in-out;
    object-fit: contain;
}

/* --- SCROLLED STATE (Animáció) --- */

/* Amikor görgetünk: */
body.scrolled .header-top {
    /* Felcsúszik a képernyőből, eltűnik */
    transform: translateY(-100%);
}

body.scrolled .header-nav {
    /* Felugrik a képernyő legtetejére (0px), mivel a header-top eltűnt */
    top: 0;
    height: 70px; /* Összemegy */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

body.scrolled .school-logo {
    transform: translateY(0); /* Vissza a sáv közepére */
}

body.scrolled .school-logo img {
    height: 55px;
    width: 55px;
    border: 2px solid #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* MENÜRENDSZER */
.nav-menu { display: flex; align-items: center; gap: 15px; }
.nav-item { position: relative; padding: 8px 16px; cursor: pointer; font-weight: 700; font-size: 1rem; color: var(--header-menu-text); text-transform: uppercase; letter-spacing: 0.5px; border-radius: 20px; transition: all 0.3s ease; }
.nav-item:hover { color: #fff; background-color: var(--header-top-bg); box-shadow: 0 4px 10px rgba(184, 134, 11, 0.3); transform: translateY(-2px); }
.nav-item::after { display: none; }

.nav-item.kreta-link { background-color: #0d6efd; color: white !important; box-shadow: 0 4px 10px rgba(13, 110, 253, 0.3); }
.nav-item.kreta-link:hover { background-color: #0b5ed7; transform: translateY(-2px); }

/* Dropdown menü */
.dropdown-menu { display: none; position: absolute; top: 100%; left: 0; margin-top: 10px; background-color: #fff; box-shadow: 0 10px 30px rgba(0,0,0,0.15); min-width: 240px; z-index: 1001; border: none; border-radius: 12px; padding: 10px; opacity: 0; transform: translateY(10px); transition: all 0.3s ease; }
/* Híd */
.dropdown-menu::after { content: ''; position: absolute; top: -20px; left: 0; width: 100%; height: 20px; background: transparent; }
.nav-item:hover .dropdown-menu { display: block; opacity: 1; transform: translateY(0); animation: none; }
.dropdown-menu::before { content: ''; position: absolute; top: -6px; left: 20px; width: 12px; height: 12px; background: #fff; transform: rotate(45deg); box-shadow: -2px -2px 5px rgba(0,0,0,0.05); }
.dropdown-item { display: block; padding: 10px 15px; border-radius: 8px; color: #555; font-size: 0.95rem; font-weight: 600; border: none; transition: all 0.2s; }
.dropdown-item:hover { background-color: #fff8e1; color: var(--header-top-bg); padding-left: 20px; }

.hamburger { display: none; font-size: 1.8rem; cursor: pointer; color: var(--header-top-bg); padding: 5px; }

/* --- TARTALOM ELRENDEZÉS --- */
/* Margó már nem kell a fixed header miatt, a body padding kezeli */
.main-container { max-width: var(--container-width); margin: 40px auto; padding: 0 15px; display: grid; grid-template-columns: 3fr 1fr; gap: 40px; position: relative; z-index: 10; }
.content-area { background: rgba(255, 255, 255, 0.98); padding: 40px; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,0.03); min-height: 500px; border: 1px solid #fff; }
.sidebar-area { display: flex; flex-direction: column; gap: 25px; }

/* Hírek kártyák */
.news-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 25px; }
.news-card { background: #fff; border-radius: 12px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.03); transition: transform 0.3s, box-shadow 0.3s; cursor: pointer; display: flex; flex-direction: column; border: 1px solid rgba(0,0,0,0.02); }
.news-card:hover { transform: translateY(-8px); box-shadow: 0 15px 30px rgba(0,0,0,0.08); }
.news-img { height: 200px; background-size: cover; background-position: center; position: relative; }
.news-date-badge { position: absolute; top: 15px; left: 15px; background: rgba(255,255,255,0.9); padding: 5px 10px; border-radius: 20px; font-size: 0.75rem; font-weight: bold; color: var(--header-top-bg); box-shadow: 0 2px 5px rgba(0,0,0,0.1); }
.news-body { padding: 20px; }
.news-date { font-size: 0.8rem; color: #888; margin-bottom: 5px; }
.news-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 10px; color: #2c3e50; line-height: 1.3; }
.news-excerpt { color: #666; font-size: 0.95rem; line-height: 1.6; }

/* Lapozó */
.pagination { display: flex; justify-content: center; gap: 10px; margin-top: 40px; }
.page-btn { padding: 10px 20px; background: #fff; border: 1px solid #ddd; border-radius: 30px; cursor: pointer; transition: all 0.2s; font-weight: 600; color: #555; box-shadow: 0 2px 5px rgba(0,0,0,0.05); }
.page-btn:hover { background: var(--header-top-bg); color: white; border-color: var(--header-top-bg); transform: translateY(-2px); }
.page-btn.disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }

/* --- OLDALSÁV (SIDEBAR) STÍLUSOK --- */
.sidebar-wrapper { display: flex; flex-direction: column; gap: 25px; width: 100%; }
.sidebar-card { background: #fff; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); border: 1px solid #f0f0f0; padding: 20px; transition: transform 0.3s ease; overflow: hidden; }
.sidebar-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,0.08); }
.sidebar-header { font-size: 1rem; font-weight: 800; color: var(--header-top-bg); margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid #f8f9fa; text-transform: uppercase; letter-spacing: 1px; }

/* Gyorslinkek */
.quick-link-btn { display: flex; align-items: center; padding: 12px 15px; background-color: #fff; border: 1px solid #eee; border-left: 4px solid transparent; border-radius: 8px; margin-bottom: 10px; color: #555; transition: all 0.2s ease; text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.quick-link-btn:hover { background-color: #fdfdfd; border-left-color: var(--header-top-bg); color: var(--header-top-bg); box-shadow: 0 5px 10px rgba(0,0,0,0.05); text-decoration: none; transform: translateX(5px); }
.quick-link-icon { width: 32px; height: 32px; background-color: rgba(0,0,0,0.04); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin-right: 15px; font-size: 1rem; color: #777; transition: all 0.2s; }
.quick-link-btn:hover .quick-link-icon { background-color: var(--header-top-bg); color: #fff; }

/* Naptár */
.calendar-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 15px; }
.calendar-nav-btn { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #666; text-decoration: none; transition: background 0.2s; border: 1px solid transparent; cursor: pointer; }
.calendar-nav-btn:hover { background-color: #f0f0f0; color: var(--header-top-bg); border-color: #eee; }
.calendar-title-text { font-weight: bold; color: #333; }
.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; text-align: center; }
.calendar-day-name { font-size: 0.75rem; font-weight: bold; color: #aaa; padding-bottom: 5px; text-transform: uppercase; }
.calendar-day { aspect-ratio: 1; display: flex; align-items: center; justify-content: center; border-radius: 50%; font-size: 0.9rem; cursor: pointer; transition: all 0.2s; border: 1px solid transparent; position: relative; }
.calendar-day:hover:not(.empty) { background-color: #f0f0f0; font-weight: bold; }
.calendar-day.today { border-color: var(--header-top-bg); color: var(--header-top-bg); font-weight: 800; }
.type-szunet { background-color: #e8f5e9; color: #198754; }
.type-tanitas { background-color: #f8d7da; color: #dc3545; }
.has-event::after { content: ''; position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); width: 4px; height: 4px; background-color: #dc3545; border-radius: 50%; }
#event-info { margin-top: 15px; padding: 12px; background: #fdfdfd; border-left: 3px solid var(--header-top-bg); border-radius: 0 4px 4px 0; font-size: 0.9rem; display: none; box-shadow: 0 2px 5px rgba(0,0,0,0.03); }
.calendar-loading { opacity: 0.5; pointer-events: none; filter: grayscale(100%); transition: all 0.2s; }

/* Visszaszámláló */
.countdown-card { background: linear-gradient(135deg, var(--header-top-bg) 0%, #8a6200 100%); color: white; text-align: center; border: none; padding: 25px 15px; }
.countdown-container { display: flex; justify-content: center; align-items: flex-start; gap: 5px; }
.countdown-item { display: flex; flex-direction: column; align-items: center; min-width: 55px; }
.cd-number { font-size: 2.2rem; font-weight: 900; line-height: 1; text-shadow: 0 2px 4px rgba(0,0,0,0.2); }
.cd-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1px; margin-top: 5px; opacity: 0.9; }
.cd-separator { font-size: 2rem; font-weight: 700; line-height: 1; margin-top: -2px; opacity: 0.8; }

/* --- KAPCSOLAT OLDAL --- */
.contact-container { max-width: 100%; margin-top: 20px; }
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.contact-full-width { grid-column: 1 / -1; }
.contact-card { background: #fff; border-radius: 8px; box-shadow: 0 4px 6px rgba(0,0,0,0.1); overflow: hidden; border: 1px solid #eee; height: 100%; }
.contact-card-header { background-color: var(--header-top-bg); color: white; padding: 15px 20px; font-size: 1.1rem; font-weight: bold; display: flex; align-items: center; }
.contact-card-header.light { background-color: #f8f9fa; color: #333; border-bottom: 1px solid #eee; }
.contact-card-body { padding: 20px; }
.info-list { list-style: none; padding: 0; margin: 0; }
.info-list li { margin-bottom: 12px; display: flex; align-items: center; }
.info-icon { width: 30px; text-align: center; margin-right: 10px; color: var(--header-top-bg); }
.map-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; border-radius: 4px; border: 1px solid #ddd; margin-top: 15px; }
.map-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; }
.schools-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }

/* --- TANÁROK OLDAL --- */
.teachers-container { padding: 10px; }
.teacher-table { width: 100%; border-collapse: collapse; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.05); border-radius: 8px; overflow: hidden; margin-bottom: 40px; }
.teacher-table thead { background-color: var(--header-top-bg); color: white; }
.teacher-table th { padding: 15px; text-align: left; font-weight: 600; text-transform: uppercase; font-size: 0.9rem; border-bottom: 2px solid rgba(0,0,0,0.1); }
.teacher-table td { padding: 12px 15px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; color: #333; }
.teacher-table tr:last-child td { border-bottom: none; }
.teacher-table tr:hover { background-color: #f9f9f9; }
.teacher-name { font-weight: 700; color: #333; font-size: 1.05rem; }
.subject-badge { display: inline-block; background: #f0f0f0; padding: 3px 8px; border-radius: 4px; font-size: 0.85rem; margin: 2px; color: #555; border: 1px solid #e0e0e0; }
.email-link { color: var(--header-top-bg); text-decoration: none; font-weight: 500; }
.email-link:hover { text-decoration: underline; }
.section-title { margin-top: 30px; margin-bottom: 15px; color: var(--header-top-bg); border-bottom: 2px solid #eee; padding-bottom: 10px; }

/* --- CSENGETÉSI REND --- */
.bell-container { max-width: 800px; margin: 0 auto; padding: 20px; }
.bell-card { background: #fff; border-radius: 12px; box-shadow: 0 4px 20px rgba(0,0,0,0.08); overflow: hidden; border: 1px solid #f0f0f0; }
.bell-header { background-color: var(--header-top-bg); color: white; padding: 20px; text-align: center; font-size: 1.25rem; font-weight: bold; text-transform: uppercase; letter-spacing: 1px; }
.bell-table-wrapper { padding: 0; }
.bell-table { width: 100%; border-collapse: collapse; text-align: center; }
.bell-table th { background-color: #f8f9fa; color: #555; padding: 15px; font-weight: 600; text-transform: uppercase; font-size: 0.85rem; border-bottom: 2px solid #eee; }
.bell-table td { padding: 15px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; color: #333; }
.bell-table tr:last-child td { border-bottom: none; }
.bell-table tr:hover { background-color: #fcfcfc; }
.period-number { font-weight: 800; font-size: 1.2rem; color: #aaa; display: inline-block; width: 40px; border-right: 2px solid #eee; margin-right: 10px; }
.time-badge { display: inline-block; padding: 6px 12px; background-color: #fff8e1; color: var(--header-top-bg); border-radius: 6px; font-weight: 700; font-family: monospace; font-size: 1.1rem; border: 1px solid rgba(184, 134, 11, 0.2); }
.time-separator { color: #ccc; margin: 0 8px; font-weight: 300; }
.period-desc { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.5px; color: #666; font-weight: 600; }

/* --- TANÉV RENDJE --- */
.schedule-container { max-width: 900px; margin: 0 auto; padding: 20px; }
.schedule-card { background: #fff; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); overflow: hidden; border: 1px solid #eee; }
.schedule-header { background-color: var(--header-top-bg); color: white; padding: 20px; text-align: center; }
.schedule-table { width: 100%; border-collapse: collapse; }
.schedule-table th { background-color: #f9f9f9; color: #666; text-transform: uppercase; font-size: 0.85rem; padding: 15px; border-bottom: 2px solid #eee; }
.schedule-table td { padding: 15px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.schedule-table tr:hover { background-color: #fafafa; }
.date-col { font-weight: 700; color: #444; width: 30%; }
.day-name { font-weight: normal; color: #888; font-size: 0.9em; margin-left: 5px; }
.row-start, .row-end { border-left: 5px solid #0d6efd; }
.row-break_start { border-left: 5px solid #ffc107; background-color: #fff9e6; }
.row-break_end { border-left: 5px solid #ffc107; }
.row-break_single, .row-szunet { border-left: 5px solid #198754; background-color: #f0fff4; }
.row-tanitas { border-left: 5px solid #dc3545; background-color: #fff5f5; }
.event-badge { display: inline-block; padding: 4px 8px; border-radius: 4px; font-size: 0.8rem; text-transform: uppercase; font-weight: bold; margin-left: 10px; }
.badge-break { background-color: #d4edda; color: #155724; }
.badge-work { background-color: #f8d7da; color: #721c24; }

/* --- ISKOLAÚJSÁG --- */
.newspaper-container { padding: 10px 0; }
.newspaper-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 25px; margin-top: 30px; }
.newspaper-card { background: #fff; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.05); transition: transform 0.3s ease, box-shadow 0.3s ease; text-decoration: none !important; color: inherit; display: flex; flex-direction: column; overflow: hidden; border: 1px solid #f0f0f0; position: relative; height: 100%; }
.newspaper-card:hover { transform: translateY(-8px); box-shadow: 0 10px 25px rgba(0,0,0,0.1); }
.newspaper-cover-wrapper { width: 100%; padding-top: 130%; position: relative; background-color: #f9f9f9; border-bottom: 1px solid #eee; }
.newspaper-cover { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.newspaper-card:hover .newspaper-cover { transform: scale(1.05); }
.pdf-overlay { position: absolute; bottom: 10px; right: 10px; background: rgba(220, 53, 69, 0.9); color: white; width: 35px; height: 35px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 14px; box-shadow: 0 2px 5px rgba(0,0,0,0.2); }
.newspaper-body { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; justify-content: space-between; text-align: center; }
.newspaper-title { font-weight: 700; font-size: 0.9rem; color: #333; margin-bottom: 10px; line-height: 1.4; }
.newspaper-card:hover .newspaper-title { color: var(--header-top-bg); }
.newspaper-date { font-size: 0.85rem; color: #888; text-transform: uppercase; letter-spacing: 1px; }
.empty-state { text-align: center; padding: 50px; color: #888; background: #fdfdfd; border-radius: 8px; border: 1px dashed #ddd; }

/* --- GALÉRIA / LIGHTBOX / TARTALOM --- */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 10px; margin-top: 15px; }
.gallery-thumb-container { position: relative; width: 100%; padding-top: 100%; overflow: hidden; border-radius: 4px; border: 1px solid #ddd; cursor: pointer; }
.gallery-thumb-container img { position: absolute; top: 0; left: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s ease; }
.gallery-thumb-container:hover img { transform: scale(1.1); }
.lightbox-modal { display: none; position: fixed; z-index: 999999; padding-top: 50px; left: 0; top: 0; width: 100%; height: 100%; overflow: hidden; background-color: rgba(0, 0, 0, 0.95); }
.lightbox-content { margin: auto; display: block; max-width: 90%; max-height: 85vh; object-fit: contain; animation-name: zoom; animation-duration: 0.3s; border: 2px solid #fff; border-radius: 2px; }
@keyframes zoom { from {transform:scale(0.8); opacity: 0;} to {transform:scale(1); opacity: 1;} }
.lightbox-close { position: absolute; top: 20px; right: 30px; color: #f1f1f1; font-size: 50px; font-weight: bold; transition: 0.3s; cursor: pointer; z-index: 1000001; line-height: 0.8; }
.lightbox-close:hover { color: #bbb; }
.lightbox-prev, .lightbox-next { cursor: pointer; position: absolute; top: 50%; width: auto; padding: 20px; margin-top: -50px; color: white; font-weight: bold; font-size: 30px; transition: 0.3s ease; user-select: none; z-index: 1000000; background-color: rgba(0, 0, 0, 0.3); border-radius: 5px; }
.lightbox-next { right: 20px; }
.lightbox-prev { left: 20px; }
.lightbox-prev:hover, .lightbox-next:hover { background-color: rgba(255, 255, 255, 0.2); }
.writing-container, .single-news-container { margin-bottom: 20px; }
.writing-content, .news-content { line-height: 1.8; font-size: 1.05rem; margin-top: 20px; }

/* --- LÁBLÉC --- */
footer { background-color: var(--footer-bg); color: var(--footer-text); padding: 60px 0 20px 0; margin-top: 80px; position: relative; z-index: 10; }
.footer-content { max-width: var(--container-width); margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 40px; padding: 0 15px; text-align: center; }
.footer-content h5 { color: #fff; margin-bottom: 20px; text-transform: uppercase; letter-spacing: 1px; }

/* --- HÁTTÉR --- */
#music-bg { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; overflow: hidden; opacity: 0.12; }
.music-icon { position: absolute; color: #000; font-size: 20px; transition: transform 0.1s linear; }

/* --- MOBIL NÉZET --- */
@media (max-width: 992px) {
    /* Header igazítások */
    .header-top { 
        font-size: 0.8rem; 
        position: sticky; /* Sticky marad mobilon is */
        top: 0;
        padding: 8px 0;
        z-index: 10001; /* Magasabb z-index */
    } 
    
    .header-nav { 
        position: sticky; 
        top: 35px; /* A header-top magassága alatt */
        padding: 5px 0; 
        z-index: 10000; 
    } 
    
    /* Flexbox Layout a menühöz - A gombok ne tűnjenek el */
    .nav-container { 
        justify-content: space-between; 
        height: auto; 
        min-height: 60px;
        padding: 0 15px; 
        flex-wrap: wrap; /* Engedjük a törést */
    }
    
    /* Logo mobilon */
    .school-logo {
        transform: none; 
        margin-right: auto;
        margin-left: 10px;
        order: 1; 
        flex-grow: 1;
    }
    
    .school-logo img { 
        height: 45px; 
        transform: none; 
        box-shadow: none; 
        border: none; 
        padding: 0; 
    }
    
    /* Hamburger ikon */
    .hamburger { 
        display: block; 
        font-size: 1.6rem;
        padding: 10px;
        color: var(--header-menu-text);
        order: 2; 
    }

    /* Mobil Menü - Flex orderrel a logo alá kerül */
    .nav-menu { 
        display: none; 
        width: 100%; 
        background: #fff; 
        flex-direction: column; 
        align-items: stretch;
        padding: 0; 
        box-shadow: 0 15px 30px rgba(0,0,0,0.15);
        max-height: 80vh; 
        overflow-y: auto;
        border-top: 1px solid #eee;
        order: 3; 
        position: static; 
        margin-top: 0;
    }
    
    .nav-menu + .nav-menu { border-top: none; }
    
    .nav-menu.active { display: flex; animation: slideDown 0.3s ease; }
    
    .nav-item { width: 100%; padding: 15px 20px; border-bottom: 1px solid #f5f5f5; border-radius: 0; text-align: left; background: transparent; color: #333; }
    
    .nav-item:hover { background-color: #f9f9f9; color: var(--header-top-bg); box-shadow: none; transform: none; }
    
    .nav-item.kreta-link { background-color: #0d6efd; color: white !important; text-align: center; margin: 10px 20px; width: auto; border-radius: 8px; }

    /* Mobil Dropdown */
    .dropdown-menu { position: static; width: 100%; box-shadow: none; border: none; background: #fdfdfd; padding: 0; margin: 0; display: block; border-left: 4px solid var(--header-top-bg); opacity: 1; transform: none; }
    
    .dropdown-menu::after { display: none; }
    
    .nav-item:has(.dropdown-menu) { background-color: #fafafa; font-weight: 800; }
    
    .dropdown-item { padding: 12px 30px; border-bottom: 1px solid #f0f0f0; color: #666; }

    /* Layout igazítások */
    .main-container { grid-template-columns: 1fr; margin-top: 20px; gap: 30px; }
    .content-area { padding: 20px; }
    .footer-content { grid-template-columns: 1fr; gap: 30px; text-align: center; }
    
    /* Táblázat kártya nézet mobilon */
    .teacher-table thead, .bell-table thead, .schedule-table thead { display: none; }
    .teacher-table, .teacher-table tbody, .teacher-table tr, .teacher-table td,
    .bell-table, .bell-table tbody, .bell-table tr, .bell-table td,
    .schedule-table, .schedule-table tbody, .schedule-table tr, .schedule-table td { display: block; width: 100%; }
    .teacher-table tr, .bell-table tr, .schedule-table tr { margin-bottom: 15px; border: 1px solid #e0e0e0; border-radius: 8px; padding: 15px; background: #fff; box-shadow: 0 2px 5px rgba(0,0,0,0.02); }
    .teacher-table td, .bell-table td, .schedule-table td { padding: 8px 0; text-align: right; border-bottom: 1px solid #f5f5f5; display: flex; justify-content: space-between; align-items: center; }
    .teacher-table td:last-child, .bell-table td:last-child, .schedule-table td:last-child { border-bottom: none; }
    .teacher-table td::before, .bell-table td::before, .schedule-table td::before { content: attr(data-label); float: left; font-weight: 700; text-transform: uppercase; font-size: 0.75rem; color: #999; margin-right: 10px; }
    
    .time-badge { font-size: 0.9rem; padding: 3px 6px; }
    .period-number { font-size: 1rem; border: none; }
    .contact-grid { grid-template-columns: 1fr; }
    .news-grid { grid-template-columns: 1fr; }
}

@keyframes fadeIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: translateY(0); } }