:root {
    --primary: #358aeb;
    --primary-hover: #1d4ed8;
    --dark-bg: #1f2937;
    --light-bg: #f3f4f6;
    --text-main: #1f2937;
    --text-muted: #4b5563;
    --accent: #eac56c;
    --white: #ffffff;
    --container-width: 1400px;
    --header-height: 70px;

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: 'Montserrat', ui-sans-serif, system-ui, sans-serif;
    color: var(--text-main);
    line-height: 1.6;
    background-color: var(--white);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

a { text-decoration: none; color: inherit; transition: 0.3s; }
img { max-width: 100%; height: auto; display: block; }

/* === UTILITIES === */
.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 1.5rem;
    width: 100%;
}

.btn {
    display: inline-block;
    background-color: var(--primary);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}
.btn:hover { background-color: var(--primary-hover); }

/* === HEADER === */
header {
    height: var(--header-height);
    background-color: var(--primary);
    color: var(--white);
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
}

.header-inner {
    display: flex;
    justify-content: space-between; /* Pushes Logo to Left, Menu to Right */
    align-items: center;
    width: 100%;
}

#logo { display: flex; align-items: center; font-weight: bold; font-size: 1.3rem; }
#logo img { height: 45px; margin-right: 12px; }

/* Navigation - Desktop */
nav { 
    display: none; 
    gap: 2rem; 
    font-size: 0.95rem;
}
nav a { color: var(--white); font-weight: 500; opacity: 0.9; }
nav a:hover { color: #bfdbfe; }
/* Mobile Menu Button */
#menuGomb { background: none; border: none; color: white; cursor: pointer; display: block; }
#menuGomb svg { width: 30px; height: 30px; }

/* === SECTIONS === */
main {
    margin-top: var(--header-height);
    width: 100%;
}

section {
    width: 100%;
    padding: 4rem 0;
}

section:nth-child(even) { background-color: var(--light-bg); }
section:nth-child(odd) { background-color: var(--white); }

section h1 { text-align: center; margin-bottom: 2rem; font-size: 2rem; color: #333; }

/* === HERO SECTION === */
.intro-section {
    padding-top: 3rem; 
    padding-bottom: 3rem;
    background-color: var(--white); 
}

.intro-content {
    display: flex;
    flex-direction: column; /* Stacks on mobile */
    /* SEPARATION: This gap creates the white space between the image and text */
    gap: 2rem; 
}

/* 1. Image Box Styling */
.intro-img-box {
    width: 100%;
    min-height: 200px;
    border-radius: 12px; /* Rounds the corners */
    overflow: hidden;    /* Ensures image stays inside rounded corners */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* Adds shadow to the image card */
}

.intro-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Ensures image fills the box without distortion */
}

/* 2. Text Box Styling */
.intro-text-box {
    background-color: var(--accent);
    padding: 3rem;
    border-radius: 12px; /* Rounds the corners */
    box-shadow: 0 4px 15px rgba(0,0,0,0.1); /* Adds shadow to the text card */
    
    /* CENTERING LOGIC */
    display: flex;
    flex-direction: column;
    justify-content: center; /* Vertically centers text */
    align-items: center;     /* Horizontally centers the BUTTON */
    text-align: center;      /* Centers the text paragraphs */
    width: 100%;
}

.intro-text-box h1 {
    font-size: 2.2rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: #111;
}

.intro-text-box p {
    font-size: 1.1rem;
    margin-bottom: 2rem;
    color: #333;
    max-width: 90%;
}

/* === SOCIAL ICONS === */
.social-icons {
    display: flex;
    justify-content: center; /* Centers them horizontally */
    align-items: center;
    gap: 2rem; /* Spacing between icons */
    margin-top: 1rem;
}

.social-icons img {
    width: 60px;  /* Forces all icons to be exactly this wide */
    height: 60px; /* Forces all icons to be exactly this tall */
    object-fit: contain; /* Ensures the icon doesn't stretch weirdly */
    border-radius: 12px; /* Optional: rounds the corners slightly like iOS icons */
    transition: transform 0.2s ease; /* Smooth hover animation */
}

/* Hover Effect */
.social-icons a:hover img {
    transform: scale(1.1); /* Slightly enlarges the icon when you hover */
}

/* === PROGRAMOK GRID === */
.program-list { display: flex; flex-direction: column; gap: 3rem; }

.program-card {
    display: flex;
    align-items: flex-start;
    gap: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
}

.program-card.reverse { flex-direction: row-reverse; }

.program-img { flex: 0 0 350px; max-width: 350px; }

.program-img img {
    border-radius: 8px;
    width: 100%;
    height: auto;
    object-fit: cover;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.program-details { flex: 1; }
.program-meta { color: var(--text-muted); margin-bottom: 1rem; font-size: 0.9rem; }

/* === MEDIA PAGE STYLES === */

/* Video Scroll Container - cleaner look */
.video-scroll-container {
    display: flex;
    overflow-x: auto;
    gap: 1.5rem;
    padding: 1rem 0 2rem 0; /* Space for shadow */
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
}

.video-scroll-container iframe {
    flex: 0 0 300px; /* Fixed width for video cards */
    height: 170px;
    border: none;
    border-radius: 12px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    scroll-snap-align: start;
    transition: transform 0.3s ease;
}

.video-scroll-container iframe:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.2);
}

