/* =================================================================
   SAVET ZA MEDIJE - EGYEDI STÍLUSLAP (Verzió 12.0 - Végleges)
   ================================================================= */

/* === 1. Alapbeállítások és Változók === */
:root {
    --primary-blue: rgb(21, 62, 117);
    --secondary-red: rgb(201, 53, 62);
    --white-color: #ffffff;
    --dark-text-color: #333333;
    --light-gray-bg: #f8f9fa;
    --border-color: #dee2e6;
    --font-body: "Open Sans", sans-serif;
    --font-weight-regular: 400;
    --font-weight-bold: 700;
    --font-weight-nav-link: 600;
}

/* === 2. Globális stílusok és Reset === */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html,
body {
    font-family: var(--font-body);
    color: var(--dark-text-color);
    line-height: 1.6;
}

a {
    color: var(--primary-blue);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

ul {
    list-style: none;
}

button {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
}

/* === 3. Layout === */
.container {
    width: 100%;
    max-width: 1200px;
    padding: 0 15px;
    margin: 0 auto;
}

.main-layout {
    display: flex;
    flex-direction: column;
    gap: 30px;
    margin-top: 2rem;
}

/* === 4. Fejléc === */
.site-header {
    background-color: var(--light-gray-bg);
    border-bottom: 1px solid var(--border-color);
    padding: 0.5rem 0;
    position: relative;
    z-index: 100;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.06);
    /* EZ AZ ÚJ SOR */
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 60px;
}

.logo img {
    max-height: 75px;
}

.header-right-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* === 5. Fő Navigáció (Mobil-First) === */
.nav-links {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 30px;
    padding: 60px 40px;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(5px);
    z-index: 1000;
    visibility: hidden;
    opacity: 0;
    transform: scale(1.1);
    transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s 0.3s;
}

.nav-links .nav-link {
    font-size: 1.5rem;
}

.nav-link-inactive {
    color: #999 !important;
    /* Szürke színnel jelezzük az inaktivitást */
    cursor: default;
    /* A kurzor nem változik linkké */
}

/* Az inaktív linkek ne húzódjanak alá hoverre */
.nav-link-inactive:hover {
    text-decoration: none;
}

/* A dropdown menüben lévő inaktív elemekre is vonatkozik */
.dropdown-menu .nav-link-inactive {
    padding: 0.5rem 1.5rem;
    /* Megtartjuk a paddinget az elrendezés miatt */
    display: block;
}

/* === 6. Dropdown Menü (Mobil-First) === */
.has-dropdown {
    position: relative;
    width: 100%;
    text-align: center;
}

.has-dropdown>a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.has-dropdown>a::after {
    content: '';
    display: inline-block;
    width: 0;
    height: 0;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-top: 5px solid var(--dark-text-color);
    transition: transform 0.3s ease;
}

.has-dropdown.active>a::after {
    transform: rotate(180deg);
}

.dropdown-menu {
    width: 100%;
    list-style: none;
    background-color: transparent;
    padding-top: 15px;
    text-align: center;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.has-dropdown.active .dropdown-menu {
    max-height: 500px;
}

.dropdown-menu a {
    font-weight: var(--font-weight-regular);
    font-size: 1.2rem;
    line-height: 1.8;
}

/* === 7. Kereső és Mobil Vezérlők === */
.desktop-search-form {
    display: none;
}

.mobile-search {
    width: 100%;
    max-width: 350px;
    margin-top: auto;
    padding-bottom: 40px;
}

.search-form-mobile {
    display: flex;
}

.search-form-mobile input {
    width: 100%;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    padding: 12px;
    font-size: 1rem;
}

.search-form-mobile button {
    background-color: var(--primary-blue);
    color: var(--white-color);
    border-radius: 3px;
    padding: 12px;
    margin-left: 5px;
}

.mobile-nav-toggle {
    position: relative;
    z-index: 2000;
}

.mobile-nav-toggle .line {
    display: block;
    width: 25px;
    height: 3px;
    background-color: var(--dark-text-color);
    margin: 5px 0;
    transition: all 0.3s ease-in-out;
}

body.menu-open .nav-links {
    visibility: visible;
    opacity: 1;
    transform: scale(1);
    transition-delay: 0s;
}

body.menu-open .mobile-nav-toggle .line:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

body.menu-open .mobile-nav-toggle .line:nth-child(2) {
    opacity: 0;
}

body.menu-open .mobile-nav-toggle .line:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* === Űrlap Stílusok === */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: var(--font-weight-bold);
}

