/* ============================================================
   GALÉRIA — zdieľané štýly pre všetky stránky galérie
   RKC Farnosť Dunajská Lužná
   Používa sa na: galeria.html, galeria_dunajska_luzna.html,
                  galeria_rovinka.html, galeria_kalinkovo.html
   ============================================================ */

/* ── Základ stránky ── */
.gallery-body {
    font-family: 'Roboto', sans-serif;
    color: #2c3e50;
    line-height: 1.6;
    background-color: #fff;
    padding-top: 60px;
    margin: 0;
}

.gallery-body h1,
.gallery-body h2,
.gallery-body h3 {
    font-family: 'Roboto Slab', serif;
}

/* ── Hlavička (zhodná so zvyškom webu) ── */
.site-header {
    background: linear-gradient(to bottom, #ffffff, #f8f9fa);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.35s ease;
    backdrop-filter: blur(10px);
}

.logo-and-title {
    display: flex;
    align-items: center;
    padding: 6px 0;
}

.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: 2rem;
}

.logo-img {
    height: 45px;
    width: auto;
    margin-right: 12px;
    transition: transform 0.35s ease;
}

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

.site-info {
    line-height: 1.2;
}

.church-name {
    font-size: 0.65rem;
    font-weight: 600;
    color: #5d4e7a;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.parish-name {
    font-weight: 700;
    color: #6c1c33;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.main-nav {
    background: linear-gradient(135deg, #f5f2e9 0%, #e9e3d2 100%);
    padding: 0;
    border-bottom: 3px solid #9d4b5a;
    box-shadow: 0 2px 8px rgba(157, 75, 90, 0.15);
    position: relative;
    overflow: visible;
}

.navbar {
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: nowrap;
}

.nav-list {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 0;
    flex-wrap: nowrap;
}

.nav-item {
    margin: 0;
    position: relative;
}

.nav-link {
    color: #5d4e7a !important;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 10px 12px;
    display: block;
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    position: relative;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

.nav-link:hover {
    color: #6c1c33 !important;
}

.nav-item.active .nav-link {
    color: #6c1c33 !important;
    font-weight: 700;
}

.header-social .social-icon-header {
    color: #5d4e7a;
    font-size: 0.9rem;
    padding: 6px 10px;
    transition: color 0.3s ease;
}

.header-social .social-icon-header:hover {
    color: #6c1c33;
}

/* ── Page header (banner) ── */
.gallery-page-header {
    background: linear-gradient(160deg, rgba(8, 6, 5, 0.42), rgba(24, 20, 16, 0.55)),
                url('/static/uploads/gallery/dl-kostol-01.jpg') center/cover no-repeat;
    color: #fff;
    padding: 70px 0 50px;
    text-align: center;
    margin-bottom: 3rem;
}

.gallery-page-title {
    color: #fff;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    text-shadow: 1px 2px 8px rgba(0, 0, 0, 0.3);
}

.gallery-page-subtitle {
    color: #ffd54f;
    font-size: 1.15rem;
    font-style: italic;
    margin-bottom: 0;
}

/* ── Mriežka a karty (štýl ako Aktivity vo farnosti) ── */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.75rem;
    align-items: stretch;
    max-width: 1000px;
    margin: 0 auto;
}

.gallery-section-heading {
    font-size: 1.35rem;
    font-weight: 700;
    color: #6c1c33;
    text-align: center;
    margin: 3rem 0 1.5rem;
}

.gallery-other-section {
    margin-top: 1rem;
}

.gallery-card-block {
    position: relative;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(93, 84, 111, 0.12);
    border: 1px solid #efe9da;
    display: flex;
    flex-direction: column;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.35s ease;
}

.gallery-card-block:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 42px rgba(108, 28, 51, 0.18);
}

a.gallery-card-block {
    text-decoration: none;
    color: inherit;
}

.gallery-card-block__media {
    position: relative;
    aspect-ratio: 2 / 1;
    overflow: hidden;
    background: linear-gradient(135deg, #f5f2e9, #e9e3d2);
}

.gallery-card-block__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.gallery-card-block:hover .gallery-card-block__media img {
    transform: scale(1.07);
}

.gallery-card-block__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(78, 19, 37, 0.92) 0%, rgba(108, 28, 51, 0.4) 48%, rgba(108, 28, 51, 0) 100%);
}

.gallery-card-block__media-icon {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(157, 75, 90, 0.45);
    font-size: 2.5rem;
    z-index: 0;
}

