/* ==========================================================
   Foto's / Gallerij pagina – Kennel de Kempenstreek
   ========================================================== */

/* ── Page hero ──────────────────────────────────────────── */
.page-hero {
    position: relative;
    min-height: 52vh;
    display: flex;
    align-items: center;
    padding-top: var(--nav-h);
    overflow: hidden;
}
.page-hero-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background-image: url('../images/mainheader.png');
    background-size: cover;
    background-position: center top;
}
.page-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        110deg,
        rgba(8,4,1,.82) 0%,
        rgba(8,4,1,.52) 55%,
        rgba(8,4,1,.1) 100%
    );
}
.page-hero .paw-field { z-index: 2; }
.page-hero .container { position: relative; z-index: 3; }
.page-hero-content {
    padding: 48px 0 64px;
    max-width: 560px;
}
.page-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(255,255,255,.1);
    border: 1px solid rgba(255,255,255,.22);
    backdrop-filter: blur(8px);
    color: rgba(255,255,255,.85);
    padding: 7px 16px;
    border-radius: 50px;
    font-size: .82rem;
    font-weight: 500;
    letter-spacing: .03em;
    margin-bottom: 18px;
}
.page-hero-title {
    font-family: var(--fh);
    font-size: clamp(2.4rem, 5.5vw, 3.8rem);
    font-weight: 800;
    color: var(--white);
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -.02em;
}
.page-hero-sub {
    font-size: 1.05rem;
    color: rgba(255,255,255,.82);
    line-height: 1.7;
    max-width: 480px;
}


/* ── Gallery section ────────────────────────────────────── */
.gallery-section { background: var(--cream); min-height: 50vh; }


/* ── Loading spinner ────────────────────────────────────── */
.gallery-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 80px 0;
    color: var(--muted);
    font-size: .9rem;
}
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(232,160,32,.2);
    border-top-color: var(--amber);
    border-radius: 50%;
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.hidden { display: none !important; }


/* ── Album grid ─────────────────────────────────────────── */
.album-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.album-card {
    background: var(--white);
    border-radius: var(--r);
    overflow: hidden;
    box-shadow: var(--sh1);
    border: 1px solid rgba(0,0,0,.06);
    cursor: pointer;
    transition: box-shadow var(--ease), transform var(--ease);
    animation: fadeUp .5s ease both;
}
.album-card:hover {
    box-shadow: var(--sh2);
    transform: translateY(-5px);
}
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}

.album-thumb {
    position: relative;
    height: 220px;
    background: linear-gradient(135deg, #f5e6c8 0%, #e8c88a 100%);
    overflow: hidden;
}
.album-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 20%;
    transition: transform .5s ease;
}
.album-card:hover .album-thumb img { transform: scale(1.06); }

.album-thumb-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}
.album-thumb-placeholder svg {
    width: 64px;
    height: 57px;
    color: rgba(196,122,21,.3);
}

