* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

/* Definice barev západu slunce */
:root {
    --sunset-orange: #ff7e5f;
    --sunset-yellow: #feb47b;
    --sunset-dark: #2c1b3d;
    --sunset-red: #e94057;
}

body {
    background-color: var(--sunset-dark);
    color: white;
}

/* Sjednocení všech odkazů s okolním textem */
a,
a:visited,
a:active {
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    font-weight: 800;
    font-style: inherit;
    text-decoration: none;
}

/* --- NAVIGACE --- */
.navbar {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 900px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 30px;
    background: rgba(44, 27, 61, 0.85);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
    z-index: 1000;
}

.logo {
    font-weight: bold;
    font-size: 1.2rem;
    color: var(--sunset-yellow);
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
}

.nav-links li {
    padding: 0 10px;
}

.nav-links a {
    color: white;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--sunset-yellow);
}

.btn-login {
    border: 1px solid var(--sunset-orange);
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

.btn-login:hover {
    background: linear-gradient(45deg, var(--sunset-orange), var(--sunset-red));
    border-color: transparent;
    color: white !important;
    box-shadow: 0 0 10px rgba(255, 126, 95, 0.5);
}

#nav-logout-link {
    color: #ff8c6b;
    font-weight: 600;
}

    #nav-logout-link:hover {
        color: #ff5232;
    }

/* --- ANIMACE NAVBARU NA LOĎKU (OPRAVENO PRO MOBILY A VELIKOST) --- */
.navbar {
    transition: max-width 0.6s cubic-bezier(0.68, -0.55, 0.265, 1.55),
                border-radius 0.5s ease,
                background 0.5s ease,
                padding 0.5s ease,
                top 0.5s ease;
}

/* Základní plynulost */
.nav-links, .btn-login, .burger {
    transition: max-width 0.4s ease, opacity 0.3s ease, margin 0.4s ease, padding 0.4s ease;
    overflow: hidden;
}

/* OCHRANA MOBILNÍHO MENU: Pravidla pro formátování lišty aplikujeme jen na PC */
@media screen and (min-width: 769px) {
    .nav-links, .btn-login {
        max-width: 820px;
        opacity: 1;
        white-space: nowrap;
    }
}

/* --- TVAR LOĎKY --- */
.navbar.nav-boat {
    max-width: 155px; /* Mírně zvětšený trup (původně 120px) */
    padding: 10px 20px;
    border-radius: 6px 6px 70px 70px;
    background: rgba(233, 64, 87, 0.95);
    top: 10px;
}

/* Skrytí obsahu při scrollování */
.navbar.nav-boat .nav-links,
.navbar.nav-boat .btn-login,
.navbar.nav-boat .burger {
    max-width: 0 !important;
    opacity: 0 !important;
    margin: 0;
    padding: 0;
    border: none;
    pointer-events: none;
}

/* Zmenšení loga, aby se do loďky bezpečně vešlo */
.navbar.nav-boat .logo {
    text-align: center;
    width: 100%;
    color: white; 
    font-size: 0.85rem; /* Zmenšené písmo pro loďku */
    transition: color 0.3s ease, font-size 0.3s ease;
}

/* --- HERO SEKCE S VIDEEM --- */
.hero {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    object-fit: cover;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(44, 27, 61, 0.7) 0%, rgba(233, 64, 87, 0.5) 50%, rgba(255, 126, 95, 0.6) 100%);
    z-index: -1;
}

.hero-content {
    z-index: 1;
    text-align: center;
    padding: 0 20px;
}

.hero-content h1 {
    font-size: 4rem;
    margin-bottom: 20px;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.6);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 30px;
    text-shadow: 1px 1px 5px rgba(0,0,0,0.6);
}

/* Společná třída pro hlavní tlačítka */
.btn-primary {
    padding: 12px 35px;
    background: linear-gradient(45deg, var(--sunset-orange), var(--sunset-red));
    color: white;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    border-radius: 30px;
    border: none;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(255, 126, 95, 0.6);
}

/* --- SEKCE AKCE --- */
.events-section {
    padding: 80px 20px;
    background-color: var(--sunset-dark);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
}

.events-section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--sunset-yellow);
}

/* CSS Grid zajistí responzivitu karet */
.events-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.event-card {
    background: rgba(255, 255, 255, 0.05); /* Poloprůhledné pozadí karty */
    border: 1px solid rgba(255, 126, 95, 0.2);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    cursor: pointer; /* Změní kurzor na ručičku */
}

