/* --- 1. PROMĚNNÉ A ZÁKLAD --- */
:root {
    --color-water: #24C6DC;      /* Tyrkysová z kašny */
    --color-deep: #0F4C75;       /* Tmavě modrá z textu */
    --color-lifebuoy: #FF6B6B;   /* Oranžovo-červená z kruhu */
    --color-sand: #F7F9FC;       /* Světlé pozadí obsahu */
    --sidebar-width: 280px;
    --font-heading: 'Nunito', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-sand);
    color: #333;
    overflow-x: hidden;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--color-deep);
    font-weight: 800;
}

p {
    line-height: 1.6;
    color: #555;
}

/* --- 2. LEVÉ MENU (SIDEBAR) --- */
.sidebar {
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background-color: var(--color-water);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 0;
    z-index: 100;
    box-shadow: 5px 0 15px rgba(0,0,0,0.1);
}

.logo-container {
    width: 180px;
    margin-bottom: 40px;
    background: #fff;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}

.logo-container img {
    width: 100%;
    display: block;
    border-radius: 50%;
}

.nav-links {
    list-style: none;
    width: 100%;
    text-align: center;
}

.nav-links li {
    margin: 10px 0;
}

.nav-links a {
    text-decoration: none;
    color: #fff;
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    display: block;
    padding: 10px 20px;
    transition: all 0.3s ease;
    border-left: 5px solid transparent;
}

.nav-links a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    padding-left: 30px; /* Efekt posunu */
}

/* Aktivní link */
.nav-links a.active {
    background-color: rgba(255, 255, 255, 0.3);
    border-left: 5px solid var(--color-lifebuoy);
}

.sidebar-contact {
    margin-top: auto;
    color: white;
    text-align: center;
    padding: 20px;
    font-size: 0.95rem;
    width: 100%;
}
.sidebar-contact a {
    color: white;
    text-decoration: none; /* Podtržení dáme pryč, uděláme vlastní */
    display: block; /* Aby byly pod sebou */
    margin: 8px 0;
    font-weight: 600;
    font-family: var(--font-heading); /* Použijeme ten hezký kulatý font */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); /* "Pružný" efekt */
    opacity: 0.9;
}

/* Efekt při najetí myší */
.sidebar-contact a:hover {
    opacity: 1;
    transform: scale(1.1); /* Lehce se nafoukne jako bublina */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6); /* Záře */
    cursor: pointer;
}

/* Malý nadpis "Bazén ČB" */
.sidebar-contact strong {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 10px;
    opacity: 0.8;
}

/* --- 3. ANIMACE VLNY (WAVE) - VERZE "LÍNÁ ŘEKA" --- */

/* Hlavní vlna (ostrá barva) */
.sidebar::after {
    content: "";
    position: absolute;
    top: 0;
    right: -45px; /* Musí odpovídat šířce SVG */
    width: 50px;  /* Širší prostor pro vlnění */
    height: 100%;
    
    /* Nová SVG vlna: Dlouhá, táhlá sinusoida (600px vysoká) */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 600' preserveAspectRatio='none'%3E%3Cpath d='M0,0 Q50,150 0,300 T0,600' fill='%2324C6DC'/%3E%3C/svg%3E");
    
    background-size: 100% 600px; /* Klíčové: Vlna se opakuje až po 600px */
    background-repeat: repeat-y;
    animation: waveFlow 8s linear infinite; /* Pomalejší tok */
}

/* Druhá vlna (průhlednější, pro efekt hloubky) */
.sidebar::before {
    content: "";
    position: absolute;
    top: 0;
    right: -60px; /* Ještě víc vpravo */
    width: 60px;
    height: 100%;
    
    /* Stejná vlna, ale průhledná */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 50 600' preserveAspectRatio='none'%3E%3Cpath d='M0,0 Q50,150 0,300 T0,600' fill='rgba(36, 198, 220, 0.3)'/%3E%3C/svg%3E");
    
    background-size: 100% 450px; /* Jiná velikost pro nepravidelnost */
    background-repeat: repeat-y;
    animation: waveFlow 10s linear infinite reverse; /* Teče opačně nebo pomaleji */
    z-index: -1;
}

