:root {
    --bg-color: #f4f1ee;
    --primary-brown: #8d775f;
    --text-dark: #4a4238;
    --primary-green: #8ba888;
    --accent-green: #a7bc95;
    --white: #ffffff;
    --radius-lg: 40px;
    --radius-md: 20px;
    --radius-sm: 10px;
    --transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 50px rgba(141, 119, 95, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a {
    text-decoration: none !important;
    color: inherit;
    transition: var(--transition);
}

html {
    scroll-behavior: smooth;
    /* Sima görgetés az id alapú linkekhez */
}

/* Biztosítja, hogy a horgony ugrásoknál ne takarja ki a címet a fix fejléc */
[id] {
    scroll-margin-top: 160px;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-dark);
    line-height: 1.7;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
.serif {
    font-family: 'Playfair Display', serif;
    font-weight: 600;
}

/* Premium Header */
header {
    background: rgba(253, 250, 246, 0.85);
    /* Slightly Adjusted the baseline color */
    backdrop-filter: blur(15px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(141, 119, 95, 0.08);
    transition: var(--transition);
}

.top-bar {
    background-color: var(--primary-brown);
    color: var(--white);
    padding: 10px 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    box-shadow: inset 0 -2px 5px rgba(0, 0, 0, 0.05);
}

.top-bar .contact-info {
    display: flex;
    gap: 20px;
}

.top-bar .admin-link {
    color: #ffffff !important;
    /* Explicitly white */
    font-size: 1.2rem;
    text-decoration: none;
    line-height: 1;
    display: flex;
    align-items: center;
    gap: 5px;
    opacity: 0.9;
}

.top-bar .admin-link:hover {
    opacity: 1;
}

.fb-link {
    color: white;
    display: flex;
    align-items: center;
    position: relative;
    transition: var(--transition);
}

.fb-link:hover {
    transform: scale(1.2);
}

.fb-tooltip {
    position: absolute;
    top: 30px;
    right: 0;
    background: #000000;
    color: #ffffff !important;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    pointer-events: none;
    z-index: 100;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
}

.fb-link:hover .fb-tooltip {
    opacity: 1;
    visibility: visible;
    top: 35px;
}

.main-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 5%;
    gap: 40px;
    /* Minimum space between logo and menu */
    transition: var(--transition);
}

.logo {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    display: flex;
    align-items: baseline;
    line-height: 1;
}

.logo-text-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.nav-links {
    display: flex;
    gap: 10px;
    align-items: center;
    list-style: none !important;
    list-style-type: none !important;
    padding: 0;
    margin: 0;
    margin-left: auto;
    /* Push to the right */
}

.nav-links>li {
    list-style: none !important;
    list-style-type: none !important;
    display: flex;
    align-items: center;
    padding: 0;
    margin: 0;
    position: relative;
    background: none !important;
    /* Elvileg semmi ne zavarjon be */
}

.nav-links>li::before,
.nav-links>li::after {
    display: none !important;
    /* Esetleges ál-elemek törlése */
}

.nav-links>li>a {
    font-weight: 500;
    font-size: 0.92rem;
    color: var(--text-dark);
    padding: 10px 18px;
    /* Reduced from 12px 24px */
    border-radius: 100px;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1.2;
    text-decoration: none !important;
}

.nav-links>li>a:hover,
.nav-links>li.active>a {
    background-color: var(--primary-green) !important;
    color: var(--white) !important;
    box-shadow: 0 4px 12px rgba(139, 168, 136, 0.4);
}

/* Dropdown */
.dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--white);
    min-width: 220px;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-sm);
    padding: 10px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: var(--transition);
}

.nav-links>li:hover .dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown li a {
    display: block;
    padding: 10px 20px;
    font-size: 0.95rem;
}

.dropdown li a:hover {
    background-color: var(--bg-color);
    color: var(--primary-green);
}

/* Hero Section Refined */
.hero {
    min-height: 100vh;
    padding-top: calc(var(--header-height, 160px) + 80px);
    /* Increased gap to ensure no overlap */
    padding-bottom: 60px;
    padding-left: 5%;
    padding-right: 5%;
    display: flex;
    align-items: flex-start;
    /* Aligned to top for hero content */
    justify-content: center;
    gap: 80px;
}

.sub-page {
    padding-top: calc(var(--header-height, 160px) + 100px);
    /* More breathing room for titles */
    padding-bottom: 80px;
    padding-left: 5%;
    padding-right: 5%;
}

.hero-content {
    flex: 1.2;
    z-index: 2;
}

.hero-content h1,
.section-title h1 {
    font-size: 4rem;
    margin-bottom: 25px;
    line-height: 1.1;
    color: var(--primary-brown);
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.02);
    font-style: italic;
    perspective: 1000px;
}

.split-text {
    display: inline-block;
}