.form-control {
    display: block;
    width: 100%;
    padding: 0.75rem;
    font-size: 1rem;
    border: 1px solid var(--border-color);
    border-radius: 5px;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 2px rgba(21, 62, 117, 0.25);
}

textarea.form-control {
    min-height: 150px;
    resize: vertical;
}

.text-danger {
    color: var(--secondary-red);
}

/* === 8. Tartalom, Oldalsáv, Lábléc === */
.main-content {
    flex: 1;
}

.sidebar {
    flex-basis: 300px;
}

.card {
    border: 1px solid var(--border-color);
    border-radius: 5px;
    margin-bottom: 1.5rem;
}

.card-header {
    background-color: var(--light-gray-bg);
    padding: 0.75rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    font-weight: var(--font-weight-bold);
}

.card-body {
    padding: 1.25rem;
}

.site-footer {
    background-color: var(--dark-text-color);
    color: var(--white-color);
    text-align: center;
    padding: 2rem 0;
    margin-top: 2rem;
}

/* === 9. Nyelvváltó === */
/* JAVÍTÁS: A helyes, "badge" stílusok, amik mobilon is működnek */
.lang-switcher {
    display: flex;
    background-color: #e9ecef;
    border-radius: 50px;
    padding: 4px;
}

.lang-switcher a {
    font-size: 0.9rem;
    font-weight: var(--font-weight-bold);
    text-decoration: none;
    padding: 4px 12px;
    border-radius: 50px;
    color: var(--dark-text-color);
    transition: all 0.3s ease;
}

.lang-switcher a.active {
    background-color: var(--primary-blue);
    color: var(--white-color);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.lang-switcher span {
    display: none;
}

/* === Hír Rács (News Grid) === */
.news-grid {
    display: grid;
    /* Alapból 1 oszlop (mobil-first) */
    grid-template-columns: 1fr;
    gap: 2rem;
}

.news-card {
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    /* Biztosítja, hogy a kép ne lógjon ki a lekerekített sarkoknál */
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.news-card-image {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    /* Ez segít a border-radius-t megtartani */
}

.news-card-image picture,
.news-card-image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.category-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: var(--secondary-red);
    color: var(--white-color);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.8rem;
    font-weight: var(--font-weight-bold);
    text-transform: uppercase;
}

.news-card-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    /* A tartalom kitölti a maradék helyet */
}