/* --- STYLY PRO ŠTÍTKY (VEŘEJNÉ/SOUKROMÉ) --- */
.event-badge {
    position: absolute;
    top: 15px;
    right: 15px;
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 10;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    backdrop-filter: blur(5px);
}

.badge-public {
    background-color: rgba(46, 204, 113, 0.85); /* Zelená barva */
    border: 1px solid #2ecc71;
}

.badge-private {
    background-color: rgba(233, 64, 87, 0.85); /* Červená barva z naší západu slunce palety */
    border: 1px solid var(--sunset-red);
}
/* Štítek pro akce pouze pro přihlášené */
.badge-user-only {
    background-color: #5c3d75;
    color: #ffffff;
}

.badge-permanent {
    background-color: #2b7a78;
    color: #ffffff;
}

/* Štítek a vzhled pro již proběhlé akce */
.badge-past {
    background-color: #6c757d;
    color: #ffffff;
}

.event-card-past {
    opacity: 0.78;
    filter: grayscale(25%);
    transition: opacity 0.25s ease, filter 0.25s ease;
}

    .event-card-past:hover {
        opacity: 1;
        filter: grayscale(0%);
    }

.event-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(233, 64, 87, 0.3);
    border-color: rgba(255, 126, 95, 0.6);
}

.event-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.event-content {
    padding: 20px;
}

.event-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: #ccc;
    margin-bottom: 10px;
}

.event-title {
    font-size: 1.69rem;
    color: var(--sunset-orange);
    margin-bottom: 15px;
}

.event-desc {
    font-size: 0.95rem;
    line-height: 1.5;
    color: #e0e0e0;
}

.no-events {
    text-align: center;
    font-style: italic;
    font-size: 1.2rem;
    color: #aaa;
    padding: 40px;
}

/* Ořezání popisku přesně na 2 řádky s přidáním "..." */
.event-desc {
    font-size: 1.24rem;
    line-height: 1.5;
    color: #e0e0e0;
    display: -webkit-box;
    -webkit-line-clamp: 2; /* Počet povolených řádků */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* --- MODÁLNÍ OKNO S ROZOSTŘENÝM POZADÍM --- */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Ztmavení */
    backdrop-filter: blur(8px); /* Rozostření celého webu pod tím */
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    padding: 20px;
}

/* Třída pro zobrazení modálu */
.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: var(--sunset-dark);
    border: 1px solid var(--sunset-orange);
    border-radius: 15px;
    max-width: 650px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto; /* Pokud by byl text moc dlouhý, umožní rolování uvnitř */
    position: relative;
    transform: translateY(-20px);
    transition: transform 0.3s ease;
    box-shadow: 0 10px 30px rgba(0,0,0,0.7);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

/* Zrušení ořezání textu uvnitř modálního okna (chceme vidět vše) */
.modal-content .event-desc {
    font-size: 1.24rem;
    -webkit-line-clamp: unset;
    display: block;
}

/* Zvětšení fotky uvnitř modálu */
.modal-content .event-img {
    height: 300px;
}

/* Nadpis v detailu akce (modální okno) zvětšený o 30 % z 1.8rem */
.modal-content .event-title {
    font-size: 2.34rem !important;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    border: none;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s;
}

.modal-close:hover {
    background: var(--sunset-red);
}

.btn-wrapper {
    text-align: center;
    margin-top: 50px;
}

/* --- ANIMACE ROZBALOVÁNÍ AKCÍ (SYMETRICKÁ GRID METODA) --- */
.expandable-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 0.6s ease-in-out;
}

.expandable-wrapper.expanded {
    grid-template-rows: 1fr;
}

.expandable-inner {
    min-height: 0;
    overflow: hidden;
    opacity: 0;
    /* Plynulé prolínání, časově sjednocené s pohybem */
    transition: opacity 0.6s ease-in-out; 
}

.expandable-wrapper.expanded .expandable-inner {
    opacity: 1;
}

/* --- SEKCE GALERIE --- */
.gallery-section {
    padding: 80px 20px;
    background-color: #1f112b; /* Trošku tmavší odstín fialové pro kontrast */
}

.gallery-section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 30px;
    color: var(--sunset-yellow);
}

.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 40px;
}

