:root {
    --primary-color: #3498db;
    --secondary-color: #2c3e50;
    --accent-color: #27ae60;
    --bg-color: #f4f7f6;
    --text-color: #333;
    --card-bg: #ffffff;
}

* { box-sizing: border-box; transition: all 0.2s ease; }

body { 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
    background-color: var(--bg-color); 
    color: var(--text-color); 
    line-height: 1.6;
    margin: 0;
}

.container { 
    max-width: 1200px; 
    margin: 0 auto; 
    padding: 20px; 
}

/* Mřížka galerie */
.gallery-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); 
    gap: 25px; 
    margin-top: 20px;
}

/* Karta s fotkou */
.media-card, .timeline-item {
    background: var(--card-bg);
    border-radius: 15px;
    border: none;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    overflow: hidden;
}

.media-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
}

/* Tlačítka */
.btn {
    display: inline-block;
    background: var(--primary-color);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
}

.btn:hover {
    filter: brightness(1.1);
}

.media-card img, .media-card video { 
    width: 100%; 
    height: 250px; 
    object-fit: cover; /* Důležité: ořízne fotky, aby byly všechny stejně velké */
    display: block;
}

/* Sekce pod fotkou */
.card-content { padding: 15px; flex-grow: 1; }
.description { font-weight: bold; margin-bottom: 5px; display: block; }
.meta { font-size: 0.85em; color: #777; }

/* Komentáře */
.comment-box { 
    background: #f1f2f6; 
    padding: 10px; 
    border-top: 1px solid #eee; 
    font-size: 0.9em;
}
.comment { margin-bottom: 5px; border-bottom: 1px dotted #ccc; padding-bottom: 3px; }

/* Formulář pro komentář */
.comment-form { display: flex; gap: 5px; margin-top: 10px; }
.comment-form input { flex-grow: 1; border-radius: 20px; border: 1px solid #ddd; padding: 5px 12px; }

/* Oprava pro zobrazení celé fotky v Lightboxu */
.lum-lightbox-inner img {
    max-width: 90vw !important;  /* Max 90 % šířky obrazovky */
    max-height: 80vh !important; /* Max 80 % výšky obrazovky (zbyde místo na popisky) */
    width: auto !important;      /* Zachová poměr stran */
    height: auto !important;     /* Zachová poměr stran */
    object-fit: contain !important; /* Zajistí, že se fotka nebude natahovat */
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    border-radius: 4px;
}

/* Vycentrování obsahu lightboxu */
.lum-lightbox-inner {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

/* Styl pro kartu alba */
.album-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.2s;
    border: 1px solid #ddd;
    text-align: center;
}

.album-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Kontejner pro náhledovou fotku */
.album-preview {
    width: 100%;
    height: 180px;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.album-img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Vyplní prostor bez deformace */
}

.album-empty {
    font-size: 60px;
    color: #edb458;
}

.album-info {
    padding: 10px;
    font-weight: bold;
    border-top: 1px solid #eee;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2c3e50;
    padding: 10px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
}
.navbar a { color: rgb(8, 8, 8); padding: 10px; font-size: 16px; }
.navbar .nav-links { display: flex; gap: 15px; }
.search-form { display: flex; gap: 5px; }
.search-form input { padding: 5px 10px; border-radius: 15px; border: none; }
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--secondary-color);
    padding: 15px 25px;
    border-radius: 12px;
    margin-bottom: 30px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.nav-links a {
    color: #ecf0f1;
    text-decoration: none;
    margin-right: 20px;
    font-weight: 500;
    font-size: 1.1em;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.search-form input {
    padding: 8px 15px;
    border-radius: 20px;
    border: none;
    outline: none;
    width: 200px;
}

.logout-link {
    color: #bdc3c7 !important;
    font-size: 0.9em;
}

/* Kontejner pro vyhledávání musí mít relativní pozici */
.search-container {
    position: relative;
    width: 300px; /* Nebo šířka, kterou potřebuješ */
}

/* Box s výsledky (našeptávač) */
.suggestions-box {
    position: absolute;
    top: 100%; /* Hned pod inputem */
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-top: none; /* Aby to navazovalo na input */
    border-radius: 0 0 10px 10px;
    box-shadow: 0 8px 15px rgba(0,0,0,0.1); /* Jemný stín jako u Googlu */
    z-index: 9999;
    display: none; /* Schované, dokud se nepíše */
    overflow: hidden;
}

/* Jednotlivé položky seznamu */
.suggestion-item {
    display: flex;
    align-items: center;
    padding: 12px 15px;
    color: #333;
    text-decoration: none;
    border-bottom: 1px solid #f0f0f0;
    transition: background 0.2s;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background-color: #f0f0f0;
    color: #0084ff;
}

/* Ikony v našeptávači */
.suggestion-item i {
    margin-right: 10px;
    font-size: 1.1em;
}

/* Definice animace pro probliknutí */
@keyframes highlight {
    0% { outline: 5px solid #0084ff; transform: scale(1.05); }
    100% { outline: 0px solid transparent; transform: scale(1); }
}

/* Třída, kterou JavaScript přidá hledané fotce */
.highlight-target {
    animation: highlight 2s ease-out;
    scroll-margin-top: 100px; /* Aby fotka nebyla schovaná pod navbarem */
}

/* Kontejner pro kroniku */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 40px auto;
    padding: 0 20px;
}

/* Svislá čára uprostřed */
.timeline::after {
    content: '';
    position: absolute;
    width: 4px;
    background: #3498db;
    top: 0;
    bottom: 0;
    left: 40px; /* Zarovnání na stranu pro mobily/jednoduchost */
}

/* Jednotlivý zápis */
.timeline-item {
    padding: 20px 30px;
    position: relative;
    background: white;
    border-radius: 12px;
    margin-bottom: 30px;
    margin-left: 70px; /* Odsazení od čáry */
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    border: 1px solid #eee;
}

/* Tečka na čáře */
.timeline-item::before {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    background: #3498db;
    border: 4px solid #fff;
    border-radius: 50%;
    left: -42px;
    top: 25px;
    z-index: 1;
}

.timeline-date {
    font-weight: bold;
    color: #3498db;
    font-size: 0.9em;
    display: block;
    margin-bottom: 10px;
}

.timeline-content h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.timeline-author {
    font-style: italic;
    color: #777;
    font-size: 0.85em;
    margin-top: 15px;
    display: block;
}

@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .nav-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 10px;
    }

    .nav-links a { margin: 0; }

    .timeline::after { left: 20px; }
    .timeline-item { margin-left: 45px; }
    .timeline-item::before { left: -33px; }
    
    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr));
    }
}
/* Karty akcí na homepage */
.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 50px;
}