.news-card-title {
    font-size: 1.25rem;
    font-weight: var(--font-weight-bold);
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.news-card-title a {
    color: var(--dark-text-color);
    text-decoration: none;
}

.news-card-title a:hover {
    color: var(--primary-blue);
    text-decoration: underline;
}

.news-card-excerpt {
    font-size: 0.95rem;
    color: #555;
    flex-grow: 1;
    /* A kivonat kitölti a helyet a cím és a gomb között */
}

/* === Hír Rács - Reszponzív beállítások === */
@media (min-width: 600px) {
    .news-grid {
        /* Tablet nézettől 2 oszlop */
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 992px) {
    .news-grid {
        /* Asztali nézettől 3 oszlop */
        grid-template-columns: repeat(3, 1fr);
    }
}



/* =================================================================
   MEDIA QUERY - Asztali nézet (992px-től)
   ================================================================= */
@media (min-width: 992px) {
    .has-dropdown {
        width: auto;
    }

    .main-layout {
        flex-direction: row;
    }

    .mobile-nav-toggle,
    .mobile-search {
        display: none;
    }

    .desktop-search-form {
        display: flex;
        align-items: center;
        border: 1px solid var(--border-color);
        border-radius: 50px;
        background-color: var(--white-color);
        padding: 4px;
    }

    .nav-links {
        display: flex;
        position: static;
        flex-direction: row;
        align-items: center;
        justify-content: center;
        flex-grow: 1;
        width: auto;
        height: auto;
        padding: 0;
        background: none;
        backdrop-filter: none;
        visibility: visible;
        opacity: 1;
        transform: none;
    }

    .nav-links .nav-link {
        font-size: 0.9rem;
    }

    .dropdown-menu {
        width: max-content;
        min-width: 100%;
        max-height: none;
        visibility: hidden;
        opacity: 0;
        transition: opacity 0.2s ease, transform 0.2s ease;
        display: block;
        position: absolute;
        top: calc(100% + 5px);
        left: 50%;
        transform: translateX(-50%) translateY(10px);
        border: 1px solid var(--border-color);
        border-radius: 5px;
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
        background-color: var(--white-color);
        padding: 0.5rem 0;
        text-align: left;
    }

    .has-dropdown.active .dropdown-menu {
        visibility: visible;
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }

    .dropdown-menu a {
        font-size: 0.85rem;
        white-space: nowrap;
        padding: 0.5rem 1.5rem;
    }

    .desktop-search-form input {
        border: none;
        background: transparent;
        padding: 4px 10px;
        outline: none;
    }

    .desktop-search-form button {
        background-color: var(--primary-blue);
        border-radius: 50%;
        width: 30px;
        height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .desktop-search-form button svg {
        stroke: var(--white-color);
    }

    /* A .lang-switcher-re nincs szükség külön media query-re, mert az alap stílusai reszponzívak */
}







/* === Hero Szekció === */
.hero-section {
    display: flex;
    align-items: center;
    gap: 3rem;
    padding: 3rem;
    /* A belső térköz jobban mutat a kerettel */
    border: 1px solid var(--border-color);
    /* Diszkrét keret */
    border-radius: 8px;
    /* Lekerekített sarkok, mint a kártyáknál */
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.07);
    /* Finom árnyék */
    margin-top: 20px;
    /* A hero szekció legyen a fő tartalom alatt */
}

.hero-content {
    flex: 1.2;
    /* Kicsit több helyet adunk a szövegnek */
}

.hero-image {
    flex: 1;
}

.hero-image img {
    width: 100%;
    /* JAVÍTÁS: A kép szélessége igazodjon a tárolója 100%-ához */
    height: auto;
    /* JAVÍTÁS: A magasságot a böngésző állítsa be arányosan */
    object-fit: cover;
    /* JAVÍTÁS: Biztosítja, hogy a kép szépen, torzítás nélkül töltse ki a helyet */
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.hero-title {
    font-size: 2.8rem;
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    margin-bottom: 1rem;
    color: var(--primary-blue);
}

.hero-text {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #555;
}

/* === Gomb stílusok === */
.btn {
    display: inline-block;
    padding: 12px 30px;
    font-size: 1rem;
    font-weight: var(--font-weight-bold);
    text-align: center;
    text-decoration: none;
    border-radius: 50px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    background-color: var(--secondary-red);
    /* A piros szín használata */
    color: var(--white-color);
    border: 2px solid var(--secondary-red);
}

.btn-primary:hover {
    background-color: transparent;
    color: var(--secondary-red);
    text-decoration: none;
}

/* === Hero Szekció - Mobil nézet === */
@media (max-width: 991px) {
    .hero-section {
        flex-direction: column;
        text-align: center;
        padding: 1rem 15px;
        /* MODIFIED: Added horizontal padding */
        align-items: center;
        /* MODIFIED: Align items to center for better visual on small screens */
    }

    .hero-content {
        /* ADDED: To ensure content aligns properly */
        width: 100%;
    }

    .hero-image {
        margin-top: 0;
        margin-bottom: 0;
        order: -1;
        width: 100%;
        /* ADDED: Ensure image takes full width */
    }

    .hero-image img {
        /* ADDED: Ensure image itself adjusts */
        width: 100%;
        height: auto;
    }

    .hero-title {
        font-size: 2.2rem;
    }
}

/* === Betöltésjelző (Loader) === */
#loader p {
    font-weight: bold;
    color: var(--primary-blue);
}

/* === Egyedi Bejegyzés (Single Post) === */
.single-post-card {
    background-color: var(--white-color);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 2rem;
}

/* Breadcrumbs */
.breadcrumbs {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 1.5rem;
}

.breadcrumbs a {
    color: var(--primary-blue);
    text-decoration: none;
}

.breadcrumbs a:hover {
    text-decoration: underline;
}

.breadcrumbs .separator {
    margin: 0 0.5rem;
}

.breadcrumbs svg {
    position: relative;
    top: -2px;
}

/* Post Title */
.post-title {
    font-size: 2.5rem;
    font-weight: var(--font-weight-bold);
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--dark-text-color);
}

/* Szerző és dátum meta sáv */
.post-meta {
    display: flex;
    flex-wrap: wrap;
    /* Mobilon egymás alá törhet, ha nem fér ki */
    gap: 1.5rem;
    /* Térköz a szerző és a dátum között */
    color: #6c757d;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    /* Elválasztó vonal a tartalomtól */
}

.post-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    /* Térköz az ikon és a szöveg között */
}