.split-text .char {
    display: inline-block;
    opacity: 0;
    transform: rotateY(-90deg) scale(0.5);
    transition: all 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    backface-visibility: hidden;
}

.split-text .char.animate {
    opacity: 1;
    transform: rotateY(0deg) scale(1);
}

.split-text .space {
    width: 0.3em;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--text-dark);
    /* Changed from --text-light to --text-dark as --text-light is not defined */
    margin-bottom: 30px;
    max-width: 500px;
}

.hero-image-container {
    flex: 1;
    position: relative;
}

.hero-image {
    width: 550px;
    /* Fixed base width for consistency */
    max-width: 100%;
    /* Keep it responsive */
    height: auto;
    /* Maintain aspect ratio */
    max-height: 800px;
    display: block;
    margin: 0 auto;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    object-fit: cover;
    /* Use cover but with the fixed width to maintain look */
}

.hero-image:hover {
    transform: scale(1.03);
}

.btn {
    display: inline-block;
    padding: 15px 35px;
    border-radius: 50px;
    font-weight: 500;
    cursor: pointer;
    border: none;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-primary {
    background-color: var(--primary-green);
    color: var(--white);
}

.btn-primary:hover {
    background-color: var(--accent-green);
}

/* Sections */
section {
    padding: 80px 5%;
}

.section-title {
    text-align: center;
    margin-bottom: 50px;
}

.section-title h1 {
    text-align: center;
}

.section-title .divider {
    width: 60px;
    height: 3px;
    background: var(--primary-green);
    margin: 0 auto;
}

/* Service Cards with Shadow */
.service-card {
    background: var(--white);
    padding: 40px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(141, 119, 95, 0.05);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-lg);
}

/* New Integrated Contact Card */
.contact-container {
    max-width: 1000px;
    margin: 0 auto 60px;
    background: white;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(141, 119, 95, 0.05);
}

.contact-details {
    flex: 1;
    padding: 60px;
    background: linear-gradient(135deg, #ffffff 0%, #fcfbf9 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.contact-details h3 {
    font-size: 2.2rem;
    margin-bottom: 25px;
    color: var(--primary-brown);
}

.contact-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1.05rem;
}

.contact-item svg {
    color: var(--primary-green);
    flex-shrink: 0;
    margin-top: 5px;
}

.contact-map-wrapper {
    flex: 1.2;
    position: relative;
    min-height: 400px;
}

.contact-map-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    filter: grayscale(0.2) contrast(1.1) sepia(0.1);
    /* Boutique/Premium effect */
    transition: var(--transition);
}

.contact-map-wrapper:hover iframe {
    filter: grayscale(0) contrast(1);
}

.map-overlay-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background: var(--white);
    padding: 12px 20px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-md);
    color: var(--text-dark);
    display: flex;
    align-items: center;
    gap: 8px;
    z-index: 10;
}

.map-overlay-btn:hover {
    background: var(--primary-green);
    color: var(--white);
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(141, 119, 95, 0.1);
    font-size: 0.95rem;
    color: var(--text-dark);
}

/* Mobile Fix for Contact Card */
@media (max-width: 900px) {
    .contact-container {
        flex-direction: column;
        border-radius: var(--radius-md);
    }

    .contact-details {
        padding: 40px 30px;
    }

    .contact-details h3 {
        font-size: 1.8rem;
    }

    .contact-map-wrapper {
        min-height: 300px;
    }
}

.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(141, 119, 95, 0.1);
    font-size: 0.9rem;
    color: var(--text-dark);
    /* Changed from --text-light to --text-dark */
}

/* Cookie Popup */
.cookie-popup {
    position: fixed;
    bottom: 20px;
    left: 20px;
    right: 20px;
    max-width: 500px;
    background: var(--white);
    padding: 25px;
    border-radius: var(--radius-md);
    box-shadow: 0 -10px 40px rgba(0, 0, 0, 0.1);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    gap: 15px;
    transform: translateY(200%);
    transition: transform 0.5s ease;
}

.cookie-popup.show {
    transform: translateY(0);
}

.cookie-popup p {
    font-size: 0.9rem;
    color: var(--text-dark);
}

.cookie-popup a {
    color: var(--primary-brown);
    text-decoration: underline;
}

.cookie-actions {
    display: flex;
    gap: 10px;
}

/* Tighten layout before switching to mobile menu */
@media (max-width: 1250px) {
    .nav-links {
        gap: 5px;
    }

    .nav-links>li>a {
        padding: 6px 10px;
        font-size: 0.8rem;
    }

    .main-nav .logo-wrapper {
        gap: 8px;
    }

    .logo {
        font-size: 1.3rem;
    }

    .main-nav .logo-img {
        height: 40px;
    }

    .main-nav {
        gap: 20px;
    }

    .main-nav .slogan {
        font-size: 0.65rem;
        letter-spacing: 0.5px;
    }
}