.gallery-card-block__title {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 2;
    margin: 0;
    padding: 1rem 1.25rem;
    color: #fff;
    font-size: 1.08rem;
    font-weight: 700;
    line-height: 1.25;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.gallery-card-block__count {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    background: rgba(0, 0, 0, 0.52);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 600;
    padding: 5px 12px;
    border-radius: 999px;
    backdrop-filter: blur(4px);
}

.gallery-card-block__body {
    padding: 1.1rem 1.25rem 1.4rem;
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
    flex: 1;
}

.gallery-card-block__desc {
    font-size: 0.9rem;
    line-height: 1.55;
    color: #5f5a6b;
    margin: 0;
    flex: 1;
}

.gallery-card-block__meta {
    font-size: 0.82rem;
    font-weight: 600;
    color: #9d4b5a;
    margin: 0;
}

.gallery-card-block__btn {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #6c1c33;
    color: #fff;
    font-size: 0.82rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 8px 18px;
    border: none;
    border-radius: 999px;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(108, 28, 51, 0.25);
    transition: background 0.25s ease, transform 0.2s ease;
}

.gallery-card-block__btn:hover {
    background: #8a2342;
    color: #fff;
    transform: translateY(-2px);
}

.gallery-card-block.is-open {
    transform: none;
    box-shadow: 0 16px 42px rgba(108, 28, 51, 0.16);
}

.gallery-card-block__panel {
    margin-top: 0.25rem;
    padding-top: 0.85rem;
    border-top: 1px solid #efe9da;
}

.gallery-card-block__panel[hidden] {
    display: none !important;
}

.gallery-card-block.is-open .gallery-card-block__btn i {
    transform: rotate(180deg);
}

.gallery-card-block__btn i {
    transition: transform 0.25s ease;
}

/* ── Karty lokalít (legacy – ponechané kvôli kompatibilite) ── */
.gallery-card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 100%;
    text-decoration: none;
    display: block;
    background: #fff;
}

.gallery-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 12px 32px rgba(108, 28, 51, 0.2);
}

.gallery-card-img {
    height: 220px;
    width: 100%;
    object-fit: cover;
    display: block;
}

.gallery-card-placeholder {
    height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f2e9, #e9e3d2);
    color: #9d4b5a;
    font-size: 3rem;
}

/* Dynamická obálka z albumov (nahrádza hardcoded img) */
.gallery-location-cover {
    height: 220px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f5f2e9, #e9e3d2);
    background-size: cover;
    background-position: center;
    color: #9d4b5a;
    font-size: 3rem;
    transition: transform 0.3s ease;
}

.gallery-card:hover .gallery-location-cover {
    transform: scale(1.03);
}

.gallery-card-body {
    padding: 1.5rem;
    text-align: center;
}

.gallery-card-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #6c1c33;
    margin-bottom: 0.35rem;
}

.gallery-card-text {
    color: #5d4e7a;
    font-size: 0.95rem;
    margin-bottom: 0.5rem;
}

.gallery-card-count {
    display: inline-block;
    background: #f5f2e9;
    color: #9d4b5a;
    border-radius: 20px;
    padding: 3px 14px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ── Sekcia albumu na podstránke lokality ── */
.gallery-back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #5d4e7a;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
    transition: color 0.3s ease;
}

.gallery-back-link:hover {
    color: #6c1c33;
}

.gallery-album {
    margin-bottom: 3.5rem;
}

.gallery-album-header {
    border-left: 4px solid #9d4b5a;
    padding-left: 16px;
    margin-bottom: 1.5rem;
}

.gallery-album-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #6c1c33;
    margin-bottom: 0.25rem;
}

.gallery-album-description {
    color: #5d4e7a;
    font-size: 0.95rem;
    margin-bottom: 0;
}