.post-meta svg {
    position: relative;
    top: -1px;
}

/* Kép és képaláírás */
.post-figure {
    margin: 0 0 1.5rem 0;
}

.post-figure img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.post-figure figcaption {
    font-size: 0.85rem;
    color: #6c757d;
    text-align: center;
    margin-top: 0.5rem;
    font-style: italic;
}

/* Tartalom */
.post-content {
    line-height: 1.8;
    font-size: 1.1rem;
}

.post-content p,
.post-content h2,
.post-content h3,
.post-content ul,
.post-content blockquote {
    margin-bottom: 1.5rem;
}

/* Címkék (Tags) */
.post-tags {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.tag-badge {
    display: inline-block;
    background-color: #e9ecef;
    color: var(--dark-text-color);
    padding: 5px 12px;
    border-radius: 50px;
    font-size: 0.85rem;
    margin-right: 8px;
    margin-bottom: 8px;
    text-decoration: none;
}

.tag-badge:hover {
    background-color: var(--primary-blue);
    color: var(--white-color);
    text-decoration: none;
}

/* Címke hash (#) jelének színezése */
.tag-badge .tag-hash {
    color: var(--primary-blue);
    margin-right: 2px;
    /* Egy apró térköz a # és a szöveg között */
}

/* Mobil nézet finomítások */
@media (max-width: 767px) {
    .single-post-card {
        padding: 1.5rem;
    }

    .post-title {
        font-size: 1.8rem;
    }

    .post-content {
        font-size: 1rem;
    }
}

/* Bejegyzésekben és oldalakon lévő képek stílusa */
.post-figure {
    margin: 2rem 0;
    /* Térköz a kép felett és alatt */
    padding: 8px;
    /* Belső térköz a keret és a kép között */
    border: 1px solid #e0e0e0;
    /* Diszkrét, világosszürke keret */
    background-color: #ffffff;
    /* Fehér háttér a kereten belül */
    border-radius: 5px;
    /* Enyhén lekerekített sarkok */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.07);
    /* Finom, lágy árnyék */
}

.post-figure img {
    display: block;
    /* Megszünteti az esetleges felesleges alsó teret */
    width: 100%;
    /* A kép kitölti a keretet */
    height: auto;
}

.post-figure figcaption {
    margin-top: 0.75rem;
    font-size: 0.9em;
    color: #666;
    text-align: center;
    font-style: italic;
}

.search-result-item {
    margin-bottom: 2rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 2rem;
}

.search-result-title a {
    color: #333;
    text-decoration: none;
}

.search-result-title a:hover {
    color: #007bff;
}

.search-result-excerpt {
    color: #666;
}

.search-result-link {
    font-weight: bold;
}

/* === PARTNER BANNEREK (SIDEBAR) === */

.partner-banners {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    /* Térköz a bannerek között */
}

.banner-item {
    padding: 10px;
    /* Belső térköz a keret és a kép között */
    border: 1px solid #e0e0e0;
    /* Világosszürke keret */
    border-radius: 4px;
    /* Lekerekített sarkok */
    background-color: #fff;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    /* Finom árnyék */
    transition: box-shadow 0.3s ease;
}

.banner-item:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    /* Erősebb árnyék hoverre */
}

/* A kép reszponzívvá tétele a dobozon belül */
.banner-item img {
    display: block;
    width: 100%;
    height: auto;
    /*aspect-ratio: 16 / 9;*/
    /* Biztosítja a 16:9 arányt */
    object-fit: contain;
    /* Biztosítja, hogy a kép ne torzuljon, ha nem pontosan 16:9 */
}

/* A banner alatti felirat stílusa */
.banner-caption {
    text-align: center;
    margin-top: 0.75rem;
    margin-bottom: 0;
    font-size: 0.9em;
}

/* A feliratban lévő link stílusa */
.banner-caption a {
    color: #555;
    text-decoration: none;
    font-weight: 600;
}

.banner-caption a:hover {
    color: var(--primary-color);
    /* A weboldalad fő színét használja (ha van ilyen változód) */
}