@import url('https://fonts.googleapis.com/css2?family=Tangerine:wght@400;700&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Funnel+Sans:ital,wght@0,300..800;1,300..800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Great+Vibes&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Martel:wght@200;300;400;600;700;800;900&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Google+Sans+Flex:opsz,wght@6..144,1..1000&display=swap');

/* =========================================
   1. DEFINICE PROMĚNNÝCH (Aktualizováno)
   ========================================= */
:root {
    /* Světlý režim */
    --bg-color: rgb(240, 240, 240);
    --content-bg: url('gallery/sekce_galerie/bg3.png'); /* Obrázek pro světlý režim */
    --text-color: rgb(0, 0, 0);
    --nav-inactive: rgba(87, 87, 87, 0.6);
    --nav-active: rgb(0, 0, 0);
    --transition-speed: 0.6s;
}

body.dark-mode {
    /* Tmavý režim */
    --bg-color: rgb(20, 20, 20);
    --content-bg: url('gallery/sekce_galerie/bg4.png'); /* Obrázek pro tmavý režim */
    --text-color: rgb(255, 255, 255);
    --nav-inactive: rgba(200, 200, 200, 0.6);
    --nav-active: rgb(255, 255, 255);
}
/* =========================================
   2. ZÁKLADNÍ NASTAVENÍ
   ========================================= */
html {
    scroll-behavior: smooth;
}

body {
    height: auto; 
    width: 100vw;
    background-color: var(--bg-color);
    color: var(--text-color);
    margin: 0;
    overflow-x: hidden; 
    overflow-y: auto;
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

/* =========================================
   3. NAVIGACE A DARK MODE TOGGLE
   ========================================= */
.top-nav {
    position: fixed;
    top: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 40px;
    
}


.nav-link {
    color: var(--nav-inactive);
    text-decoration: none;
    font-family: "Funnel Sans", sans-serif;
    font-size: 1.5vmin;
    letter-spacing: 2px;
    padding-bottom: 5px;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    transition: all var(--transition-speed) cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link.active, .nav-link:hover {
    color: var(--nav-active);
    border-bottom: 2px solid var(--nav-active);
}

.theme-switch-wrapper {
    position: fixed;
    bottom: 30px; /* Vzdálenost odspodu */
    left: 30px;   /* Vzdálenost zleva */
    z-index: 1000; /* Aby byl nad vším ostatním */
    display: flex;
    align-items: center;
    background: rgba(128, 128, 128, 0.1); /* Jemné pozadí, aby byl vidět na obou režimech */
    padding: 10px;
    border-radius: 50px;
    backdrop-filter: blur(5px); /* Rozmazání pozadí pod tlačítkem */
    transition: all 0.3s ease;
}

.theme-switch-wrapper:hover {
    background: rgba(128, 128, 128, 0.2);
    transform: scale(1.05);
}

/* Ostatní styly .theme-switch a .slider zůstávají stejné jako předtím */

.theme-switch {
    display: inline-block;
    height: 20px;
    position: relative;
    width: 44px;
}

.theme-switch input { display: none; }

.slider {
    background-color: #ccc;
    bottom: 0;
    cursor: pointer;
    left: 0;
    position: absolute;
    right: 0;
    top: 0;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    background-color: white;
    bottom: 3px;
    content: "";
    height: 14px;
    left: 4px;
    position: absolute;
    transition: .4s;
    width: 14px;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #444; /* Barva slideru v dark mode */
}

input:checked + .slider:before {
    transform: translateX(22px);
}

/* =========================================
   4. HERO SECTION & PARALLAX
   ========================================= */
.hero-section {
    position: relative;
    width: 100%;
    height: 100vh;
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

.parallax-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.parallax-layer {
    position: absolute;
    transition: transform 0.1s ease-out, opacity var(--transition-speed) ease;
}

.parallax-layer.bg {
    width: 110%;
    height: 110%;
    object-fit: cover;
}

/* Logika přepínání obrázků pozadí */
.dark-bg { opacity: 0; }
.light-bg { opacity: 1; }

body.dark-mode .dark-bg { opacity: 1; }
body.dark-mode .light-bg { opacity: 0; }

.hero-text {
    position: relative;
    z-index: 2; 
    font-family: "Great Vibes", cursive;
    pointer-events: none;
}

.hero-text h1 { font-size: 10vmin; margin: 0; }
.hero-text p { font-size: 3vmin; margin-top: 20px; }

/* =========================================
   5. CONTENT AREA (Aktualizováno)
   ========================================= */
.content-area {
    /* Místo barvy teď používáme proměnnou s obrázkem */
    background-image: var(--content-bg);
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Volitelné: vytvoří parallax efekt při scrollu */
    
    width: 100%;
    min-height: 100vh; 
    display: flex;
    align-items: center; 
    position: relative;
    overflow: hidden;
    transition: background-image var(--transition-speed) ease;
}

#image-track {
    display: flex;
    gap: 10vmin;
    position: absolute; /* Změněno na absolute pro správný výpočet slideru */
    left: 50%;
    top: 50%;
    transform: translate(0%, -50%); /* Startovní pozice */
    user-select: none;
    z-index: 2;
}

.nav-item {
    display: flex;
    flex-direction: row; /* Obrázek a text vedle sebe */
    align-items: center; 
    gap: 1.5vmin;
}

.category-title {
    color: var(--text-color);
    margin: 0;
    font-family: "Funnel Sans", sans-serif;
    font-size: 2.5vmin;
    text-transform: uppercase;
    font-weight: 100;
    text-align: center;
    line-height: 1.1;
    transition: color var(--transition-speed) ease;
    
    /* OPRAVA: vynucení svislého textu (písmena pod sebou) */
    display: flex;
    flex-direction: column;
    word-break: break-all;
    width: min-content;
}

#image-track .image {
    width: 40vmin;
    height: 56vmin;
    object-fit: cover;
}



/* ... tvé stávající importy a proměnné zůstávají ... */

/* STYL PRO DETAILNÍ OKNO (OVERLAY) */
.detail-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: 2000;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease;
    overflow: hidden; /* Zabráníme scrollování v detailu */
}