/* Image Gallery Grid */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); /* Responsive columns */
    gap: 1.5rem;
    margin-top: 1rem;
}

.gallery-item {
    width: 100%;
    height: 250px; /* Uniform height */
    object-fit: cover; /* Crops image nicely */
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, filter 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.03); /* Zoom effect */
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    filter: brightness(1.1);
}

/* Lightbox (Full Screen Modal) */
#lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 3000;
    padding-top: 50px;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.9); /* Dark background */
    backdrop-filter: blur(5px);
}

.lightbox-content {
    margin: auto;
    display: block;
    max-width: 90%;
    max-height: 85vh;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(255,255,255,0.2);
    animation: zoomIn 0.3s;
}

#lightbox-close {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

#lightbox-close:hover {
    color: var(--primary);
}

@keyframes zoomIn {
    from {transform:scale(0)} 
    to {transform:scale(1)}
}

/* Pagination Buttons Container */
#navButtons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 2rem;
    padding-bottom: 2rem;
}

/* === FOOTER === */
footer {
    background-color: #333333;
    color: var(--white);
    text-align: center;
    padding: 2rem 0;
    margin-top: auto;
    font-size: 0.9rem;
}

/* === DESKTOP UPDATES (min-width: 1024px) === */
@media (min-width: 1024px) {
    #menuGomb { display: none; }
    nav { display: flex; }
    
    /* Hero Section Side-by-Side */
    .intro-content {
        flex-direction: row; /* Puts them side by side */
        align-items: stretch; /* Forces both boxes to be the same height */
        min-height: 500px; 
    }

    .intro-img-box {
        width: 50%;
        height: auto; 
    }

    .intro-text-box {
        width: 50%;
        /* No extra margin needed, "gap: 2rem" on the parent handles the separation */
    }
}

/* === MOBILE/TABLET ADJUSTMENTS === */
@media (max-width: 1023px) {
    nav {
        display: none;
        position: absolute;
        top: 70px; /* Aligns with bottom of header */
        right: 15px; 
        width: 200px; 
        
        background-color: var(--primary);
        border-radius: 8px; 
        box-shadow: 0 8px 20px rgba(0,0,0,0.2); 
        z-index: 2000;
        
        flex-direction: column;
        padding: 0; 
        overflow: hidden;
        
        /* CRITICAL FIX: Removes the gap inherited from desktop */
        gap: 0; 
    }
    
    nav.active { 
        display: flex; 
        animation: fadeIn 0.2s ease-in-out; 
    }
    
    nav a {
        display: block; /* Ensures the whole area is clickable */
        padding: 12px 0; /* Vertical spacing */
        width: 100%;
        text-align: center;
        color: white;
        font-size: 0.95rem; 
        font-weight: 500;
        border-bottom: 1px solid rgba(255, 255, 255, 0.15); /* Separator lines */
        transition: background 0.2s;
    }

    nav a:last-child {
        border-bottom: none;
    }

    nav a:hover {
        background-color: rgba(0, 0, 0, 0.1); 
    }
    
    /* Mobile Program Card Fixes */
    .program-card, .program-card.reverse { flex-direction: column; }
    .program-img { flex: none; width: 100%; max-width: 100%; }
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}}