.filter-btn {
    background: transparent;
    border: 1px solid var(--sunset-orange);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.filter-btn:hover, .filter-btn.active {
    background: var(--sunset-orange);
    color: var(--sunset-dark);
    font-weight: bold;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.gallery-item {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* --- LIGHTBOX (Celoobrazovková galerie) --- */
.lightbox-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 3000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.lightbox-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content-wrapper {
    position: relative;
    max-width: 80%;
    max-height: 80vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-content-wrapper img {
    max-width: 100%;
    max-height: 75vh;
    border-radius: 5px;
    box-shadow: 0 5px 25px rgba(0,0,0,0.5);
    cursor: zoom-out; /* Kurzor napoví, že kliknutím se zmenší */
    object-fit: contain; /* Toto je klíčové - nedeformuje a neořezává */
}

.lightbox-caption {
    color: white;
    margin-top: 15px;
    font-size: 1.1rem;
    text-align: center;
}

.lightbox-nav {
    background: transparent;
    color: rgba(255, 255, 255, 0.5);
    border: none;
    font-size: 4rem;
    cursor: pointer;
    padding: 20px;
    transition: color 0.3s ease, transform 0.3s;
    user-select: none;
}

.lightbox-nav:hover {
    color: white;
    transform: scale(1.1);
}

/* --- ŠTÍTEK PRO PANORAMATA --- */
.pano-badge {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 5px 10px;
    border-radius: 5px;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 2px;
    z-index: 10;
    pointer-events: none; /* Aby štítek neblokoval kliknutí myší na fotku */
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(3px);
}

/* --- SEKCE BLOG --- */
.blog-section {
    padding: 80px 20px;
    background-color: var(--sunset-dark);
}

.blog-section h2 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 50px;
    color: var(--sunset-yellow);
}

/* 2 sloupce na PC, na mobilu se srovnají pod sebe */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 450px), 1fr));
    gap: 30px;
}

/* Celá karta funguje jako odkaz */
.blog-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 126, 95, 0.2);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
    text-decoration: none; /* Odstraní podtržení odkazu */
}

.blog-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 25px rgba(255, 126, 95, 0.2);
    border-color: rgba(255, 126, 95, 0.6);
}

/* Obrázek ve formátu 3:2 s mizejícím efektem do ztracena */
.blog-img {
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    display: block;
    /* Od 60 % výšky začne obrázek plynule mizet do naprosté průhlednosti */
    -webkit-mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 60%, transparent 100%);
}

/* Obsah karty posunutý nahoru PŘES mizející obrázek */
.blog-content {
    padding: 0 25px 25px 25px; /* Zrušili jsme horní padding */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    margin-top: -70px; /* Tento záporný margin "vytáhne" text do obrázku */
    position: relative;
    z-index: 2; /* Zajišťuje, že text bude vždy nad obrázkem */
}

.blog-date {
    font-size: 0.85rem;
    color: #ccc;
    margin-bottom: 10px;
}

.blog-title {
    font-size: 1.95rem;
    color: var(--sunset-orange);
    margin-bottom: 15px;
    line-height: 1.3;
}

/* Prostor pro text - zvětšeno pro více řádků */
.blog-text-wrapper {
    position: relative;
    max-height: 11.05em; /* Zvětšili jsme z 5em na 8.5em (vejde se cca 5-6 řádků) */
    overflow: hidden;
    /* Efekt mizení textu na posledních řádcích zůstává */
    -webkit-mask-image: linear-gradient(to bottom, black 65%, transparent 100%);
    mask-image: linear-gradient(to bottom, black 65%, transparent 100%);
}

.blog-desc {
    font-size: 1.3rem;
    line-height: 1.6;
    color: #e0e0e0;
    margin: 0;
}

/* --- PATIČKA (FOOTER) --- */
.site-footer {
    background-color: #170d21; /* O kousek tmavší než var(--sunset-dark) pro optické zakončení */
    padding: 60px 20px 20px 20px;
    margin-top: 50px;
    position: relative;
}

