/* --- ZÁKLADNÍ NASTAVENÍ A PROMĚNNÉ --- */
:root {
    --primary-color: #ccdd96;
    --primary-hover: #b5c982;
    --secondary-color: #3f5d2a;
    
    --dark-color: #333333;
    --light-bg: #f4f7f6;
    --white: #ffffff;
    --text-color: #555555;
    --border-radius: 12px;
    --box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    --transition: all 0.3s ease;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Open Sans', sans-serif; line-height: 1.6; color: var(--text-color); background-color: var(--white); }
h1, h2, h3, h4 { font-family: 'Poppins', sans-serif; color: var(--dark-color); font-weight: 700; }
a { text-decoration: none; color: inherit; }
ul { list-style: none; }
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; }

/* --- TLAČÍTKO --- */
.btn {
    display: inline-block;
    background-color: var(--primary-color);
    color: var(--secondary-color); 
    padding: 12px 30px;
    border-radius: 50px;
    font-weight: 700;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 1px;
    border: none;
    cursor: pointer;
    text-align: center;
}
.btn:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(204, 221, 150, 0.6);
}

/* Specifická třída pro tlačítko v navigaci */
.nav-btn {
    padding: 8px 20px !important; 
    font-size: 0.9rem;
}

/* Sekce */
.section-padding { padding: 80px 0; }
.section-title { text-align: center; font-size: 2.5rem; margin-bottom: 20px; position: relative; display: inline-block; width: 100%; }
.section-title::after { content: ''; display: block; width: 60px; height: 4px; background-color: var(--primary-color); margin: 15px auto 0; border-radius: 2px; }

.section-subtitle {
    text-align: center;
    margin-bottom: 20px;
}

/* --- HEADER & NAVIGACE --- */
header { background-color: var(--white); box-shadow: 0 2px 10px rgba(0,0,0,0.05); position: fixed; width: 100%; top: 0; z-index: 1000; }
nav { display: flex; justify-content: space-between; align-items: center; height: 80px; }
.logo { font-size: 1.1rem; font-weight: 700; color: var(--secondary-color); display: flex; align-items: center; gap: 10px; }
.logo img { height: 40px; }
.nav-links { display: flex; gap: 30px; margin-top: 10px; }
.nav-links a { margin-top: -25px; font-weight: 600; color: var(--dark-color); transition: var(--transition); }
.nav-links a:hover { color: var(--secondary-color); }
.hamburger { display: none; cursor: pointer; font-size: 1.5rem; }
/* --- SOCIÁLNÍ IKONY V HLAVIČCE --- */
.social-icons {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: 15px;
    padding-left: 15px;
    border-left: 2px solid #eee; /* Jemná oddělovací čára */
    height: 30px; /* Výška pro zarovnání čáry */
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 0 !important; /* Přepisuje obecný styl pro odkazy v nav */
}

.social-link svg {
    width: 30px;
    height: 30px;
    fill: var(--secondary-color); /* Použije vaši tmavě zelenou */
    transition: var(--transition);
}

.social-link:hover svg {
    fill: #9abf4b; /* Světlejší odstín zelené při najetí */
    transform: translateY(-2px); /* Jemný pohyb nahoru */
}

/* Úprava pro mobilní telefony */
@media (max-width: 480px) {
    .logo span {
        display: none; /* Na velmi malých mobilech skryjeme text, necháme jen logo a ikony */
    }
    
    .social-icons {
        margin-left: 10px;
        padding-left: 10px;
        border-left: none; /* Na mobilu zrušíme čáru */
    }
}

/* --- HERO SECTION --- */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(63, 93, 42, 0.2), rgba(63, 93, 42, 0.2)), url('/pictures/www.super-primestak.cz-mainlogo.jpg');
    background-size: cover; background-position: center; background-attachment: fixed;
    display: flex; align-items: center; text-align: center; color: var(--white); margin-top: 80px;
}
.hero-content h1 { font-size: 3.5rem; margin-bottom: 30px; margin-top: -190px; color: var(--white); text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }
.hero-content p { font-size: 1.2rem; margin-bottom: 40px; max-width: 800px; margin-left: auto; margin-right: auto; }