@keyframes waveFlow {
    from { background-position: 0 0; }
    to { background-position: 0 600px; } /* Musí odpovídat background-size */
}

/* --- 4. OBSAH A KOMPONENTY --- */
.main-content {
    margin-left: var(--sidebar-width);
    padding: 0;
    position: relative;
    min-height: 100vh;
}

/* Tlačítka */
.btn {
    display: inline-block;
    background-color: var(--color-lifebuoy);
    color: white;
    padding: 15px 35px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(255, 107, 107, 0.4);
    transition: transform 0.2s, box-shadow 0.2s;
    border: none;
    cursor: pointer;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(255, 107, 107, 0.6);
    background-color: #ff5252;
}

/* Hero Sekce */
.hero {
    padding: 80px 60px;
    max-width: 1200px;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
}

.hero p.perex {
    font-size: 1.2rem;
    max-width: 700px;
    margin-bottom: 40px;
}

/* Grid karet */
.cards-section {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 0 60px 60px 60px;
}

.card {
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
    border-bottom: 5px solid var(--color-water);
    transition: transform 0.3s;
}

.card:hover {
    transform: translateY(-5px);
}

/* Bublinky */
.bubbles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
    pointer-events: none;
}

.bubble {
    position: absolute;
    bottom: -100px;
    background-color: rgba(36, 198, 220, 0.15);
    border-radius: 50%;
    animation: rise infinite ease-in;
}

@keyframes rise {
    0% { bottom: -100px; transform: translateX(0); }
    50% { transform: translateX(100px); }
    100% { bottom: 120vh; transform: translateX(-200px); }
}

/* --- 5. RESPONZIVITA (MOBIL) --- */
/* --- Tlačítko hamburgeru (na PC skryté) --- */
.mobile-toggle {
    display: none;
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 200;
    background: var(--color-lifebuoy);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1.8rem;
    padding: 5px 15px;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* --- RESPONZIVITA PRO MOBILY --- */
@media (max-width: 768px) {
    
    /* Zobrazit tlačítko */
    .mobile-toggle {
        display: block;
    }

    /* Upravený Sidebar pro mobil */
    .sidebar {
        width: 280px; /* Pevná šířka */
        height: 100vh; /* Přes celou výšku */
        position: fixed;
        left: -290px; /* SCHOVANÉ VLEVO (mimo obrazovku) */
        top: 0;
        transition: left 0.3s ease-in-out; /* Animace vysunutí */
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 20px;
    }

    /* Třída, která menu vysune */
    .sidebar.open {
        left: 0; /* VYSUNUTÉ */
        box-shadow: 100vw 0 0 rgba(0,0,0,0.5); /* Ztmaví zbytek stránky */
    }

    /* Vypnout vlnky na boku menu (na mobilu by zavazely) */
    .sidebar::after, .sidebar::before { display: none; }
    
    /* Zobrazit odkazy (v původním kódu jsme je skryli) */
    .nav-links, .sidebar-contact { 
        display: block; 
    }

    /* Logo menší */
    .logo-container { width: 100px; margin: 0 auto 20px auto; }

    /* Obsah stránky se roztáhne na celou šířku */
    .main-content { margin-left: 0; }
    
    /* Úpravy paddingů pro menší displeje */
    .hero { padding: 40px 20px; text-align: center; }
    .hero h1 { font-size: 2.2rem; }
    .content-block { padding: 40px 20px; }
    
    /* Galerie - 1 sloupec */
    .gallery-surface { column-count: 1; padding: 20px; }
    
    /* Tým a kontakty pod sebe */
    .contact-grid { grid-template-columns: 1fr; }
}
/* --- STYLY PRO KONTAKT A O NÁS --- */

.content-block {
    padding: 60px;
    max-width: 1200px;
}

.hero-small {
    padding-bottom: 20px;
}

/* Tým instruktorů */
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-top: 30px;
}

.instructor-card {
    text-align: center;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.instructor-card:hover {
    transform: translateY(-5px);
}

.instructor-card .img-wrapper {
    width: 150px;
    height: 150px;
    margin: 0 auto 20px auto;
    position: relative;
}

.instructor-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
    border: 5px solid var(--color-water); /* Tyrkysový rámeček */
    padding: 3px;
    background: white;
}