/* Jemný zářící gradient na horním okraji patičky */
.site-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--sunset-orange), transparent);
    box-shadow: 0 0 15px var(--sunset-red);
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand h3 {
    color: var(--sunset-yellow);
    font-size: 1.8rem;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

.footer-brand p {
    color: #aaa;
    line-height: 1.6;
    font-size: 0.95rem;
    padding-right: 20px;
}

.footer-links h4, .footer-social h4 {
    color: white;
    margin-bottom: 20px;
    font-size: 1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #aaa;
    text-decoration: none;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.footer-links a:hover {
    color: var(--sunset-orange);
    transform: translateX(8px); /* Efekt plynulého odskočení doprava */
}

/* Stylování ikonek pro sítě */
.social-icons {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 126, 95, 0.2);
    color: #ccc;
    transition: all 0.3s ease;
}

.social-icon svg {
    width: 20px;
    height: 20px;
}

/* Při najetí získá ikona barvy naší palety a trošku povyskočí */
.social-icon:hover {
    background: linear-gradient(45deg, var(--sunset-orange), var(--sunset-red));
    border-color: transparent;
    color: white;
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(233, 64, 87, 0.5);
}

.footer-email {
    color: #aaa;
    font-size: 0.95rem;
}

.footer-email a {
    color: var(--sunset-yellow);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-email a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: #777;
    font-size: 0.85rem;
}

/* --- DETAIL ČLÁNKU (clanek.html) --- */

/* Hlavička s obrázkem v pozadí */
.article-hero {
    position: relative;
    height: 60vh;
    min-height: 400px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-bottom: 60px;
}

.article-hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to bottom, rgba(44, 27, 61, 0.3) 0%, var(--sunset-dark) 100%);
}

.article-hero-content {
    position: relative;
    z-index: 1;
    max-width: 900px;
    width: 100%;
    padding: 0 20px;
    text-align: center;
}

.article-date {
    color: var(--sunset-orange);
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
}

.article-hero-content h1 {
    font-size: 3.5rem;
    margin: 15px 0;
    text-shadow: 2px 2px 10px rgba(0,0,0,0.8);
}

.article-author {
    color: #ccc;
    font-size: 1.1rem;
}

/* Samotný text článku */
.article-body {
    background-color: var(--sunset-dark);
    padding: 60px 20px;
}

.article-container {
    max-width: 800px;
    margin: 0 auto;
}

/* Formátování textu pro skvělou čitelnost */
.article-container p {
    font-size: 1.5rem;
    line-height: 1.8;
    color: #e0e0e0;
    margin-bottom: 25px;
    text-align: justify;
    -webkit-hyphens: auto;
    hyphens: auto;
}

/* První (perexový) odstavec */
.article-container .perex {
    font-size: 1.76rem;
    color: white;
    font-weight: 500;
    border-left: 4px solid var(--sunset-orange);
    padding-left: 20px;
    margin-bottom: 40px;
    text-align: justify;
    -webkit-hyphens: auto;
    hyphens: auto;
}

.article-container h2 {
    font-size: 2.6rem;
    color: var(--sunset-yellow);
    margin: 50px 0 20px 0;
}

/* Podnadpisy h3 a citace v textu článků (zvětšeno o 30 %) */
.article-container h3 {
    font-size: 1.95rem;
    color: var(--sunset-yellow);
    margin: 40px 0 15px 0;
    line-height: 1.35;
}

.article-container blockquote {
    font-size: 1.45rem;
    line-height: 1.8;
    color: #f0e6f5;
    border-left: 4px solid var(--sunset-yellow);
    background: rgba(255, 255, 255, 0.04);
    padding: 20px 25px;
    margin: 30px 0;
    border-radius: 0 12px 12px 0;
    font-style: italic;
    text-align: justify;
    -webkit-hyphens: auto;
    hyphens: auto;
}

/* Vložené fotky do textu */
.article-image {
    margin: 40px 0;
    border-radius: 10px;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-image figcaption {
    background: rgba(255, 255, 255, 0.05);
    padding: 15px;
    text-align: center;
    font-size: 0.9rem;
    color: #aaa;
    border-bottom: 2px solid var(--sunset-orange);
}

/* =========================================================
   OBRÁZKY UVNITŘ TEXTU ČLÁNKŮ BLOGU (clanek.html)
   ========================================================= */
.article-full-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 25px auto;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.article-figure {
    margin: 30px 0;
    text-align: center;
}

    .article-figure img {
        margin: 0 auto 10px auto;
    }

    .article-figure figcaption {
        font-size: 0.9rem;
        color: #6c5d77;
        font-style: italic;
        line-height: 1.4;
    }

    /* Obtékání textem zleva / zprava */
    .article-figure.float-right {
        float: right;
        max-width: 45%;
        margin: 8px 0 20px 25px;
    }

    .article-figure.float-left {
        float: left;
        max-width: 45%;
        margin: 8px 25px 20px 0;
    }

/* Dvě fotky vedle sebe */
.article-image-pair {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 30px 0;
}

    .article-image-pair .article-figure {
        margin: 0;
    }

/* Na mobilu zrušíme obtékání a dáme fotky pod sebe */
@media (max-width: 768px) {
    .article-figure.float-right,
    .article-figure.float-left {
        float: none;
        max-width: 100%;
        margin: 25px 0;
    }

    .article-image-pair {
        grid-template-columns: 1fr;
    }
}

/* --- PŘIHLÁŠENÍ A NÁSLEDNÁ SPRÁVA --- */
.forms-wrapper {
    display: grid;
    /* DŮLEŽITÉ: Následující dva řádky tvoří jedinou buňku gridu, do které narveme oba formuláře */
    grid-template-columns: 1fr;
    grid-template-rows: 1fr;
    position: relative;
    overflow: hidden; /* Aby vyjíždějící formulář nepřetékal z karty */
}
.login-section {
    min-height: calc(100vh - 60px); /* 60px je výška patičky */
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 120px 20px 60px 20px; /* Prostor pro navbar nahoře */
    /* Mírně odlišné pozadí pro odlišení od zbytku webu */
    background: radial-gradient(circle at center, rgba(44, 27, 61, 0.9) 0%, var(--sunset-dark) 100%);
}

.login-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 126, 95, 0.2);
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 450px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.6);
    backdrop-filter: blur(15px);
    text-align: center;
}