/* Mobile Nav & Layout Fixes */
.mobile-toggle {
    display: none;
    cursor: pointer;
    font-size: 1.8rem;
    color: var(--primary-brown);
}

/* Mobile Optimizations */
@media (max-width: 1100px) {
    header {
        position: fixed;
    }

    .hero,
    .sub-page {
        padding-top: calc(var(--header-height, 130px) + 40px) !important;
    }

    .hero {
        min-height: auto;
        flex-direction: column-reverse;
        gap: 30px;
        display: flex !important;
    }

    .hero-content {
        width: 100%;
    }

    .hero-image-container {
        display: block !important;
        width: 100%;
        visibility: visible !important;
    }

    .hero-image {
        height: auto;
        max-height: 500px;
        /* Increased slightly for better visibility */
        object-fit: contain;
        /* Consistent with desktop */
        display: block !important;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: var(--white);
        flex-direction: column;
        padding: 15px 0;
        box-shadow: var(--shadow-md);
        gap: 5px;
        z-index: 999;
    }

    .nav-links li {
        width: 100%;
        padding: 0 15px;
    }

    .nav-links li a {
        display: block;
        padding: 12px 20px;
        border-radius: 30px;
        text-align: center;
    }

    .mobile-toggle {
        display: block;
        font-size: 2rem;
        color: var(--primary-brown);
    }

    .top-bar {
        padding: 5px 5%;
        font-size: 0.8rem;
    }

    .main-nav {
        padding: 10px 5%;
    }
}

@media (max-width: 480px) {

    .hero,
    .sub-page {
        padding-top: calc(var(--header-height, 120px) + 15px) !important;
    }

    .hero-content h1 {
        font-size: 1.8rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
    }

    .top-bar {
        flex-direction: column;
        gap: 5px;
        text-align: center;
    }

    .top-bar .contact-info {
        flex-direction: column;
        gap: 0;
    }
}

/* Program Cards */
.programs-grid {
    display: flex;
    flex-direction: column;
    gap: 60px;
    /* Increased gap for better separation */
    margin-top: 40px;
    padding-bottom: 40px;
}

.program-card {
    background: var(--white);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: 0 15px 45px rgba(141, 119, 95, 0.1);
    /* Softer, premium shadow */
    transition: var(--transition);
    border: 1px solid rgba(141, 119, 95, 0.1);
    display: flex;
    flex-direction: row;
    /* Horizontal layout */
    text-align: left;
    min-height: 320px;
    position: relative;
}

.program-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--accent-green));
    z-index: 5;
}

@media (max-width: 1100px) {
    .program-card {
        flex-direction: column;
        /* Vertical on tablet/mobile */
    }
}

.program-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px rgba(141, 119, 95, 0.18);
}

.program-image-wrapper {
    width: 400px;
    /* Fixed width for horizontal image */
    height: auto;
    min-height: 250px;
    overflow: hidden;
    position: relative;
    flex-shrink: 0;
}

@media (max-width: 1100px) {
    .program-image-wrapper {
        width: 100%;
        height: 250px;
    }
}

.program-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center top;
    /* Focus on the top part of the image */
    transition: var(--transition);
}

/* User requested static image (no animation/link) */
.static-img {
    pointer-events: none;
}

.program-date-tag {
    display: inline-flex;
    align-items: center;
    background: rgba(139, 168, 136, 0.12);
    color: var(--primary-green);
    padding: 6px 14px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 700;
    margin-bottom: 12px;
    width: fit-content;
}

.program-card-content {
    padding: 30px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.program-card-content h3 {
    font-size: 1.5rem;
    color: var(--primary-brown);
    margin-bottom: 12px;
    line-height: 1.3;
}

.program-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 15px;
    font-size: 0.85rem;
    color: #888;
    margin-bottom: 15px;
}

.program-meta span {
    display: flex;
    align-items: center;
    gap: 6px;
}

.program-description-wrapper {
    margin-bottom: 20px;
}

.program-description {
    font-size: 0.92rem;
    color: var(--text-dark);
    line-height: 1.6;
    transition: all 0.5s ease;
    overflow: hidden;
}

.program-description.collapsed {
    max-height: 0;
}

.read-more-btn {
    background: none;
    border: none;
    color: var(--primary-brown);
    font-weight: 600;
    cursor: pointer;
    padding: 5px 0;
    font-size: 0.9rem;
    text-decoration: underline;
    margin-top: 5px;
}

.read-more-btn:hover {
    color: var(--primary-green);
}

.program-card-footer {
    padding: 20px 0 0;
    /* Changed for horizontal layout inside content flex */
    border-top: 1px solid rgba(141, 119, 95, 0.05);
    background: transparent;
    margin-top: auto;
}

.no-programs {
    text-align: center;
    padding: 100px 20px;
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.no-programs h2 {
    color: var(--primary-brown);
    margin-bottom: 15px;
}

.no-programs p {
    color: #888;
}