/* ==========================================================================
   Turisztikai Frontend - Modern, kepkozpontu stylesheet
   ========================================================================== */

/* ---------- VALTOZOK ---------- */
:root {
    --brand-primary: #0a7e8c;
    --brand-accent:  #ff8c42;
    --brand-dark:    #1a2a33;
    --brand-light:   #f7f9fb;

    --text:          #1f2d36;
    --text-muted:    #5a6c78;
    --border:        #e3e8ec;
    --white:         #ffffff;

    --shadow-sm: 0 2px 6px rgba(0,0,0,0.06);
    --shadow-md: 0 6px 24px rgba(0,0,0,0.08);
    --shadow-lg: 0 16px 48px rgba(0,0,0,0.12);

    --radius-sm: 4px;
    --radius:    8px;
    --radius-lg: 16px;

    --container: 1200px;

    --font-base: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-heading: "Georgia", "Times New Roman", serif;

    --transition: 0.25s ease;
}

/* ---------- RESET ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: var(--font-base);
    font-size: 17px;
    line-height: 1.65;
    color: var(--text);
    background: var(--white);
    -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--brand-primary); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--brand-accent); }

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--brand-dark);
    line-height: 1.25;
    margin: 0 0 0.5em;
    font-weight: 700;
}

h1 { font-size: clamp(2rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.4rem; }

p { margin: 0 0 1.2em; }

/* ---------- LAYOUT ---------- */
.container {
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 24px;
}

.site-main { min-height: 60vh; }

/* ---------- HEADER ---------- */
.site-header {
    position: sticky;
    top: 0;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    box-shadow: var(--shadow-sm);
    z-index: 100;
}

.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 16px 24px;
}

.brand {
    display: flex;
    flex-direction: column;
    color: var(--brand-dark);
    font-weight: 700;
    text-decoration: none;
}
.brand:hover { color: var(--brand-primary); }
.brand-name { font-family: var(--font-heading); font-size: 1.4rem; line-height: 1; }
.brand-tagline { font-size: 0.78rem; color: var(--text-muted); font-weight: 400; margin-top: 4px; }

/* ---------- MENU ---------- */
.main-nav ul {
    display: flex;
    align-items: center;
    gap: 4px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.main-nav li { position: relative; }

.main-nav a {
    display: block;
    padding: 10px 16px;
    color: var(--text);
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: background var(--transition), color var(--transition);
}

.main-nav li.active > a,
.main-nav a:hover {
    background: var(--brand-light);
    color: var(--brand-primary);
}

.main-nav .submenu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    box-shadow: var(--shadow-md);
    border-radius: var(--radius);
    padding: 8px;
    min-width: 220px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: all 0.2s ease;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
}

.main-nav .has-children:hover .submenu,
.main-nav .has-children:focus-within .submenu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-nav .has-children > a::after {
    content: " ▾";
    font-size: 0.7em;
    opacity: 0.6;
}

/* Search box */
.nav-search form {
    display: flex;
    align-items: center;
    gap: 0;
    background: var(--brand-light);
    border-radius: 999px;
    padding: 4px 4px 4px 16px;
    margin-left: 12px;
}
.nav-search input {
    border: none;
    background: transparent;
    outline: none;
    font: inherit;
    width: 160px;
    color: var(--text);
}
.nav-search button {
    background: var(--brand-primary);
    color: white;
    border: none;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background var(--transition);
}
.nav-search button:hover { background: var(--brand-accent); }

/* ---------- MOBIL MENU TOGGLE ---------- */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
}
.menu-toggle span {
    width: 26px;
    height: 3px;
    background: var(--brand-dark);
    border-radius: 2px;
    transition: all var(--transition);
}
.menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: rotate(45deg) translate(6px, 6px); }
.menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: rotate(-45deg) translate(6px, -6px); }

/* ---------- CIMLAP-BANNER (LEBEGO EXTRA FELIRAT) ---------- */
.homepage-banner {
    color: #ffffff;
    text-align: center;
    padding: 14px 0;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
    position:absolute;
    margin-top:20px;
    z-index:99;
    width:100%;
}

.homepage-banner-inner {
    color: #ffffff;
    width:auto;
}

.homepage-banner-inner p {
    background: #c0392b;
    width:auto;
    font-size:45px;


}

