:root {
    --bg-color: #f8fafc; 
    --card-bg: #ffffff; 
    --accent: #2563eb; /* Změnil jsem na výraznější, čistou modrou */
    --accent-glow: rgba(37, 99, 235, 0.35);
    --text-main: #0f172a; 
    --text-dim: #64748b; 
    --pattern-color: rgba(100, 116, 139, 0.15); /* Barva teček ve vzoru */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    margin: 0;
    font-family: 'Plus Jakarta Sans', sans-serif;
    line-height: 1.6;
}

body.no-scroll {
    overflow: hidden;
}

/* VYLEPŠENÁ HLAVIČKA SE VZOREM */
header {
    background-color: rgba(255, 255, 255, 0.85);
    /* Moderní tečkovaný vzor */
    background-image: radial-gradient(var(--pattern-color) 1.5px, transparent 1.5px);
    background-size: 22px 22px; /* Rozestupy teček */
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 2rem 1rem;
    position: sticky;
    top: 0;
    z-index: 100;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    text-align: center;
}

header h1 {
    margin: 0 0 1.5rem 0;
    font-weight: 800;
    font-size: 2.2rem;
    text-shadow: 0 2px 10px rgba(255,255,255,0.8); /* Aby byl text čitelný i přes vzor */
}

header h1 span { color: var(--accent); }

/* VYLEPŠENÁ NAVIGACE (Design Kapsle) */
nav ul {
    list-style: none;
    padding: 6px;
    margin: 0 auto;
    display: inline-flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 4px;
    background: #ffffff; /* Bílé pozadí celého menu */
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06); /* Stín kolem celé navigace */
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.nav-link {
    text-decoration: none;
    color: var(--text-dim);
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 50px;
    background: transparent;
    transition: var(--transition);
    font-size: 0.95rem;
}

.nav-link:hover { 
    background: #e0e7ff; 
    color: var(--accent); 
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.15);
}

/* Jasně viditelná aktivní záložka */
.nav-link.active {
    background: var(--accent);
    color: #ffffff;
    box-shadow: 0 4px 15px var(--accent-glow);
    transform: translateY(-1px); /* Záložka jemně vystoupne */
}

.container {
    max-width: 1400px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.gallery-section {
    display: none;
    columns: 3 300px;
    column-gap: 20px;
}

.gallery-section.active { 
    display: block; 
    animation: fadeInGallery 0.5s ease forwards;
}

@keyframes fadeInGallery {
    from { opacity: 0; transform: translateY(15px); }
    to { opacity: 1; transform: translateY(0); }
}

.photo-item {
    break-inside: avoid;
    margin-bottom: 20px;
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    border: 1px solid rgba(0, 0, 0, 0.04);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    transition: var(--transition);
    cursor: pointer;
}

.photo-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
}

.photo-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.photo-item:hover img {
    transform: scale(1.05);
}

.photo-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle, rgba(0,0,0,0) 0%, rgba(0,0,0,0.4) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
    z-index: 2;
}

.photo-overlay span {
    background: var(--accent);
    color: white;
    padding: 10px 20px;
    border-radius: 30px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transform: translateY(15px);
    transition: var(--transition);
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
}

.photo-item:hover .photo-overlay { opacity: 1; }
.photo-item:hover .photo-overlay span { transform: translateY(0); }

/* --- LIGHTBOX --- */
.lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 2000;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    display: flex;
    opacity: 1;
}

.lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
}

.lightbox-counter {
    position: absolute;
    top: 25px;
    left: 30px;
    z-index: 2200;
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 2px;
    opacity: 0.8;
}

.img-container {
    position: relative;
    z-index: 2100;
    max-width: 90%;
    max-height: 85%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

#lightbox-img {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

#lightbox-caption {
    margin-top: 15px;
    color: white;
    font-size: 1.1rem;
    text-align: center;
}

.nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2200;
    background: rgba(255,255,255,0.1);
    border: none;
    color: white;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1.5rem;
    transition: var(--transition);
}

.nav-btn:hover { background: var(--accent); color: white; }
.prev-btn { left: 20px; }
.next-btn { right: 20px; }

.close-btn {
    position: absolute;
    top: 20px;
    right: 30px;
    z-index: 2200;
    font-size: 3rem;
    color: white;
    cursor: pointer;
    background: none;
    border: none;
    padding: 10px;
    line-height: 1;
    transition: color 0.3s ease;
    opacity: 0.8;
}

.close-btn:hover { color: var(--accent); opacity: 1; }

@media (max-width: 768px) {
    .nav-btn { bottom: 20px; top: auto; transform: none; width: 50px; height: 50px; }
    .prev-btn { left: 30%; }
    .next-btn { right: 30%; }
    .close-btn { top: 10px; right: 15px; }
    .lightbox-counter { top: 20px; left: 15px; }
}