.gallery-album-meta {
    color: #9d4b5a;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ── Zbaliteľné albumy (podstránky galérie) ── */
.gallery-album-collapsible {
    margin-bottom: 2rem;
    border-radius: 14px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
}

.gallery-album-cover-btn {
    display: block;
    width: 100%;
    padding: 0;
    border: none;
    background: #fff;
    text-align: left;
    cursor: pointer;
    transition: box-shadow 0.25s ease;
}

.gallery-album-cover-btn:hover,
.gallery-album-collapsible.is-open .gallery-album-cover-btn {
    box-shadow: inset 0 0 0 2px rgba(157, 75, 90, 0.35);
}

.gallery-album-cover {
    position: relative;
    height: 240px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    font-size: 3rem;
}

.gallery-album-cover-count {
    position: absolute;
    right: 16px;
    bottom: 16px;
    background: rgba(0, 0, 0, 0.55);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 14px;
    border-radius: 20px;
    backdrop-filter: blur(4px);
}

.gallery-album-cover-info {
    padding: 1.25rem 1.5rem 1.35rem;
    border-left: 4px solid #9d4b5a;
}

.gallery-album-collapsible .gallery-album-title {
    margin-bottom: 0.35rem;
    font-size: 1.35rem;
}

.gallery-album-open-hint {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 0.75rem;
    color: #9d4b5a;
    font-size: 0.85rem;
    font-weight: 600;
}

.gallery-album-collapsible.is-open .gallery-album-open-hint i {
    transform: rotate(180deg);
}

.gallery-album-open-hint i {
    transition: transform 0.25s ease;
}

.gallery-album-panel {
    padding: 0 1.25rem 1.5rem;
    border-top: 1px solid #f0ece6;
}

.gallery-album-panel[hidden] {
    display: none !important;
}

.gallery-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.gallery-photo-grid--compact {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.gallery-photo-grid--compact .gallery-photo {
    aspect-ratio: 1;
    border-radius: 8px;
}

.gallery-photo {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    background: #f5f2e9;
    box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    border: none;
    padding: 0;
    display: block;
    width: 100%;
}

.gallery-photo:hover {
    transform: scale(1.025);
    box-shadow: 0 8px 24px rgba(108, 28, 51, 0.25);
}

.gallery-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-photo:hover img {
    transform: scale(1.06);
}

.gallery-photo-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(44, 24, 36, 0.85), transparent);
    color: #fff;
    font-size: 0.8rem;
    padding: 18px 12px 8px;
    text-align: left;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.gallery-photo:hover .gallery-photo-caption {
    opacity: 1;
}

/* ── Prázdny stav ── */
.gallery-empty {
    grid-column: 1 / -1;
    text-align: center;
    padding: 60px 20px;
    color: #9d4b5a;
}

.gallery-empty i {
    font-size: 3.5rem;
    opacity: 0.4;
    margin-bottom: 1rem;
    display: block;
}

.gallery-empty p {
    color: #5d4e7a;
    font-size: 1.05rem;
    margin: 0;
}

/* ── Lightbox ── */
.gallery-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(20, 12, 18, 0.94);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
}

.gallery-lightbox.open {
    display: flex;
}

.gallery-lightbox-img {
    max-width: 90vw;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 6px;
    box-shadow: 0 10px 50px rgba(0, 0, 0, 0.6);
}

.gallery-lightbox-caption {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    font-size: 0.95rem;
    text-align: center;
    max-width: 80vw;
    background: rgba(0, 0, 0, 0.45);
    border-radius: 20px;
    padding: 6px 20px;
}

.gallery-lightbox-caption:empty {
    display: none;
}

.gallery-lightbox-close,
.gallery-lightbox-prev,
.gallery-lightbox-next {
    position: absolute;
    background: rgba(255, 255, 255, 0.12);
    border: none;
    color: #fff;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s ease;
    z-index: 2001;
}

.gallery-lightbox-close:hover,
.gallery-lightbox-prev:hover,
.gallery-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.gallery-lightbox-close {
    top: 20px;
    right: 20px;
}

.gallery-lightbox-prev {
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-lightbox-next {
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.gallery-lightbox-counter {
    position: absolute;
    top: 28px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.85);
    font-size: 0.85rem;
    letter-spacing: 1px;
}

/* ── Pätička ── */
.gallery-footer {
    background: linear-gradient(135deg, #5d4e7a 0%, #6c1c33 100%);
    color: #fff;
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
}

.gallery-footer .footer-text {
    margin: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

.gallery-footer .footer-text a {
    color: #ffd54f;
    text-decoration: none;
}

.gallery-footer .footer-text a:hover {
    text-decoration: underline;
}

/* ── Responzivita ── */
@media (max-width: 991px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .gallery-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .gallery-page-title {
        font-size: 2rem;
    }

    .nav-list {
        flex-wrap: wrap;
    }

    .gallery-photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 10px;
    }

    .gallery-lightbox-prev {
        left: 8px;
    }

    .gallery-lightbox-next {
        right: 8px;
    }
}
