/* ========================================
   GALLERY PAGE STYLES
   Consistent with Past Years & Main Page
   ======================================== */

/* ========================================
   PAGE HERO
   Matches Past Years style
   ======================================== */

.page-hero {
    position: relative;
    padding-top: 140px;
    padding-bottom: 40px;
    text-align: center;
    /* Clean gradient like Main Page update */
    background: radial-gradient(circle at center, rgba(0, 61, 92, 0.4) 0%, transparent 70%);
}

.hero-content-wrapper h1 {
    font-size: 3.5rem;
    font-weight: 900;
    text-transform: uppercase;
    margin-bottom: 10px;
    background: linear-gradient(45deg, #29abe2, #fff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: fadeInUp 0.8s ease;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: #b3e5fc;
    opacity: 0.8;
    animation: fadeInUp 1s ease;
}

/* ========================================
   FILTERS
   ======================================== */

.gallery-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 50px;
    animation: fadeInUp 1.2s ease;
}

.filter-btn {
    background: rgba(10, 14, 39, 0.6);
    border: 1px solid rgba(41, 171, 226, 0.3);
    color: #b3e5fc;
    padding: 10px 25px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    text-transform: uppercase;
    font-family: inherit;
}

.filter-btn:hover {
    border-color: #29abe2;
    color: #fff;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(41, 171, 226, 0.2);
}

.filter-btn.active {
    background: linear-gradient(135deg, #007bbf 0%, #29abe2 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 5px 20px rgba(41, 171, 226, 0.4);
}

/* ========================================
   YEAR CONTAINERS
   ======================================== */

.gallery-year-container {
    display: none; /* Skryté by default */
    animation: fadeInUp 0.5s ease;
}

.gallery-year-container.active {
    display: block; /* Zobrazí se, pokud má třídu active */
}

/* Styl pro selektor roků (kopie z past-years.css, už by měl být v shared nebo gallery) */
.year-selector-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px; /* Menší mezera než filtry */
    flex-wrap: wrap;
    background: rgba(0, 61, 92, 0.3);
    padding: 10px 30px;
    border-radius: 50px;
    backdrop-filter: blur(5px);
    border: 1px solid rgba(41, 171, 226, 0.2);
    width: fit-content;
    margin-left: auto;
    margin-right: auto;
}

.selector-label {
    font-weight: bold;
    color: #b3e5fc;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.year-buttons {
    display: flex;
    gap: 10px;
}

.year-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 6px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-family: inherit;
    font-weight: 600;
    transition: all 0.3s ease;
}

.year-btn:hover:not(.disabled) {
    border-color: #29abe2;
    color: #29abe2;
}

.year-btn.active {
    background: linear-gradient(135deg, #007bbf 0%, #29abe2 100%);
    border-color: transparent;
    box-shadow: 0 4px 15px rgba(41, 171, 226, 0.3);
}

.year-btn.disabled {
    opacity: 0.4;
    cursor: not-allowed;
    border-style: dashed;
}

/* ========================================
   GALLERY GRID
   ======================================== */

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
    padding-bottom: 60px;
}

.gallery-item {
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    cursor: pointer;
    /* Aspect ratio for uniform tiles */
    aspect-ratio: 4 / 3;
    
    /* Glass border styling */
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    background: rgba(10, 14, 39, 0.5);
    
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    animation: fadeInUp 0.5s ease;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

/* Hover Effects */
.gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(41, 171, 226, 0.2);
    border-color: rgba(41, 171, 226, 0.4);
}

.gallery-item:hover img {
    transform: scale(1.1);
}

/* Overlay with Text */
.item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(10, 14, 39, 0.9) 0%, rgba(10, 14, 39, 0.2) 100%);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .item-overlay {
    opacity: 1;
}

.overlay-content h3 {
    color: #29abe2;
    margin: 0 0 5px 0;
    font-size: 1.2rem;
    transform: translateY(20px);
    transition: transform 0.3s ease;
}

.overlay-content p {
    color: #fff;
    margin: 0;
    font-size: 0.9rem;
    transform: translateY(20px);
    transition: transform 0.3s ease 0.1s;
}

.gallery-item:hover .overlay-content h3,
.gallery-item:hover .overlay-content p {
    transform: translateY(0);
}

/* ========================================
   LIGHTBOX (MODAL)
   ======================================== */

.lightbox {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    background-color: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    animation: fadeIn 0.3s ease;
}

.lightbox-content {
    max-width: 90%;
    max-height: 80vh;
    border-radius: 5px;
    box-shadow: 0 0 50px rgba(41, 171, 226, 0.3);
    border: 2px solid rgba(41, 171, 226, 0.3);
    object-fit: contain;
}

#lightbox-caption {
    margin-top: 20px;
    color: #fff;
    font-size: 1.2rem;
    text-align: center;
}

.close-lightbox {
    position: absolute;
    top: 20px;
    right: 35px;
    color: #f1f1f1;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
    z-index: 2001;
}

.close-lightbox:hover {
    color: #29abe2;
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .hero-content-wrapper h1 {
        font-size: 2.5rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(100%, 1fr)); /* 1 column on mobile */
        gap: 20px;
    }

    .filter-btn {
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    /* Always show overlay text on mobile, or just icon? 
       Here keeping hover logic, but adding visible title below could be option.
       For now, standard touch behavior works (tap to hover/active). */
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}