/* --- PULZUJÍCÍ TEXT --- */
@keyframes heartbeat-alert {
    0% { color: #ffffff; transform: scale(1); text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
    50% { color: #ccdd96; transform: scale(1.08); text-shadow: 0 0 15px rgba(63, 93, 42, 0.8), 0 2px 4px rgba(0,0,0,0.8); }
    100% { color: #ffffff; transform: scale(1); text-shadow: 0 2px 4px rgba(0,0,0,0.5); }
}
.pulse-alert-text {
    display: inline-block;
    font-weight: 800;
    font-size: 1.4rem;
    margin-bottom: 40px;
    animation: heartbeat-alert 1.8s ease-in-out infinite;
}
@media (max-width: 480px) {
    .pulse-alert-text { font-size: 1.1rem; }
}

/* --- O NÁS --- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px; align-items: center; }
.about-img img { width: 100%; border-radius: var(--border-radius); box-shadow: var(--box-shadow); }
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px; margin-top: 30px; }
.feature-item { background: var(--light-bg); padding: 20px; border-radius: 8px; text-align: center; }
.feature-item i { font-size: 2rem; color: var(--secondary-color); margin-bottom: 10px; display: block; }

.about-title { text-align: left; margin: 0 0 20px 0; }
.about-text p { margin-top: 15px; }

/* --- NABÍDKA TÁBORŮ (GRID + LOGIKA ROZBALENÍ) --- */
.camps-section { background-color: var(--light-bg); }
.camps-section-title-p {
    text-align: center;
    margin-bottom: 20px;
}
.camps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.camp-card {
    background: var(--white);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--box-shadow);
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    border: 2px solid transparent; 
}

.camp-card:not(.expanded):hover { transform: translateY(-10px); }
.camp-img { height: 200px; background-color: #ddd; overflow: hidden; flex-shrink: 0; }
.camp-img img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.5s ease; }
.camp-card:hover .camp-img img { transform: scale(1.1); }
.camp-infoblok-p { margin-top: 15px; margin-bottom: 5px; font-weight: bold; text-align: center; }
.camp-content { padding: 25px; flex-grow: 1; display: flex; flex-direction: column; }
.camp-title { font-size: 1.4rem; margin-bottom: 10px; color: var(--secondary-color); }
.camp-age { font-size: 0.9rem; color: #888; margin-bottom: 15px; font-weight: 600; }
.camp-desc { font-size: 0.95rem; margin-bottom: 20px; color: var(--text-color); }

/* EXPANDED STYLES */
.camp-card.expanded { grid-column: 1 / -1; border-color: var(--secondary-color); z-index: 10; }
.camp-hidden-content {
    max-height: 0; opacity: 0; overflow: hidden;
    transition: max-height 0.8s ease-in-out, opacity 0.5s ease-in-out;
}
.camp-card.expanded .camp-hidden-content {
    max-height: 2500px; opacity: 1; margin-top: 20px; padding-top: 20px; border-top: 1px solid #eee;
}

/* --- STYLY PRO TABULKY A SEZNAMY --- */
.info-block { margin-bottom: 20px; }
.info-block h4 { color: var(--secondary-color); border-bottom: 2px solid #eee; display: inline-block; margin-bottom: 10px; }

.camp-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; margin-top: 10px; }
.camp-table th, .camp-table td { border: 1px solid #eee; padding: 10px; text-align: left; vertical-align: middle; }
.camp-table th { background-color: var(--secondary-color); color: white; }
.camp-table tr:nth-child(even) { background-color: #f9f9f9; }
.camp-table th:nth-child(1), .camp-table td:nth-child(1),
.camp-table th:nth-child(3), .camp-table td:nth-child(3),
.camp-table th:nth-child(4), .camp-table td:nth-child(4) { text-align: center; }

.table-btn {
    background-color: var(--primary-color); color: var(--secondary-color);
    padding: 5px 15px; text-decoration: none; border-radius: 20px;
    font-size: 0.85rem; font-weight: bold; display: inline-block;
    transition: background 0.3s; white-space: nowrap; 
}
.table-btn:hover { background-color: var(--primary-hover); }

.table-note {
    font-size: 0.9em;
    font-style: italic;
    color: #666;
    margin-top: 5px;
}

.table-botom{
    font-size: 0.9em;
    font-style: italic;
    color: #666;
}

.list-intro-title {
    margin-top: 15px;
    margin-bottom: 5px;
    font-weight: bold;
    text-align: center;
}

/* --- RECENZE (TESTIMONIALS) --- */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.testimonial-card {
    background: var(--light-bg);
    padding: 30px;
    border-radius: var(--border-radius);
    text-align: center;
    box-shadow: var(--box-shadow);
}
.testimonial-text {
    font-style: italic;
    margin-bottom: 20px;
}
.client-name {
    font-weight: bold;
    color: var(--secondary-color);
}

/* --- PROČ S NÁMI (WHY US) --- */
#why-us {
    background-color: var(--white);
    padding-top: 0;
}
.why-us-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 40px;
}
.why-item {
    background: var(--white); padding: 30px; border-radius: var(--border-radius);
    box-shadow: var(--box-shadow); text-align: center; transition: var(--transition);
    border-bottom: 4px solid var(--primary-color);
}
.why-item:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.15); }
.why-icon {
    width: 100px; height: 100px; background: var(--light-bg); border-radius: 50%;
    margin-bottom: 15px; display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
}
.why-icon img { width: 80px; height: 80px; object-fit: contain; }
.why-item h3 { font-size: 1.2rem; margin-bottom: 15px; color: var(--secondary-color); text-transform: uppercase;}

.content-list {
    list-style-type: disc !important; margin: 10px auto 20px auto; width: fit-content;
    max-width: 90%; text-align: left; padding-left: 20px;
}
.content-list li { margin-bottom: 5px; }
.content-list li::marker { color: var(--secondary-color); }

/* Logo tabulka */
.logo-table { width: 100%; max-width: 500px; margin: 20px auto; border-collapse: collapse; border: none; }
.logo-table tr { height: 50px; border: none; }
.logo-table td { border: none; padding: 0 15px; vertical-align: middle; background-color: transparent !important; }
.logo-table .logo-col { width: 120px; text-align: center; }
.logo-table .logo-col img { max-height: 40px; max-width: 100%; display: block; margin: 0 auto; }
.logo-table .text-col { font-weight: 600; font-size: 1rem; color: var(--dark-color); text-align: left; }

/* Loading/Error */
.loading-status { font-style: italic; color: #666; padding: 10px; background: #f0f2f5; border-radius: 5px; text-align: center; }
.error-status { color: #e74c3c; padding: 10px; text-align: center; background: #fadbd8; border-radius: 5px; }
.error-link { color: #c0392b; font-weight: bold; text-decoration: underline; }

/* Tlačítko Zavřít */
.btn-wrapper { margin-top: auto; }
.camp-card.expanded .toggle-btn { background-color: #7f8c8d; color: white; }
.camp-card.expanded .toggle-btn:hover { background-color: #5d6d7e; }

/* --- FOTOGALERIE - OPRAVENÁ VERZE --- */
.gallery-section {
    background-color: var(--light-bg);
    overflow: hidden;
    position: relative;
}

.gallery-container {
    position: relative;
    width: 100%;
    max-width: 1200px;
    /* ZMĚNA: Zvětšíme výšku natvrdo, aby se tam vešlo vše */
    height: 480px; 
    margin: 20px auto;
    /* ZMĚNA: Flexbox zajistí, že obsah bude svisle uprostřed */
    display: flex;
    align-items: center; 
    overflow: hidden; /* Skryje to co je moc vlevo/vpravo */
}

.gallery-track-wrapper {
    position: relative;
    width: 100%;
    /* ZMĚNA: Výšku nastavíme na 100%, aby využila celých 650px rodiče */
    height: 100%; 
    
    /* Maska pouze horizontálně. Vertikálně necháme obsah dýchat. */
    -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
    
    /* ZMĚNA: Důležité! Zajistí, že maska se aplikuje na celý velký prostor */
    display: flex;
    align-items: center;
}

.gallery-track {
    display: flex;
    align-items: center;
    position: absolute;
    left: 50%;
    /* ZMĚNA: Odstraníme height: 100% a místo toho dáme velký padding */
    height: auto; 
    padding: 100px 0; /* 100px nahoře a dole jako rezerva pro zvětšení a stín */
    
    transition: transform 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    list-style: none;
    margin: 0;
    width: max-content;
    
    /* Pro jistotu, aby padding fungoval správně */
    box-sizing: content-box; 
}

.gallery-slide {
    /* Fixní výška, šířka automatická dle fotky (zachová poměr) */
    height: 250px; 
    width: auto;
    
    /* Základní stav (neaktivní) */
    margin: 0 15px; 
    opacity: 0.4;
    transform: scale(1);
    filter: blur(1px); /* Neaktivní fotky mírně rozmazané */
    
    transition: all 0.5s cubic-bezier(0.2, 0.8, 0.2, 1);
    border-radius: var(--border-radius);
    position: relative;
    cursor: pointer;
    flex-shrink: 0; /* Zabrání smrsknutí */
}

.gallery-slide img {
    height: 100%;
    width: auto; /* Zachová poměr stran */
    display: block;
    border-radius: var(--border-radius);
    object-fit: cover;
    box-shadow: var(--box-shadow);
}

/* --- AKTIVNÍ FOTKA (Desktop) --- */
.gallery-slide.active {
    opacity: 1;
    filter: blur(0);
    z-index: 10;
    
    /* Zvětšení o 65% */
    transform: scale(1.65); 
    
    /* Odsazení, aby se zvětšená fotka nepřekrývala se sousedy */
    /* Na desktopu potřebujeme hodně místa */
    margin: 0 120px; 
    
    box-shadow: 0 7px 14px rgba(0,0,0,0.4);
}

/* --- POPISEK --- */
.caption {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px 15px 15px 15px;
    background: linear-gradient(to top, rgba(0,0,0,0.9), transparent);
    color: white;
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease 0.2s; /* Zpoždění 0.2s */
    border-radius: 0 0 var(--border-radius) var(--border-radius);
    pointer-events: none;
}

.gallery-slide.active .caption {
    opacity: 1;
    transform: translateY(0);
}

.caption h3 {
    color: var(--primary-color);
    font-size: 0.7rem;
    margin: 0 0 3px 0;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.caption p {
    font-size: 0.6rem;
    margin: 0;
    line-height: 1.1;
}

/* --- NAVIGAČNÍ TLAČÍTKA --- */
.gallery-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    color: var(--secondary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    z-index: 100;
    transition: var(--transition);
}

.gallery-nav:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-50%) scale(1.1);
}

.gallery-nav.prev { left: 20px; }
.gallery-nav.next { right: 20px; }

/* --- MOBILNÍ ZOBRAZENÍ --- */
@media (max-width: 1080px) {
    .gallery-container {
        height: 250px; /* Menší kontejner */
    }
    
    .gallery-slide {
        height: 150px; /* Menší fotky */
        margin: 0 10px; /* Menší mezery základní */
    }

    .gallery-slide.active {
        /* Zvětšení jen o 50% na mobilu */
        transform: scale(1.5); 
        /* Menší margin, ale dostatečný pro scale 1.5 */
         margin: 0 60px;
        box-shadow: 0 4px 5px rgba(0, 0, 0, 0.5);
    }

    /* Úprava popisků pro mobil - menší písmo, nalepené dole */
    .caption {
        padding: 20px 5px 5px 5px;
    }
    
    .caption h3 {
        font-size: 0.6rem;
    }
    
    .caption p {
        font-size: 0.5rem;
        display: -webkit-box;
        -webkit-line-clamp: 2; /* Max 2 řádky textu */
        -webkit-box-orient: vertical;
        overflow: hidden;
    }
    
    .gallery-nav {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

/* --- FOOTER --- */
footer {
    background-color: var(--dark-color);
    color: white;
    padding: 30px 0 20px 0;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 20px;
}
.footer-col h3 {
    color: var(--primary-color);
    margin-bottom: 10px;
}
.contact-info {
    line-height: 2;
}
.contact-info a {
    transition: color 0.3s;
}
.contact-info a:hover {
    color: var(--primary-color);
}
.update {
    text-align: center;
    padding-top: 10px;
    padding-bottom: 10px;
    font-size: 0.7rem;
    color: var(--primary-color);
}
.copyright {
    text-align: center;
    padding-top: 10px;
    border-top: 1px solid #444;
    font-size: 0.9rem;
    color: #888;
}

/* --- RESPONZIVITA --- */
@media (max-width: 1080px) {
    .nav-links { display: none; flex-direction: column; position: absolute; top: 80px; left: 0; width: 100%; background-color: var(--white); padding: 20px; box-shadow: 0 5px 10px rgba(0,0,0,0.1); }
    .nav-links.active { display: flex; }
    .hamburger { display: block; }
    .hero {
        background: linear-gradient(rgba(63, 93, 42, 0.2), rgba(63, 93, 42, 0.2)), url('/pictures/www.super-primestak.cz-mainlogo.jpg');
        background-size: cover; background-position: center;
    }
    .hero-content h1 { font-size: 2.5rem; }
    .about-grid { grid-template-columns: 1fr; }
    .camp-table { font-size: 0.8rem; }
    .camp-table th, .camp-table td { padding: 5px; }
    .logo-table { max-width: 100%; }
}