.instructor-card h3 {
    color: var(--color-deep);
    margin-bottom: 5px;
}

.instructor-card .role {
    display: block;
    color: var(--color-lifebuoy); /* Červená role */
    font-weight: 700;
    font-size: 0.9rem;
    text-transform: uppercase;
    margin-bottom: 15px;
    font-family: var(--font-heading);
}

/* Kontakt Grid */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    margin-top: 30px;
}

.info-box {
    background: white;
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.03);
    border-left: 5px solid var(--color-lifebuoy);
}

.info-box.small {
    font-size: 0.9rem;
    border-left-color: #ccc;
    background: rgba(255,255,255,0.5);
}

.info-box h4 {
    margin-bottom: 10px;
    color: var(--color-deep);
}

.info-box a {
    color: var(--color-water); /* Modré odkazy v textu */
    text-decoration: none;
    font-weight: 600;
}

.info-box a:hover {
    text-decoration: underline;
}

/* Mapa */
.map-container {
    min-height: 400px;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    border: 5px solid white;
}

/* Responzivita pro Kontakt */
@media (max-width: 900px) {
    .contact-grid {
        grid-template-columns: 1fr; /* Na mobilu pod sebou */
    }
    .map-container {
        min-height: 300px;
    }
    .content-block {
        padding: 40px 20px;
    }
}
/* --- STYLY PRO VELKOU GALERII (Masonry / Pinterest styl) --- */

.gallery-surface {
    /* Místo Flexboxu použijeme sloupce - jako v novinách */
    column-count: 3; 
    column-gap: 30px;
    padding: 20px 40px 100px 40px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Karta Polaroid */
.polaroid {
    background: white;
    padding: 10px 10px 40px 10px;
    width: 100%; /* Roztáhne se na šířku sloupce */
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
    
    /* Důležité pro masonry layout, aby se karta neroztrhla */
    break-inside: avoid;
    margin-bottom: 30px; /* Mezera pod kartou */
    
    /* Mírné natočení (střídavé), ale mnohem jemnější */
    transform: rotate(0deg); 
}

/* Obrázek uvnitř */
.polaroid .inner-img {
    width: 100%;
    height: auto; /* Výška se přizpůsobí fotce (na výšku/na šířku) */
    overflow: hidden;
    background-color: #eee;
}

.polaroid img {
    width: 100%;
    display: block;
    transition: transform 0.5s ease;
}

/* Text (popisek) */
.polaroid .caption {
    font-family: 'Indie Flower', cursive;
    font-size: 1.1rem;
    color: #444;
    text-align: center;
    margin-top: 10px;
    line-height: 1.3;
}

/* --- INTERAKCE (Hover) --- */
.polaroid:hover {
    transform: translateY(-10px) scale(1.02); /* Pouze se zvedne, netočí se */
    box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    z-index: 10;
}

/* Lepicí páska - zachováme, vypadá to hezky */
.polaroid::before {
    content: "";
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 30px;
    background-color: rgba(255, 255, 255, 0.5);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(2px);
}

/* --- RESPONZIVITA --- */
@media (max-width: 1000px) {
    .gallery-surface { column-count: 2; } /* Na tabletu 2 sloupce */
}

@media (max-width: 600px) {
    .gallery-surface { column-count: 1; } /* Na mobilu 1 sloupec */
}
/* --- Náhradní avatar místo fotky --- */
.avatar-placeholder {
    width: 100%;
    height: 100%;
    background-color: var(--color-sand); /* Nebo bílá */
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 3.5rem; /* Velikost ikonky */
    border: 5px solid var(--color-water);
    box-shadow: inset 0 0 20px rgba(36, 198, 220, 0.2);
    user-select: none;
}

/* Aby to nebylo nudné, střídáme barvy rámečků */
.instructor-card:nth-child(odd) .avatar-placeholder {
    border-color: var(--color-water);
    background-color: #eefbfc;
}

.instructor-card:nth-child(even) .avatar-placeholder {
    border-color: var(--color-lifebuoy);
    background-color: #fff0f0;
}