.login-card h2 {
    color: var(--sunset-yellow);
    font-size: 1.8rem;
    margin-bottom: 15px;
    line-height: 1.2;
}

.login-desc {
    color: #ccc;
    font-size: 0.95rem;
    margin-bottom: 30px;
    line-height: 1.5;
}

.login-form {
    /* DŮLEŽITÉ: Toto posadí OBA formuláře do té samé (první) buňky gridu, takže budou přes sebe */
    grid-column: 1 / 2;
    grid-row: 1 / 2;
    
    display: flex;
    flex-direction: column;
    gap: 20px;
    
    /* Luxusní plynulost přesunu a průhlednosti */
    transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.4, 0, 0.2, 1), visibility 0.5s;
}

#email-form {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

#pin-form {
    opacity: 0;
    transform: translateX(40px); /* Odsazeno o kousek doprava */
    visibility: hidden;
    pointer-events: none;
}

/* --- STAV PO ODESLÁNÍ (E-mail odjede doleva, PIN přijede ze strany) --- */
.forms-wrapper.show-pin #email-form {
    opacity: 0;
    transform: translateX(-40px);
    visibility: hidden;
    pointer-events: none;
}

.forms-wrapper.show-pin #pin-form {
    opacity: 1;
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.input-group {
    text-align: left;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #e0e0e0;
    font-size: 0.9rem;
}

.input-group input {
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(0, 0, 0, 0.3);
    color: white;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.input-group input:focus {
    outline: none;
    border-color: var(--sunset-orange);
    box-shadow: 0 0 15px rgba(255, 126, 95, 0.3);
    background: rgba(0, 0, 0, 0.5);
}

/* Speciální formátování pro políčko s PINem */
.pin-input {
    text-align: center;
    font-size: 1.8rem !important;
    letter-spacing: 10px;
    font-weight: bold;
    color: var(--sunset-yellow) !important;
}

.btn-full {
    width: 100%;
}

.btn-text {
    background: transparent;
    color: #aaa;
    border: none;
    margin-top: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.btn-text:hover {
    color: var(--sunset-orange);
}

/* Skrytí šipek na mobilu a upravení velikosti */
@media screen and (max-width: 768px) {
    .lightbox-nav { font-size: 2.5rem; padding: 10px; }
    .lightbox-content-wrapper { max-width: 95%; }
}

/* =========================================================
   UŽIVATELSKÁ SEKCE A VYÚČTOVÁNÍ (uzivatel.html)
   ========================================================= */

/* Oprava tlačítka Odhlásit se, aby ladilo s primárním tlačítkem */
#logout-btn {
    background-color: transparent;
    color: #3b2847;
    border: 2px solid #3b2847;
    padding: 12px 24px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 10px;
}

    #logout-btn:hover {
        background-color: #3b2847;
        color: #ffffff;
    }

/* Hlavní karta vyúčtování (stejný vizuální styl jako uvítací karta) */
#billing-section {
    max-width: 1100px;
    margin: 30px auto 60px auto;
    background: #ffffff;
    color: #2c2233; /* Vynucení tmavého čitelného písma */
    padding: 35px 40px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(26, 15, 34, 0.08);
    font-family: inherit;
}

/* Hlavička vyúčtování + výběr roku */
.billing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
    border-bottom: 2px solid #f0ecf2;
    padding-bottom: 18px;
    margin-bottom: 25px;
}

#billing-title {
    margin: 0;
    color: #23152b !important;
    font-size: 1.7rem;
    font-weight: 700;
}