.album-thumb-count {
    position: absolute;
    bottom: 10px;
    right: 12px;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(6px);
    color: var(--white);
    font-size: .74rem;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.album-thumb-count svg { width: 12px; height: 12px; }

.album-meta {
    padding: 20px 22px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.album-year {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .07em;
    color: var(--amber-dark);
}
.album-name {
    font-family: var(--fh);
    font-size: 1.1rem;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}
.album-desc {
    font-size: .84rem;
    color: var(--muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.album-open-hint {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: .78rem;
    font-weight: 600;
    color: var(--amber-dark);
    margin-top: 6px;
    transition: gap var(--ease);
}
.album-open-hint svg { width: 14px; height: 14px; transition: transform var(--ease); }
.album-card:hover .album-open-hint { gap: 8px; }
.album-card:hover .album-open-hint svg { transform: translateX(3px); }


/* ── Photo view (album geopend) ─────────────────────────── */
.photo-view {
    animation: fadeUp .35s ease;
}
.photo-view-header {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 40px;
    flex-wrap: wrap;
}
.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    background: var(--white);
    border: 1px solid rgba(0,0,0,.1);
    border-radius: 50px;
    padding: 9px 20px;
    font-family: var(--fb);
    font-size: .85rem;
    font-weight: 600;
    color: var(--text);
    cursor: pointer;
    flex-shrink: 0;
    transition: background var(--ease), box-shadow var(--ease);
    margin-top: 4px;
}
.back-btn:hover { background: var(--cream); box-shadow: var(--sh1); }

.photo-view-meta { flex: 1; }
.photo-view-title {
    font-family: var(--fh);
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--text);
    margin-bottom: 6px;
}
.photo-view-desc {
    font-size: .9rem;
    color: var(--muted);
    margin: 0;
}
.photo-view-year {
    display: inline-block;
    background: rgba(232,160,32,.12);
    color: var(--amber-dark);
    font-size: .78rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 50px;
    flex-shrink: 0;
    margin-top: 6px;
    letter-spacing: .04em;
}


/* ── Photo masonry grid ─────────────────────────────────── */
.photo-grid {
    columns: 3;
    column-gap: 12px;
}
.photo-item {
    break-inside: avoid;
    margin-bottom: 12px;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    box-shadow: var(--sh1);
    animation: fadeUp .4s ease both;
    background: #f0e6d0;
    min-height: 120px;
}
.photo-item img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform .4s ease, opacity .35s ease;
    opacity: 0;
}
.photo-item--loading img { opacity: 0; }
.photo-item:not(.photo-item--loading) img { opacity: 1; }
.photo-item:hover img { transform: scale(1.04); }

/* Shimmer skeleton */
.photo-shimmer {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        #f0e6d0 0%,
        #f8f0e0 40%,
        #ffe8b0 50%,
        #f8f0e0 60%,
        #f0e6d0 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.6s ease-in-out infinite;
    border-radius: inherit;
    z-index: 1;
    transition: opacity .3s ease;
}
.photo-item:not(.photo-item--loading) .photo-shimmer {
    opacity: 0;
    pointer-events: none;
}
@keyframes shimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

.photo-item-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background .3s ease;
    z-index: 2;
}
.photo-item-overlay svg {
    width: 28px;
    height: 28px;
    color: var(--white);
    opacity: 0;
    transform: scale(.8);
    transition: opacity .3s ease, transform .3s ease;
}
.photo-item:not(.photo-item--loading):hover .photo-item-overlay { background: rgba(0,0,0,.28); }
.photo-item:not(.photo-item--loading):hover .photo-item-overlay svg { opacity: 1; transform: scale(1); }


/* ── Empty album ────────────────────────────────────────── */
.empty-album {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 80px 0;
    color: var(--muted);
    font-size: .95rem;
}
.empty-album svg {
    width: 64px;
    height: 57px;
    color: rgba(0,0,0,.12);
}


/* ── Lightbox ───────────────────────────────────────────── */
.lightbox {
    position: fixed;
    inset: 0;
    z-index: 9000;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.92);
    cursor: pointer;
    backdrop-filter: blur(4px);
}
.lightbox-inner {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 16px;
    max-width: 94vw;
    max-height: 94vh;
    padding: 0 16px;
}
.lightbox-img-wrap {
    max-width: 86vw;
    max-height: 88vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-img-wrap img {
    max-width: 100%;
    max-height: 88vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 24px 80px rgba(0,0,0,.6);
    display: block;
    animation: lbIn .25s ease;
}
@keyframes lbIn {
    from { opacity: 0; transform: scale(.95); }
    to   { opacity: 1; transform: scale(1); }
}

.lightbox-close {
    position: fixed;
    top: 20px;
    right: 20px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.2);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--ease);
    z-index: 2;
}
.lightbox-close:hover { background: rgba(255,255,255,.22); }

.lightbox-nav {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255,255,255,.12);
    border: 1px solid rgba(255,255,255,.18);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background var(--ease), transform var(--ease);
    flex-shrink: 0;
}
.lightbox-nav:hover { background: rgba(255,255,255,.22); transform: scale(1.08); }
.lightbox-nav:disabled { opacity: .25; cursor: default; transform: none; }

.lightbox-counter {
    position: fixed;
    bottom: 22px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(6px);
    color: rgba(255,255,255,.8);
    font-size: .8rem;
    font-weight: 600;
    padding: 6px 18px;
    border-radius: 50px;
    z-index: 2;
}


/* ── Responsive ─────────────────────────────────────────── */
@media (max-width: 900px) {
    .photo-grid { columns: 2; }
}
@media (max-width: 680px) {
    .album-grid { grid-template-columns: 1fr; }
    .photo-grid { columns: 2; column-gap: 10px; }
    .photo-item { margin-bottom: 10px; }
    .photo-view-header { flex-direction: column; gap: 14px; }
    .lightbox-inner { padding: 0 4px; gap: 8px; }
    .lightbox-nav { width: 38px; height: 38px; }
}
@media (max-width: 400px) {
    .photo-grid { columns: 1; }
}