/* Aloldalakon (cimlap kivetelevel) kisebb banner-felirat */
body:not(.page-home) .homepage-banner-inner p {
    font-size: 40px;
}

.homepage-banner-pill :is(p, h1, h2, h3, h4, h5, h6, span, strong, em, li, a) {
    color: #ffffff;
    margin: 0;
}

.homepage-banner-pill p + p,
.homepage-banner-pill p + h1,
.homepage-banner-pill p + h2,
.homepage-banner-pill p + h3,
.homepage-banner-pill p + h4,
.homepage-banner-pill h1 + p,
.homepage-banner-pill h2 + p,
.homepage-banner-pill h3 + p,
.homepage-banner-pill h4 + p {
    margin-top: 4px;
}

.homepage-banner-pill a {
    color: #ffffff;
    text-decoration: underline;
}

.homepage-banner-pill a:hover {
    color: #ffffff;
    opacity: 0.85;
}

/* ---------- HERO ---------- */
.hero {
    position: relative;
    min-height: 70vh;
    background-size: cover;
    background-position: center;
    background-color: var(--brand-dark);
    display: flex;
    align-items: center;
    color: white;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    display: flex;
    align-items: center;
    width: 100%;
}

.hero-content {
    text-align: center;
    color: white;
    position: relative;
    z-index: 2;
    max-width: 800px;
    margin: 0 auto;
    padding: 80px 24px;
}

.hero-title {
    color: white;
    font-size: clamp(2.4rem, 5vw, 4rem);
    text-shadow:
        0 0 8px rgba(0, 0, 0, 0.85),
        0 0 18px rgba(0, 0, 0, 0.7),
        0 0 32px rgba(0, 0, 0, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.6);
    margin-bottom: 20px;
}

.hero-lead {
    font-size: 1.25rem;
    margin-bottom: 32px;
    opacity: 0.95;
    text-shadow:
        0 0 6px rgba(0, 0, 0, 0.85),
        0 0 14px rgba(0, 0, 0, 0.6),
        0 1px 3px rgba(0, 0, 0, 0.7);
}

.hero-noimg {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-dark) 100%);
}

/* ---------- HERO CIMLAP SLIDER ---------- */
.hero-slider {
    overflow: hidden;
    background-color: var(--brand-dark);
}

.hero-slider-viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}

.hero-slider-track {
    display: flex;
    height: 100%;
    width: max-content;
    animation: hero-scroll 60s linear infinite;
    will-change: transform;
}

.hero-slide {
    flex: 0 0 auto;
    height: 100%;
    width: auto;
    object-fit: cover;
    display: block;
    user-select: none;
    pointer-events: none;
}

@keyframes hero-scroll {
    from { transform: translateX(0); }
    to   { transform: translateX(-50%); }
}

/* a track ne alljon meg hover-re sem - igy maradjon folyamatos */
@media (prefers-reduced-motion: reduce) {
    .hero-slider-track {
        animation: none;
    }
}

/* Page hero (kisebb, csak fejlec) */
.page-hero {
    position: relative;
    min-height: 320px;
    background-size: cover;
    background-position: center;
    background-color: var(--brand-dark);
    display: flex;
    align-items: center;
    color: white;
    margin-bottom: 40px;
}

.page-hero-overlay {
    position: absolute;
    inset: 0;
    background: transparent;
    display: flex;
    align-items: center;
    width: 100%;
}

.page-hero-noimg {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-dark) 100%);
    padding: 50px 0;
}

.page-hero-title {
    color: white;
    text-shadow:
        0 0 8px rgba(0, 0, 0, 0.85),
        0 0 18px rgba(0, 0, 0, 0.7),
        0 0 32px rgba(0, 0, 0, 0.5),
        0 2px 4px rgba(0, 0, 0, 0.6);
    margin: 0;
    position: relative;
    z-index: 2;
}