#admin-year-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #23152b !important;
}

    #admin-year-selector label {
        color: #23152b !important;
        font-weight: 600;
        font-size: 0.95rem;
    }

#billing-year-select {
    padding: 8px 16px;
    font-size: 1rem;
    font-weight: 600;
    color: #23152b;
    background-color: #f8f6fa;
    border: 2px solid #dcd4e2;
    border-radius: 10px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s ease;
}

    #billing-year-select:focus,
    #billing-year-select:hover {
        border-color: #ff7657;
    }

/* Informační boxy s přehledem paušálů a odečtů */
.billing-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 20px;
    margin-bottom: 25px;
}

.billing-info-card {
    background: #f8f6fa;
    border: 1px solid #e6e0eb;
    border-left: 5px solid #ff7657;
    padding: 18px 20px;
    border-radius: 12px;
    color: #2c2233 !important;
    line-height: 1.6;
}

    .billing-info-card h3,
    .billing-info-card h4 {
        margin: 0 0 10px 0;
        color: #23152b !important;
        font-size: 1.1rem;
    }

    .billing-info-card p,
    .billing-info-card small,
    .billing-info-card span,
    .billing-info-card strong {
        color: #2c2233 !important;
        font-size: 0.95rem;
    }

/* Tabulka vyúčtování */
.billing-table-wrapper {
    overflow-x: auto;
    border-radius: 12px;
    border: 1px solid #e6e0eb;
}

.billing-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    color: #2c2233 !important;
    font-size: 0.95rem;
}

    .billing-table thead {
        background: #2b1b35; /* Tmavě fialová podle navigace a patičky */
        color: #ffffff !important;
    }

    .billing-table th {
        padding: 14px 12px;
        font-weight: 600;
        text-align: right;
        color: #ffffff !important;
        white-space: nowrap;
    }

        .billing-table th:first-child {
            text-align: left;
        }

    .billing-table td {
        padding: 12px;
        border-bottom: 1px solid #eee9f2;
        color: #2c2233 !important;
        text-align: right;
    }

        .billing-table td:first-child {
            text-align: left;
            font-weight: 600;
            color: #23152b !important;
        }

        .billing-table td small,
        .billing-table td strong {
            color: #2c2233 !important;
        }

    .billing-table tbody tr:nth-child(even) {
        background-color: #fcfbfd;
    }

    .billing-table tbody tr:hover {
        background-color: #f4eff8;
    }

    /* Zvýrazněný sloupec součtu za místo */
    .billing-table td.cell-total {
        font-weight: 700;
        color: #d94e34 !important;
        background-color: #fff6f3;
        white-space: nowrap;
    }

    /* Patička tabulky (Celkový součet) */
    .billing-table tfoot tr {
        background: #23152b;
        color: #ffffff !important;
        font-size: 1.05rem;
        font-weight: 700;
    }

    .billing-table tfoot td {
        padding: 15px 12px;
        color: #ffffff !important;
        border: none;
    }

        .billing-table tfoot td.grand-total {
            color: #ff8c42 !important; /* Oranžový akcent podle loga mlyny26.cz */
            font-size: 1.15rem;
        }

@media (max-width: 768px) {
    #billing-section {
        padding: 20px 15px;
        margin: 20px 10px 40px 10px;
    }
}

/* =========================================================
   ŽIVÝ STREAM Z KAMERY – POMĚR 16:9 A CELÁ OBRAZOVKA
   ========================================================= */
#camera-section {
    max-width: 1100px;
    margin: 30px auto;
    background: #ffffff;
    color: #2c2233;
    padding: 30px 35px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(26, 15, 34, 0.08);
}

.camera-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 18px;
}

    .camera-header h2,
    #camera-section h2 {
        margin: 0;
        color: #23152b;
        font-size: 1.5rem;
    }

/* Kontejner přehrávače v pevném poměru 16:9 */
.camera-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: #1a0f22;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Samotný stream roztažený přesně do 16:9 */
#live-camera-stream {
    width: 100% !important;
    height: 100% !important;
    max-height: none !important;
    aspect-ratio: 16 / 9;
    object-fit: fill !important; /* Roztáhne obraz kamery na 16:9 bez černých pruhů */
    display: none;
    margin: 0;
    cursor: pointer;
}