.action-card {
    background: white;
    padding: 30px;
    text-align: center;
    border-radius: 15px;
    text-decoration: none;
    color: var(--secondary-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border: 1px solid #eee;
}

.action-card i {
    font-size: 2.5em;
    display: block;
    margin-bottom: 10px;
    color: var(--primary-color);
}

.action-card:hover i { color: #333; }

/* Novinky v kronice - "Bublina" */
.news-box {
    background: #fff;
    padding: 25px;
    border-left: 5px solid var(--primary-color);
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

/* Homepage Hero */
.hero {
    background: #2c3e50; /* Stejná barva jako tvůj Navbar */
    color: white;
    padding: 50px 30px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 40px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.hero h1 { margin: 0; font-size: 2.5em; }
.hero p { opacity: 0.8; font-size: 1.1em; }

/* Akční karty */
.action-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 50px;
}

.action-card {
    background: white;
    padding: 30px;
    border-radius: 15px;
    text-align: center;
    text-decoration: none;
    color: #333;
    border: 1px solid #eee;
    transition: all 0.3s ease;
}

.action-card:hover {
    background-color: #3498db;
    color: #333;
    transform: translateY(-10px);
    border-color: #3498db;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.icon-circle {
    width: 70px;
    height: 70px;
    background: #f0f7ff;
    color: #3498db;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.8em;
}

/* Sekce pod kartami */
.home-section { margin-bottom: 40px; }
.home-section h2 { font-size: 1.4em; border-bottom: 2px solid #eee; padding-bottom: 10px; margin-bottom: 20px; }

.album-preview-grid { display: flex; gap: 15px; flex-wrap: wrap; }

.album-mini-card {
    background: white;
    padding: 15px 20px;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #eee;
}

.album-mini-card:hover{
    background-color: #3498db;
    color: #333;
    transform: translateY(-5px);
    border-color: #3498db;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.album-folder-icon { color: #f1c40f; }

.news-box {
    background: white;
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid #3498db;
}

.news-date { color: #888; font-size: 0.9em; }
.read-more { color: #3498db; font-weight: bold; text-decoration: none; }

/* Úprava existujícího Navbaru */
.navbar {
    position: fixed; /* Zůstane na místě */
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000; /* Aby byl vždy nad ostatním obsahem */
    
    /* Vylepšení vzhledu */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2c3e50;
    padding: 15px 25px;
    margin-bottom: 0; /* U fixního navbaru margin-bottom nefunguje na zbytek stránek */
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    
    /* Pokud chceš zachovat zaoblené rohy jako na obrázku, 
       ale přes celou šířku, smaž border-radius nebo ho nech jen dole: */
    border-radius: 0 0 12px 12px; 
}

/* KLÍČOVÝ KROK: Odsazení obsahu pod Navbarem */
body {
    padding-top: 80px; /* Musí odpovídat výšce tvého navbaru, aby text nezačínal pod ním */
}

/* Upravíme kontejner, aby neměl zbytečně velký margin nahoře */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.navbar {
    background: rgba(44, 62, 80, 0.9); /* Průhlednost 90% */
    backdrop-filter: blur(10px); /* Rozmaže obsah pod navbarem */
    -webkit-backdrop-filter: blur(10px); /* Pro Safari */
}

/* Vycentrování celého obsahu */
.main-content {
    display: flex;
    flex-direction: column;
    align-items: center; /* Vycentruje vnitřní prvky */
    text-align: center;
}

.gallery-header {
    width: 100%;
    max-width: 1000px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
    margin-top: 20px;
}

.header-actions {
    display: flex;
    gap: 15px;
}

/* Styl pro mřížku alb */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 25px;
    width: 100%;
    max-width: 1100px;
    padding: 30px 0;
}

/* Vylepšené karty alb (podle vzoru image_d0759a.jpg) */
.album-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    text-decoration: none;
    color: #333;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.album-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 25px rgba(0,0,0,0.15);
}

.album-image {
    height: 180px;
    background: #f0f2f5;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #bdc3c7;
    font-size: 3em;
}

.album-info {
    padding: 15px;
    background: white;
    border-top: 1px solid #eee;
}

.album-info h3 {
    margin: 0;
    font-size: 1.2em;
    font-weight: 600;
}

.photo-count {
    font-size: 0.85em;
    color: #3498db;
    margin-top: 5px;
    display: block;
}

/* Oddělovač */
.separator {
    width: 100%;
    max-width: 1100px;
    border: 0;
    height: 1px;
    background: #eee;
    margin: 10px 0;
}

.media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
    width: 100%;
    max-width: 1200px;
}

.media-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.media-display img, .media-display video {
    width: 100%;
    height: 250px;
    object-fit: cover; /* Sjednotí velikost náhledů */
    border-radius: 12px 12px 0 0;
}

.comment-form {
    display: flex;
    gap: 5px;
    margin-top: 10px;
}

.comment-form input {
    flex-grow: 1;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding: 5px 15px;
}

.highlight-target {
    outline: 4px solid #3498db;
    animation: pulse 2s;
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.02); }
    100% { transform: scale(1); }
}

/* Luminous Lightbox musí být nad fixním Navbarem */
.lum-lightbox {
    z-index: 2000 !important;
}

/* Pokud používáš tmavý překryv (overlay), taky ho posuneme nahoru */
.lum-backdrop {
    z-index: 1999 !important;
}

/* Styl pro formulářové kontejnery */
.form-container {
max-width: 1000px; /* Zvětšeno z 600px na 1000px */
    width: 95%;        /* Pojistka pro menší obrazovky */
    margin: 40px auto;
    background: white;
    padding: 40px;     /* Přidal jsem trochu víc vnitřního prostoru */
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

/* Styl pro popisky (label) */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 0.95em;
}

/* Styl pro vstupy (input, select, textarea) */
.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #f0f2f5;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.form-control:focus {
    outline: none;
    border-color: #3498db;
    background: white;
    box-shadow: 0 0 0 4px rgba(52, 152, 219, 0.1);
}

/* Styl pro tlačítko nahrávání souborů */
input[type="file"]::file-selector-button {
    background: #2c3e50;
    color: white;
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    margin-right: 15px;
    transition: 0.3s;
}

input[type="file"]::file-selector-button:hover {
    background: #34495e;
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 10px;
    margin-top: 15px;
    background: #fdfdfd;
    padding: 10px;
    border-radius: 8px;
    border: 1px dashed #ccc;
}

.preview-item {
    position: relative;
    width: 100%;
    padding-top: 100%; /* Čtvercový poměr */
    overflow: hidden;
    border-radius: 5px;
    cursor: zoom-in;
}

.preview-item img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.2s;
}