.detail-overlay.active {
    display: block; 
    opacity: 1;
}

.close-btn {
    position: fixed;
    top: 20px;
    right: 40px;
    font-size: 60px;
    color: var(--text-color);
    cursor: pointer;
    z-index: 2001;
}

.detail-content {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2;
    /* Přidáme jemné ztmavení obrázku, aby byl text lépe čitelný */
    background: rgba(0, 0, 0, 0.3); 
    font-family: "Google Sans Flex", sans-serif;
}

#detail-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Důležité: vyplní obrazovku bez deformace */
    z-index: 1;
}

/* Hlavní nadpis v detailu - Sjednocený styl */
#detail-title {
    /* Nastavení fontu */
    font-family: "Google Sans Flex", sans-serif !important;
    
    /* Velikost a barva */
    font-size: 8vmin; 
    color: #ffffff;
    
    /* Vizuální styl */
    letter-spacing: 3px; 
    font-weight: 600; /* Středně tučné, aby font vynikl */
    text-transform: uppercase;
    text-align: center;
    margin: 0;
    
    /* Animace a interakce */
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none; /* Kliknutí projde skrze text na odkaz pod ním */
}

/* Skrytí popisu (pokud ho už nechceš) */
#detail-description {
    display: none;
}

/* Křížek pro zavření - musí být úplně nahoře */
.close-btn {
    position: fixed;
    top: 30px;
    right: 40px;
    font-size: 50px;
    color: white;
    cursor: pointer;
    z-index: 2005;
    text-shadow: 0 0 10px rgba(0,0,0,0.5);
}

.detail-text {
    max-width: 700px;
    margin-top: 40px;
    color: var(--text-color);
    text-align: center;
    
}

.detail-text h2 {
    font-size: 5vmin;
    letter-spacing: 5px;
    margin-bottom: 20px;
}

.detail-text p {
    font-size: 2.2vmin;
    line-height: 1.6;
    opacity: 0.8;
}

#detail-link {
    text-decoration: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Hlavní nadpis v detailu */
#detail-title {
    
    font-size: 8vmin; 
    
    /* Úměrně zmenšíme i rozestupy, aby to vypadalo čistě */
    letter-spacing: 3px; 
    
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    color: #ffffff;
    margin: 0;
    text-transform: uppercase; /* Pokud chceš mít všechna písmena velká */
}

/* Efekt při najetí myší na zmenšený text */
#detail-link:hover #detail-title {
    /* Při hoveru se text jemně roztáhne na původnější šířku */
    letter-spacing: 8px; 
    
}

/* Úprava podnadpisu, aby nebyl moc blízko zmenšeného nadpisu */
#detail-subtitle {
    font-size: 1.8vmin; /* Mírně zmenšeno pro zachování poměru */
    color: #ffffff;
    opacity: 0.6;
    margin-top: 10px;
    transition: all 0.5s ease;
    letter-spacing: 2px;
}

#detail-link:hover #detail-subtitle {
    opacity: 1;      /* Plná bílá při najetí */
    letter-spacing: 4px;
}

#detail-link:hover #detail-subtitle {
    opacity: 1;
    letter-spacing: 1px;
}