/* Tlačítko pro celou obrazovku v pravém dolním rohu */
.camera-fullscreen-btn {
    position: absolute;
    bottom: 15px;
    right: 15px;
    background: rgba(23, 13, 33, 0.78);
    color: #ffffff;
    border: 1px solid rgba(255, 126, 95, 0.6);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    z-index: 20;
    backdrop-filter: blur(5px);
    transition: background 0.25s ease, transform 0.2s ease, border-color 0.25s ease;
    display: none; /* Zobrazí se, jakmile naběhne obraz */
}

    .camera-fullscreen-btn:hover {
        background: var(--sunset-orange);
        color: #170d21;
        border-color: var(--sunset-orange);
        transform: scale(1.04);
    }

/* Vzhled v režimu celé obrazovky (PC / Android) */
.camera-wrapper:fullscreen,
.camera-wrapper:-webkit-full-screen {
    width: 100vw;
    height: 100vh;
    max-width: none;
    border-radius: 0;
    background: #000000;
    display: flex;
    align-items: center;
    justify-content: center;
}

    .camera-wrapper:fullscreen #live-camera-stream,
    .camera-wrapper:-webkit-full-screen #live-camera-stream {
        width: 100% !important;
        height: 100% !important;
        max-height: 100vh !important;
        object-fit: fill !important;
    }

/* Fallback celé obrazovky pro iOS (iPhone) */
.camera-wrapper.camera-pseudo-fullscreen {
    position: fixed !important;
    top: 0;
    left: 0;
    width: 100vw !important;
    height: 100vh !important;
    z-index: 9999 !important;
    border-radius: 0 !important;
    background: #000000 !important;
}

/* =========================================================
   ADMINISTRACE A SPRÁVA WEBU (sprava.html)
   ========================================================= */
.admin-main {
    max-width: 1150px;
    margin: 120px auto 60px auto;
    padding: 0 20px;
}

.admin-hero-bar {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 126, 95, 0.3);
    border-radius: 18px;
    padding: 25px 35px;
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 20px;
}

    .admin-hero-bar h1 {
        font-size: 1.9rem;
        color: var(--sunset-yellow);
        margin-bottom: 5px;
    }

    .admin-hero-bar p {
        color: #ccc;
        font-size: 0.95rem;
    }

.admin-quick-nav {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-admin-outline {
    padding: 10px 20px;
    border-radius: 30px;
    border: 1px solid var(--sunset-orange);
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.25s ease;
}

    .btn-admin-outline:hover {
        background: var(--sunset-orange);
        color: var(--sunset-dark);
    }

.admin-card {
    background: #ffffff;
    color: #2c2233;
    padding: 35px 40px;
    border-radius: 18px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
    margin-bottom: 35px;
}

.admin-card-header {
    border-bottom: 2px solid #f0ecf2;
    padding-bottom: 18px;
    margin-bottom: 25px;
}

    .admin-card-header h2 {
        color: #23152b;
        font-size: 1.6rem;
        margin-bottom: 8px;
    }

    .admin-card-header p {
        color: #5a4b66;
        font-size: 1rem;
        line-height: 1.5;
    }

.admin-grid-2col {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
    gap: 30px;
}

.admin-grid-2col-inner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.admin-field {
    margin-bottom: 18px;
}

    .admin-field label {
        display: block;
        font-weight: 600;
        color: #23152b;
        margin-bottom: 7px;
        font-size: 0.95rem;
    }

    .admin-field input[type="text"],
    .admin-field input[type="number"],
    .admin-field input[type="date"],
    .admin-field select,
    .admin-field textarea {
        width: 100%;
        padding: 12px 14px;
        border: 2px solid #dcd4e2;
        border-radius: 10px;
        background: #f8f6fa;
        color: #23152b;
        font-size: 1rem;
        transition: border-color 0.2s ease;
    }

        .admin-field input:focus,
        .admin-field textarea:focus {
            outline: none;
            border-color: var(--sunset-orange);
            background: #fff;
        }

.admin-file-input {
    width: 100%;
    padding: 14px;
    border: 2px dashed var(--sunset-orange);
    border-radius: 12px;
    background: #fff8f6;
    color: #23152b;
    cursor: pointer;
    font-weight: 600;
}

.admin-options-box {
    background: #f8f6fa;
    border: 1px solid #e6e0eb;
    border-left: 5px solid var(--sunset-orange);
    padding: 18px 20px;
    border-radius: 12px;
    margin-bottom: 18px;
}

    .admin-options-box h4 {
        color: #23152b;
        margin-bottom: 12px;
        font-size: 1.05rem;
    }

.admin-checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
    cursor: pointer;
    color: #2c2233;
    line-height: 1.4;
}

    .admin-checkbox-label input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin-top: 2px;
        accent-color: #e94057;
        cursor: pointer;
        flex-shrink: 0;
    }

    .admin-checkbox-label small {
        color: #6c5d77;
        font-size: 0.85rem;
    }