.page-hero-lead {
    color: white;
    font-size: 1.15rem;
    opacity: 0.95;
    margin-top: 12px;
    position: relative;
    z-index: 2;
    text-shadow:
        0 0 6px rgba(0, 0, 0, 0.85),
        0 0 14px rgba(0, 0, 0, 0.6),
        0 1px 3px rgba(0, 0, 0, 0.7);
}

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: var(--radius);
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    border: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.btn-accent {
    background: var(--brand-accent);
    color: white;
    border-color: var(--brand-accent);
}
.btn-accent:hover {
    background: #e87529;
    border-color: #e87529;
    color: white;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-outline {
    background: transparent;
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}
.btn-outline:hover {
    background: var(--brand-primary);
    color: white;
}

.btn-large { padding: 16px 36px; font-size: 1.1rem; }

/* ---------- TARTALOM ---------- */
.page-content {
    padding: 24px;
    max-width: 880px;
    margin: 0 auto 60px;
    font-size: 1.08rem;
}

.page-content h2 { margin-top: 1.8em; }
.page-content h3 { margin-top: 1.5em; }

.page-content img {
    border-radius: var(--radius);
    margin: 24px 0;
    box-shadow: var(--shadow-sm);
}

.page-content blockquote {
    border-left: 4px solid var(--brand-primary);
    padding: 8px 24px;
    margin: 24px 0;
    background: var(--brand-light);
    border-radius: 0 var(--radius) var(--radius) 0;
    font-style: italic;
    color: var(--text-muted);
}

.page-content ul, .page-content ol { padding-left: 24px; margin-bottom: 1.2em; }
.page-content li { margin-bottom: 6px; }

.page-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 24px 0;
}
.page-content th, .page-content td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}
.page-content th { background: var(--brand-light); font-weight: 600; }

/* Home content (szelesebb) */
.home-content { max-width: 900px; padding: 40px 24px; }

/* ---------- KARTYAS GRID (Featured Pages) ---------- */
.featured-pages { padding: 40px 24px 60px; }

.section-title {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
}
.section-title::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    background: var(--brand-accent);
    margin: 12px auto 0;
    border-radius: 2px;
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 28px;
}

.card {
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
    color: var(--text);
    display: flex;
    flex-direction: column;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    color: var(--text);
}

.card-image {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: var(--brand-light);
}
.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}
.card:hover .card-image img { transform: scale(1.06); }
.card-placeholder {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-accent));
}

.card-body { padding: 24px; flex-grow: 1; display: flex; flex-direction: column; }
.card-title { color: var(--brand-dark); margin-bottom: 8px; font-size: 1.25rem; }
.card-excerpt { color: var(--text-muted); font-size: 0.95rem; margin-bottom: 16px; flex-grow: 1; }
.card-link { color: var(--brand-accent); font-weight: 600; }

/* ---------- CTA SECTION ---------- */
.cta-section {
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-dark) 100%);
    color: white;
    padding: 80px 24px;
    text-align: center;
    margin-top: 40px;
}
.cta-inner h2 { color: white; margin-bottom: 16px; }
.cta-inner p { font-size: 1.2rem; margin-bottom: 32px; opacity: 0.95; }

/* ---------- GALERIA ---------- */
.gallery-section { padding: 40px 24px 60px; }
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}
.gallery-item {
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border-radius: var(--radius);
    cursor: zoom-in;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}
.gallery-item:hover img { transform: scale(1.08); }

/* Lightbox */
.lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.94);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 24px;
    backdrop-filter: blur(4px);
    animation: fadeIn 0.2s ease;
}
.lightbox.active { display: flex; }

@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.lightbox-stage {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    max-width: 95vw;
    max-height: 92vh;
    gap: 12px;
}

.lightbox-img {
    max-width: 95vw;
    max-height: 85vh;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    animation: zoomIn 0.25s ease;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.95); }
    to   { opacity: 1; transform: scale(1); }
}

.lightbox-caption {
    color: white;
    font-size: 0.95rem;
    text-align: center;
    max-width: 80vw;
    text-shadow: 0 1px 4px rgba(0,0,0,0.5);
    padding: 4px 12px;
}

.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute;
    background: rgba(255,255,255,0.15);
    border: none;
    color: white;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all var(--transition);
    z-index: 2;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}
.lightbox-prev:hover { transform: translateY(-50%) scale(1.05); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.05); }
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* Inline kepek a tartalomban (WP wp-block-image figure-ok) */
.page-content img.is-zoomable,
.page-content figure.wp-block-image img {
    cursor: zoom-in;
    transition: transform var(--transition), box-shadow var(--transition), filter var(--transition);
}
.page-content img.is-zoomable:hover,
.page-content figure.wp-block-image img:hover {
    transform: scale(1.01);
    box-shadow: var(--shadow-md);
    filter: brightness(1.04);
}

