:root {
    --light-background: #ffcc00;
    --text-dark: #333333;
    --primary-color: #4a6bff;
    --secondary-color: #ff5277;
    --background-color: #1a1a1a;
    --card-color: #2d2d2d;
    --text-color: #e0e0e0;
    --accent-color: #00aeef;
    --link-color: #66b3ff;
    --link-hover-color: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Roboto', sans-serif;
}

body {
    background-color: var(--light-background);
    color: var(--text-dark);
    line-height: 1.6;
}

header {
    background: var(--light-background);
    padding: 1rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.navbar {
    display: flex;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    align-items: center;
    gap: 2rem;
}

.logo img {
    width: 200px;
    height: auto;
}

.navbar-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.5rem;
    color: #0008a7;
}

.main-nav {
    list-style: none;
    display: flex;
    gap: 1rem;
    padding: 0;
}

.main-nav li {
    padding: 0;
    position: relative;
}

.nav-links {
    color: #0008a7;
    text-decoration: none;
    font-size: 1rem;
    display: block;
    padding: 10px 15px;
}

.nav-links:hover {
    color: #1a2b7c;
    text-decoration: underline;
}

.page-title {
    text-align: center;
    color: #1a2b7c;
    font-size: 2.5rem;
    margin: 2rem 0;
}

main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem;
}

.controls {
    background-color: #ffffff;
    padding: 1rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 2rem;
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.search-bar {
    flex: 1;
    min-width: 0;
    max-width: 400px;
    margin-right: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    border: 1px solid #ccc;
    width: 100%;
    font-size: 0.9rem;
}

.search-container {
    display: flex;
    align-items: center;
    width: 100%;
    justify-content: space-between;
}

.category-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
}

.category-btn {
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    cursor: pointer;
    font-size: 0.85rem;
    transition: background-color 0.2s ease, color 0.2s ease;
    white-space: nowrap;
}

.category-btn:hover {
    background-color: #1a2b7c;
    color: white;
    border-color: #1a2b7c;
}

.category-btn.active {
    background-color: #1a2b7c;
    color: white;
    border-color: #1a2b7c;
}

select {
    padding: 0.75rem 2.5rem 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid #ccc;
    font-size: 1rem;
    font-family: 'Roboto', sans-serif;
    background-color: #ffffff;
    color: var(--text-dark);
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23333' viewBox='0 0 16 16'%3E%3Cpath d='M8 12l-6-6h12z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: calc(100% - 1rem) center;
    background-size: 12px;
    width: auto;
    min-width: 250px;
    max-width: 350px;
    cursor: pointer;
    transition: all 0.3s ease;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

select:hover,
select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 5px rgba(74, 107, 255, 0.3);
}

.links-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0; /* Így módosítsa ezt a sort! */
    width: 100%;
	min-height: 100vh;
    box-sizing: border-box;
}

.link-card {
    background-color: #ffffff;
    border-radius: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    overflow: hidden; /* Ezt a sort adja hozzá! */
}

.link-card:hover {
    transform: translateY(-5px);
}