.admin-categories-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 12px;
    background: #f8f6fa;
    border-radius: 10px;
    border: 1px solid #e6e0eb;
}

.admin-cat-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: #ffffff;
    border: 1px solid #dcd4e2;
    padding: 7px 14px;
    border-radius: 20px;
    font-size: 0.92rem;
    font-weight: 600;
    color: #23152b;
    cursor: pointer;
    user-select: none;
}

    .admin-cat-pill input {
        accent-color: #e94057;
    }

.admin-preview-box {
    background: #23152b;
    color: #fff;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
}

    .admin-preview-box h4 {
        margin-bottom: 10px;
        color: var(--sunset-yellow);
    }

    .admin-preview-box img {
        max-width: 100%;
        max-height: 260px;
        border-radius: 8px;
        object-fit: contain;
    }

.admin-form-actions {
    margin-top: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
}

.admin-status-msg {
    font-weight: 600;
    font-size: 1rem;
}

.admin-result-box {
    margin-top: 25px;
    padding: 20px;
    background: #f1f8f4;
    border: 1px solid #a3d9b8;
    border-radius: 12px;
    color: #1b4332;
}

.admin-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.admin-result-item {
    background: #fff;
    padding: 10px;
    border-radius: 10px;
    border: 1px solid #d8e2dc;
    text-align: center;
}

    .admin-result-item img {
        width: 100%;
        height: 160px;
        object-fit: cover;
        border-radius: 6px;
        margin-bottom: 8px;
    }

.admin-batch-details {
    margin-top: 30px;
    border-top: 2px solid #f0ecf2;
    padding-top: 20px;
}

    .admin-batch-details summary {
        font-weight: 700;
        color: #23152b;
        cursor: pointer;
        font-size: 1.05rem;
    }

.admin-batch-body {
    margin-top: 15px;
    padding: 20px;
    background: #f8f6fa;
    border-radius: 12px;
}

.admin-placeholder-box {
    padding: 30px;
    background: #f8f6fa;
    border: 2px dashed #dcd4e2;
    border-radius: 12px;
    text-align: center;
    color: #6c5d77;
    font-weight: 600;
}

@media (max-width: 768px) {
    .admin-card {
        padding: 22px 18px;
    }

    .admin-grid-2col {
        grid-template-columns: 1fr;
    }
}

/* --- HAMBURGER MENU & RESPONSIVITA --- */
.burger {
    display: none;
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: white;
    margin: 5px;
    transition: all 0.3s ease;
}

@media screen and (max-width: 850px) {
    .navbar {
        width: 90%;
        max-width: none;
    }
}

@media screen and (max-width: 768px) {
    .navbar {
        padding: 15px 25px;
        border-radius: 25px;
    }

    .nav-links {
        position: absolute;
        right: 0px;
        top: 70px;
        background: rgba(44, 27, 61, 0.95);
        flex-direction: column;
        width: 100%;
        text-align: center;
        border-radius: 20px;
        transform: translateY(-150%);
        opacity: 0;
        transition: all 0.4s ease;
        padding: 20px 0;
        pointer-events: none;
    }

    .nav-links li {
        padding: 15px 0;
    }

    .nav-active {
        transform: translateY(0%);
        opacity: 1;
        pointer-events: auto;
    }

    .burger {
        display: block;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }
}

/* =========================================================
   FIXNÍ ŠÍŘKA KARET AKCÍ PŘI ROZBALENÍ A FILTROVÁNÍ
   ========================================================= */
#events-grid,
#extra-events-wrapper,
#extra-events-grid {
    width: 100%;
    box-sizing: border-box;
}

#events-grid,
#extra-events-grid {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 30px;
    align-items: stretch;
}

/* Tablet (670px až 999px) – 2 sloupce, přesně odpovídá getInitialCount() = 4 v script.js */
@media (max-width: 999px) {
    #events-grid,
    #extra-events-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

/* Mobil (pod 670px) – 1 sloupec */
@media (max-width: 669px) {
    #events-grid,
    #extra-events-grid {
        grid-template-columns: 1fr !important;
    }
}

.toggle .line1 { transform: rotate(-45deg) translate(-5px, 6px); }
.toggle .line2 { opacity: 0; }
.toggle .line3 { transform: rotate(45deg) translate(-5px, -6px); }