/* WP figure block - tisztab eltartas */
.page-content figure.wp-block-image {
    margin: 32px 0;
    text-align: center;
}
.page-content figure.wp-block-image img {
    margin: 0 auto;
    border-radius: var(--radius);
}
.page-content figure.wp-block-image figcaption {
    margin-top: 12px;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
}

@media (max-width: 600px) {
    .lightbox-close, .lightbox-prev, .lightbox-next {
        width: 44px;
        height: 44px;
        font-size: 1.3rem;
    }
    .lightbox-close { top: 12px; right: 12px; }
    .lightbox-prev { left: 8px; }
    .lightbox-next { right: 8px; }
}

/* ---------- ALERT/MESSAGE BOX (generikus) ---------- */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 24px;
    border: 1px solid transparent;
}
.alert-info { background: #e3f2fd; border-color: #90caf9; color: #0d47a1; }

/* ---------- KERESES OLDAL ---------- */
.search-results { padding: 24px; max-width: 880px; margin: 0 auto 60px; }

.search-form-inline {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
}
.search-form-inline input {
    flex: 1;
    padding: 12px 16px;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    font: inherit;
}
.search-form-inline input:focus {
    outline: none;
    border-color: var(--brand-primary);
}

.result-list { list-style: none; padding: 0; margin: 0; }
.result-item {
    padding: 24px 0;
    border-bottom: 1px solid var(--border);
}
.result-item:last-child { border-bottom: none; }
.result-item h2 { font-size: 1.4rem; margin-bottom: 8px; }
.result-item h2 a { color: var(--brand-primary); }
.result-item p { color: var(--text-muted); margin-bottom: 8px; }
.result-link { color: var(--brand-accent); font-weight: 600; }
mark { background: #fff3cd; padding: 2px 4px; border-radius: 3px; }

/* ---------- 404 ---------- */
.error-content {
    text-align: center;
    padding: 60px 24px;
}

/* ---------- FOOTER ---------- */
.site-footer {
    background: var(--brand-dark);
    color: rgba(255,255,255,0.85);
    margin-top: 60px;
}

.footer-inner {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 48px;
    padding: 60px 24px 40px;
}

.footer-col h3 {
    color: white;
    font-size: 1.15rem;
    margin-bottom: 16px;
}

.footer-col p { color: rgba(255,255,255,0.7); margin-bottom: 12px; }

.footer-col ul { list-style: none; padding: 0; margin: 0; }
.footer-col li { margin-bottom: 8px; }
.footer-col a { color: rgba(255,255,255,0.85); }
.footer-col a:hover { color: var(--brand-accent); }

.footer-col .btn-outline {
    color: white;
    border-color: rgba(255,255,255,0.4);
}
.footer-col .btn-outline:hover {
    background: var(--brand-accent);
    border-color: var(--brand-accent);
    color: white;
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding: 20px 0;
    text-align: center;
}
.footer-bottom small { color: rgba(255,255,255,0.6); }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 900px) {
    .menu-toggle { display: flex; }

    .main-nav {
        position: fixed;
        top: 0; right: -100%;
        height: 100vh;
        width: 280px;
        background: white;
        box-shadow: var(--shadow-lg);
        padding: 80px 24px 24px;
        transition: right 0.3s ease;
        overflow-y: auto;
    }
    .main-nav.is-open { right: 0; }

    .main-nav ul {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
    }

    .main-nav .submenu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background: var(--brand-light);
        margin-top: 4px;
        padding: 4px;
    }

    .nav-search { margin-top: 16px; }
    .nav-search form { width: 100%; }
    .nav-search input { width: 100%; }

    .footer-inner { grid-template-columns: 1fr; gap: 32px; padding: 40px 24px; }
}

@media (max-width: 600px) {
    .hero { min-height: 60vh; }
    .hero-content { padding: 60px 20px; }
    .page-hero { min-height: 220px; }
    .card-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .cta-section { padding: 60px 24px; }
}

/* Egyszeru animacio belepeskor */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(16px); }
    to   { opacity: 1; transform: translateY(0); }
}
.hero-title, .hero-lead, .page-hero-title {
    animation: fadeInUp 0.7s ease both;
}
.hero-lead { animation-delay: 0.15s; }
.card { animation: fadeInUp 0.5s ease both; }