.preview-item:hover img {
    transform: scale(1.1);
}

/* Speciální kontejner pro login, aby byl na střed */
.login-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
}

.login-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-card h2 {
    color: #2c3e50;
    margin-bottom: 25px;
}

.login-card .form-control {
    margin-bottom: 15px;
    text-align: left;
}

.kronika-form-card {
    background: #fff;
    border-top: 5px solid #3498db; /* Horní linka pro akcent */
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.form-control-lg {
    font-size: 1.2rem;
    font-weight: bold;
    border-bottom: 2px solid #eee !important;
    border-radius: 0;
    background: transparent !important;
}

.form-control-lg:focus {
    border-bottom-color: #3498db !important;
    box-shadow: none !important;
}

/* Toto udrží celou kartu pohromadě */
.login-card {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    width: 100%;
    max-width: 400px; /* Karta nebude širší než 400px */
    margin: auto;
}

/* Toto zajistí, že tlačítko zůstane uvnitř karty */
.login-card .btn-primary {
    width: 100%; /* Tlačítko vyplní šířku karty, ne celého webu */
    display: block;
    margin-top: 20px;
}

/* Kontejner pro heslo a očíčko */
.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.password-wrapper input {
    padding-right: 40px; /* Prostor pro očíčko, aby text nešel pod něj */
}

.password-wrapper .toggle-password {
    position: absolute;
    right: 12px;
    cursor: pointer;
    color: #666;
    line-height: 1; /* Vycentruje ikonku vertikálně */
    display: flex;
    align-items: center;
    height: 100%;
}