.link-card-header {
    padding: 1rem;
    color: white;
    font-weight: 700;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.link-card-header.azsia { background-color: #4E2A5A; }
.link-card-header.europa { background-color: #1C3A5E; }
.link-card-header.afrika { background-color: #6D4C1A; }
.link-card-header.eszak-amerika { background-color: #7B2D26; }
.link-card-header.del-amerika { background-color: #1F4032; }
.link-card-header.oceania { background-color: #0D3F48; }

.link-card-body {
    padding: 1rem;
}

.catalog-header {
    text-align: center;
    padding: 1rem 0;
}

.catalog-header h1 {
    margin-bottom: 10px;
    font-size: 2.5rem;
    color: #1a2b7c;
}

.catalog-header h2 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 15px;
}

.catalog-header h3 {
    font-size: 20px;
    margin: 0;
    font-weight: 500;
    color: #555;
}

.country-link-wrapper {
    display: block;
    text-decoration: none;
    color: inherit;
    padding: 1rem; /* Belső tér az esztétikus kinézethez */
}

.country-info {
    padding: 0 !important; /* Távolítsd el a régi belső teret, hogy a link kitöltse */
}

.country-info:hover {
    background-color: #f5f5f5; /* Jelzés, hogy az elem interaktív */
    cursor: pointer;
}

[data-theme="dark"] .country-info:hover {
    background-color: #3a3a3a;
}

.country-info-header {
    display: flex;
    align-items: center;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0008a7; /* Visszaadjuk a link eredeti színét */
    margin-bottom: 0.5rem;
}

[data-theme="dark"] .country-info-header {
    color: #66b3ff; /* Sötét mód színe */
}

.country-info-header img {
    width: 24px;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: contain;
    margin-right: 10px;
}
.temperature-link .link-text {
    color: #0008a7;
    text-decoration: none;
    font-weight: 600;
}

[data-theme="dark"] .temperature-link .link-text {
     color: var(--link-color);
}

.time-display {
    font-size: 1.0rem;
    color: #555;
    margin: 0.5rem 0;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #d3d3d3;
}

.time-display .label {
    display: block;
    margin-bottom: 0.1rem;
    font-weight: 700;
}

.time-display strong {
    margin-right: 0.5rem;
}

.temperature-link {
    font-size: 1.0rem;
    color: #555;
    margin: 0.5rem 0;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #d3d3d3;
}

.temperature-link .label {
    display: block;
    margin-bottom: 0.1rem;
    font-weight: 700;
}

.temperature-link a {
    color: #0008a7;
    text-decoration: none;
    font-weight: 600;
}

.temperature-link a:hover {
    color: #1a2b7c;
    text-decoration: underline;
}

.hidden-info {
    display: none;
}

.show-more-btn {
    width: 100%;
    padding: 0.5rem;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    color: #1a2b7c;
    font-weight: bold;
    margin-top: 0.5rem;
}

.show-more-btn:hover {
    background-color: #e9e9e9;
}

.country-details {
    font-size: 1.1rem;
    color: #666;
    margin-top: 0.5rem;
}

.country-details p {
    margin: 0.25rem 0;
    margin-bottom: 1rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #d3d3d3;
}

.country-details p:last-child {
    border-bottom: none;
}

.country-details strong {
    font-weight: 700;
    display: block;
    margin-bottom: 0.25rem;
}

.country-details a {
    color: #0008a7;
    text-decoration: none;
}

.country-details a:hover {
    color: #1a2b7c;
    text-decoration: underline;
}

.country-details .info-item {
    margin-bottom: 0.75rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #d3d3d3;
}

.country-details .label {
    display: block;
    margin-bottom: 0.1rem;
    font-weight: 700;
}

.hir-link {
    color: #0008a7;
    text-decoration: none;
}

.hir-link:hover {
    color: #1a2b7c;
    text-decoration: underline;
}

.theme-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 25px;
    margin-left: 1rem;
}

.theme-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    transition: .4s;
    border-radius: 30px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 6px;
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.slider::before {
    content: "\f185";
    color: #ffcc00;
    font-size: 18px;
}

.slider::after {
    content: "\f186";
    color: #d3d3d3;
    font-size: 18px;
}

input:checked + .slider {
    background-color: #2d2d2d;
    border-color: #555;
}

input:checked + .slider::before {
    color: #333333;
}

input:checked + .slider::after {
    color: #fff;
}

.action-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.75rem;
    margin-bottom: 0.25rem;
}
.szallas-btn, .repjegy-btn {
    flex: 1;
    padding: 0.4rem 0.5rem;
    border-radius: 8px;
    border: none;
    color: white !important;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    font-weight: bold;
    font-size: 0.9rem;
    transition: all 0.2s ease-in-out;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    display: inline-block;
}
.szallas-btn { background-color: #1d6a9b; }
.repjegy-btn { background-color: #1a9a5b; }

.szallas-btn:hover, .repjegy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}


.country-info.lazy-hidden {
    display: none;
}

[data-theme="dark"] {
    --primary-color: #4a6bff;
    --secondary-color: #ff5277;
    --background-color: #1a1a1a;
    --card-color: #2d2d2d;
    --text-color: #e0e0e0;
    --accent-color: #00aeef;
    --link-color: #66b3ff;
    --link-hover-color: #ffffff;
}

[data-theme="dark"] .main-nav {
    background: #2d2d2d; /* Sötét háttér a lenyíló menünek */
}

[data-theme="dark"] header { background: #2d2d2d; }
[data-theme="dark"] .navbar-toggle { color: var(--link-color); }
[data-theme="dark"] .nav-links { color: var(--link-color); }
[data-theme="dark"] .nav-links:hover { color: var(--link-hover-color); }
[data-theme="dark"] .main-nav { background: #2d2d2d; }
[data-theme="dark"] body { background-color: var(--background-color); color: var(--text-color); }
[data-theme="dark"] .page-title { color: var(--accent-color); }
[data-theme="dark"] .hir-link {
    color: var(--link-color);
    border-bottom: 1px solid #555;
}
[data-theme="dark"] .hir-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
    color: var(--link-hover-color);
    text-decoration: underline;
}
[data-theme="dark"] .catalog-header h1 { color: #ffffff; }
[data-theme="dark"] .catalog-header h2,
[data-theme="dark"] .catalog-header h3 { color: #cccccc; }
[data-theme="dark"] .country-details,
[data-theme="dark"] .country-details strong,
[data-theme="dark"] .country-info { color: #ffffff; }
[data-theme="dark"] .time-display,
[data-theme="dark"] .time-display .label,
[data-theme="dark"] .time-display strong { color: #ffffff; }
[data-theme="dark"] .temperature-link,
[data-theme="dark"] .temperature-link .label { color: #ffffff; }
[data-theme="dark"] .temperature-link a { color: var(--link-color); }
[data-theme="dark"] .temperature-link a:hover { color: var(--link-hover-color); }
[data-theme="dark"] .hir-link:visited { color: #ffffff; }
[data-theme="dark"] .controls { background-color: var(--card-color); }
[data-theme="dark"] select {
    background-color: #3a3a3a;
    color: var(--text-color);
    border-color: #555;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23e0e0e0' viewBox='0 0 16 16'%3E%3Cpath d='M8 12l-6-6h12z'/%3E%3C/svg%3E");
}
[data-theme="dark"] select:hover,
[data-theme="dark"] select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 5px rgba(0, 174, 239, 0.3);
}

[data-theme="dark"] select option {
    background-color: #3a3a3a;
    color: var(--text-color);
}
[data-theme="dark"] .show-more-btn { background-color: #3a3a3a; border-color: #555; color: var(--accent-color); }
[data-theme="dark"] .show-more-btn:hover { background-color: #4a4a4a; }
[data-theme="dark"] .link-card {
    background-color: #2d2d2d;
    color: #ffffff;
}
[data-theme="dark"] .link-card-header {
    background-color: #3a3a3a;
    color: #ffffff;
}
[data-theme="dark"] .link-card-header.azsia { background-color: #5e3a6a; }
[data-theme="dark"] .link-card-header.europa { background-color: #2c4a7e; }
[data-theme="dark"] .link-card-header.afrika { background-color: #7d5c2a; }
[data-theme="dark"] .link-card-header.eszak-amerika { background-color: #8b3d36; }
[data-theme="dark"] .link-card-header.del-amerika { background-color: #2f5042; }
[data-theme="dark"] .link-card-header.oceania { background-color: #1d4f58; }
[data-theme="dark"] .link-card-body { color: #ffffff; }
[data-theme="dark"] .country-info a { color: #66b3ff; }
[data-theme="dark"] .country-info a:hover { color: #ffffff; }
[data-theme="dark"] .country-details a { color: #66b3ff; }
[data-theme="dark"] .country-details a:hover { color: #ffffff; }
[data-theme="dark"] .info-text { background-color: #3a3a3a; }
[data-theme="dark"] .category-btn { background-color: #3a3a3a; color: var(--text-color); }
[data-theme="dark"] .category-btn:hover { background-color: var(--accent-color); color: white; }
[data-theme="dark"] .category-btn.active { background-color: var(--primary-color); color: white; }
[data-theme="dark"] .szallas-btn { background-color: #2a7fca; }
[data-theme="dark"] .repjegy-btn { background-color: #2ac97b; }
[data-theme="dark"] .szallas-btn:hover { background-color: #3a8fdA; }
[data-theme="dark"] .repjegy-btn:hover { background-color: #3ad98b; }

footer {
    background-color: #232323;
    color: white;
    text-align: center;
    padding: 2rem 1rem;
    margin-top: 3rem;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: white;
}

.copyright {
    font-size: 0.9rem;
    color: #999;
}

/* Egyedi ország oldal stílusok */
.country-page, .continent-page {
    display: none;
}

.country-page.active, .continent-page.active {
    display: block;
}

.country-header, .continent-header {
    background: linear-gradient(135deg, #1a2b7c, #0008a7);
    color: white;
    padding: 2rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    text-align: center;
}

.country-flag {
    width: 80px;
    height: auto;
    margin-bottom: 1rem;
    border-radius: 5px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.continent-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.country-title, .continent-title {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

.country-subtitle, .continent-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
}

.country-info-grid, .continent-info-grid {
    display: grid;
    gap: 2rem;
    margin-bottom: 2rem;
    grid-template-columns: 1fr; /* Alapértelmezett (mobil): 1 oszlop */
}

/* Tablet nézettől (768px felett) */
@media (min-width: 768px) {
    .country-info-grid, .continent-info-grid {
        grid-template-columns: repeat(2, 1fr); /* Tablet: 2 oszlop */
    }
}

/* Desktop nézettől (992px felett) */
@media (min-width: 992px) {
    /* Az ország oldalon 3 oszlop kell a 6 dobozhoz */
    .country-info-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    /* A kontinens oldalon marad a 2 oszlopos, mert ott csak 2 doboz van */
    .continent-info-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.info-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.info-card h3 {
    color: #1a2b7c;
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

.info-card a {
    color: #0008a7;
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.info-card a:hover {
    color: #1a2b7c;
    text-decoration: underline;
}

/* SÖTÉT MÓD */
[data-theme="dark"] .info-card a {
    color: var(--link-color); /* #66b3ff */
}

[data-theme="dark"] .info-card a:hover {
    color: var(--link-hover-color); /* #ffffff */
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.info-item:last-child {
    border-bottom: none;
}

.info-label {
    font-weight: 600;
    color: #333;
}

.info-value {
    color: #666;
    text-align: right;
}

.back-button {
    display: inline-block;
    background: #1a2b7c;
    color: white;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    border-radius: 5px;
    margin-bottom: 2rem;
    transition: background 0.3s ease;
}

.back-button:hover {
    background: #0008a7;
}

.continent-countries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.continent-country-card {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

.continent-country-card:hover {
    transform: translateY(-3px);
}

.continent-country-card h4 {
    color: #1a2b7c;
    width: 24px;
    height: auto;
    object-fit: contain;
    margin-right: 10px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    cursor: pointer;
}

.continent-country-card h4 img {
    width: 24px;
    height: auto;
    aspect-ratio: 3 / 2;
    object-fit: contain;
    margin-right: 10px;
}
.seo-intro {
    background-color: rgba(255, 255, 255, 0.7);
    padding: 1.5rem;
    border-radius: 10px;
    margin-bottom: 2rem;
    font-size: 1.1rem;
    line-height: 1.7;
    color: #333;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Sötét mód stílus */
[data-theme="dark"] .seo-intro {
    background-color: rgba(45, 45, 45, 0.7);
    color: #ccc;
}

.seo-intro a {
    color: #0008a7;
    text-decoration: none;
    font-weight: bold;
}

.seo-intro a:hover {
    text-decoration: underline;
    color: #1a2b7c;
}

/* SÖTÉT MÓD a bevezető szöveg linkjeihez */
[data-theme="dark"] .seo-intro a {
    color: var(--link-color); /* Világoskék */
}

[data-theme="dark"] .seo-intro a:hover {
    color: var(--link-hover-color); /* Fehér */
}

.styled-link {
    font-weight: bold;
    text-decoration: none;
}
.styled-link:hover {
    text-decoration: underline;
}

.page-action-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 2rem;
}
.page-action-buttons a {
    flex: 0 1 220px;
}

/* ÚJ STÍLUSOK A "LEGJOBB IDŐ AZ UTAZÁSRA" BOXHOZ */
.info-item.best-time-green .info-value {
    color: #1a9a5b;
    font-weight: bold;
}

.info-item.best-time-yellow .info-value {
    color: #c8a100;
    font-weight: bold;
}

.info-item.best-time-red .info-value {
    color: #ff5277;
    font-weight: bold;
}

.info-item-note {
    font-size: 0.9rem;
    color: #666;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 1px solid #eee;
}

[data-theme="dark"] .info-item-note {
    color: #ccc;
    border-top-color: #444;
}


@media (max-width: 768px) {
 .navbar {
        flex-direction: row; /* Ezt állítsd vissza 'row'-ra a 'column'-ról */
        justify-content: space-between; /* Helyezze a logót és az ikont a két szélre */
        align-items: center;
    }

    .navbar-toggle {
        display: block; /* A hamburger ikon megjelenítése */
    }

    .main-nav {
        display: none; /* A menü alapértelmezett elrejtése mobilon */
        flex-direction: column;
        width: 100%;
        position: absolute; /* Pozicionálás a header-hez képest */
        top: 70px; /* A header magasságától függően */
        left: 0;
        background-color: var(--light-background); /* Háttérszín a menünek */
        box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
        z-index: 999;
    }

    /* Új class, amit a JavaScript fog hozzáadni/eltávolítani */
    .main-nav.active {
        display: flex; /* A menü megjelenítése, ha aktív */
    }
    
    .controls {
        flex-direction: column;
    }
    
    .search-container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .links-container {
        grid-template-columns: 1fr;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .country-title, .continent-title {
        font-size: 2rem;
    }
    
       
    .continent-countries-grid {
        grid-template-columns: 1fr;
    }
}