/* ══════════════════════════════════════════════
   public/css/gallery.css
   Gallery Page — matches screenshot layout
   ══════════════════════════════════════════════ */

/* ── Page wrapper ─────────────────────────────── */
.gallery-page {
    min-height: 100vh;
    background: #ffffff;
    /* padding-top handled by Porto layout */
}

/* ── Page banner ──────────────────────────────── */
.page-banner {
    background: #ffffff;
    padding-top:150px;
    border-bottom: none;
}
.page-banner-inner {
    max-width: 1160px;
    margin: 0 auto;
    width: 90%;
    padding: 28px 0 16px;
}

.page-title {
    font-family: 'Oswald', sans-serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: #1a1a1a;
    text-transform: none;
    letter-spacing: 0;
    margin-bottom: 6px;
}

/* ── Breadcrumb ───────────────────────────────── */
.page-banner-inner .breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.72rem;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    background: none;
    padding: 0;
    margin: 0;
    border: none;
    list-style: none;
}

.page-banner-inner .breadcrumb a {
    color: var(--color-accent, #ea580c);
    text-decoration: none;
    transition: opacity 0.2s;
}

.page-banner-inner .breadcrumb a:hover { opacity: 0.75; }

.page-banner-inner .breadcrumb span { color: #6B7280; }

/* ── Tab bar ──────────────────────────────────── */
.gallery-tabs {
    display: flex;
    gap: 0;
    background: #ffffff;
    border-bottom: 1px solid #e5e7ea;
    margin-bottom: 0;
    padding: 0 calc((100% - 1160px) / 2);
}
@media (max-width: 1260px) {
    .gallery-tabs { padding: 0 5%; }
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 26px;
    font-family: 'Oswald', sans-serif;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    border: none;
    background: none;
    color: #6B7280;
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.tab-btn i { font-size: 0.9rem; }
.tab-btn:hover { color: #1a1a1a; }
.tab-btn.active {
    color: var(--color-accent, #ea580c);
    border-bottom-color: var(--color-accent, #ea580c);
}

/* ── Gallery container ────────────────────────── */
.gallery-container {
    padding: 24px 0 60px;
    background: #ffffff;
    max-width: 1160px;
    margin: 0 auto;
    width: 90%;
}

/* ── Tab panels ───────────────────────────────── */
.tab-panel { display: none; }
.tab-panel.active {
    display: block;
    animation: fadeIn 0.25s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(5px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════
   PHOTO GRID — matches screenshot exactly:
   4 columns, ~6px gap, tall cards, full-bleed
   ══════════════════════════════════════════════ */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
}

/* ── Photo card ───────────────────────────────── */
.photo-card {
    position: relative;
    border-radius: 0;          /* flush edges like in screenshot */
    overflow: hidden;
    cursor: pointer;
    aspect-ratio: 4 / 3;
    background: #D1D5DB;
    box-shadow: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
    outline: none;
    display: block;
}

.photo-card:hover,
.photo-card:focus-visible {
    transform: scale(1.015);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.22);
    z-index: 2;
}

.photo-card:focus-visible {
    outline: 2px solid var(--color-accent, #ea580c);
    outline-offset: 2px;
}

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

.photo-card:hover img,
.photo-card:focus-visible img {
    transform: scale(1.07);
}

/* Caption — dark semi-transparent bar at bottom, matching screenshot */
.photo-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    /* solid-ish dark band like in the screenshot */
    background: linear-gradient(transparent 0%, rgba(0,0,0,0.55) 30%, rgba(0,0,0,0.82) 100%);
    color: #ffffff;
    padding: 36px 14px 14px;
    font-size: 0.83rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    line-height: 1.45;
    text-align: center;
}

/* Photo count badge (top-right "+N" indicator) */
.photo-count {
    position: absolute;
    top: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.65);
    color: #ffffff;
    padding: 5px 9px;
    border-radius: 3px;
    font-size: 0.72rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.3px;
}

/* ══════════════════════════════════════════════
   VIDEO GRID
   ══════════════════════════════════════════════ */
.video-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}

/* ── Video card ───────────────────────────────── */
.video-card {
    cursor: pointer;
    outline: none;
}

.video-card:focus-visible .video-thumb {
    outline: 2px solid var(--color-accent, #ea580c);
    outline-offset: 2px;
}

.video-thumb {
    position: relative;
    border-radius: 4px;
    overflow: hidden;
    aspect-ratio: 16 / 9;
    background: #D1D5DB;
    box-shadow: 0 2px 8px rgba(0,0,0,0.10);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.video-card:hover .video-thumb {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0,0,0,0.18);
}

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

.video-card:hover .video-thumb img { transform: scale(1.06); }

/* Play overlay */
.play-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0,0,0,0.22);
    transition: background 0.2s ease;
}

.video-card:hover .play-overlay { background: rgba(0,0,0,0.40); }

.play-btn {
    width: 52px;
    height: 52px;
    background: rgba(255,255,255,0.92);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
    box-shadow: 0 4px 16px rgba(0,0,0,0.28);
}

.video-card:hover .play-btn {
    transform: scale(1.12);
    background: #ffffff;
}

.play-btn svg {
    width: 20px;
    height: 20px;
    fill: var(--color-accent, #ea580c);
    margin-left: 3px;
}

.video-title {
    margin-top: 9px;
    font-size: 0.85rem;
    font-family: 'Inter', sans-serif;
    font-weight: 500;
    color: #1a1a1a;
    text-align: center;
    line-height: 1.45;
    padding: 0 4px;
}

/* ── Empty state ──────────────────────────────── */
.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: #9CA3AF;
}

.empty-state i {
    font-size: 3rem;
    display: block;
    margin-bottom: 12px;
    color: #D1D5DB;
}

.empty-state p {
    font-size: 0.92rem;
    font-family: 'Inter', sans-serif;
}

/* ══════════════════════════════════════════════
   PHOTO LIGHTBOX
   ══════════════════════════════════════════════ */
.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.93);
    z-index: 9000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.lightbox-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.lightbox-inner {
    position: relative;
    max-width: 920px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-img {
    max-width: 100%;
    max-height: 76vh;
    object-fit: contain;
    border-radius: 3px;
    box-shadow: 0 24px 60px rgba(0,0,0,0.55);
    display: block;
}

.lightbox-caption {
    margin-top: 14px;
    color: #E5E7EB;
    font-size: 0.88rem;
    font-family: 'Inter', sans-serif;
    text-align: center;
    max-width: 640px;
    line-height: 1.5;
}

.lightbox-counter {
    margin-top: 5px;
    color: #6B7280;
    font-size: 0.75rem;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.5px;
}

.lightbox-close {
    position: absolute;
    top: -42px;
    right: 0;
    color: #ffffff;
    font-size: 2.2rem;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    opacity: 0.65;
    transition: opacity 0.2s;
    padding: 4px 8px;
}
.lightbox-close:hover { opacity: 1; }

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.12);
    border: 1px solid rgba(255,255,255,0.18);
    color: #ffffff;
    font-size: 2rem;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.26); }
.lightbox-prev { left: -64px; }
.lightbox-next { right: -64px; }

/* ══════════════════════════════════════════════
   VIDEO MODAL
   ══════════════════════════════════════════════ */
.video-modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.93);
    z-index: 9000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.video-modal-overlay.active {
    display: flex;
    animation: fadeIn 0.2s ease;
}

.video-modal-inner {
    position: relative;
    width: 100%;
    max-width: 900px;
}

.video-modal-close {
    position: absolute;
    top: -42px;
    right: 0;
    color: #ffffff;
    font-size: 2.2rem;
    cursor: pointer;
    background: none;
    border: none;
    line-height: 1;
    opacity: 0.65;
    transition: opacity 0.2s;
    padding: 4px 8px;
}
.video-modal-close:hover { opacity: 1; }

.video-modal-frame {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    background: #000;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 24px 60px rgba(0,0,0,0.55);
}

.video-modal-frame iframe {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ══════════════════════════════════════════════
   RESPONSIVE
   ══════════════════════════════════════════════ */
@media (max-width: 1100px) {
    .photo-grid,
    .video-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .photo-grid,
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 4px;
    }

/* Mobile padding fix for page banner and gallery */
@media (max-width: 768px) {
    .page-banner {
        padding: 140px 4% 12px; /* top 40px, right 4%, bottom 12px */
    }

    .gallery-container {
        padding: 80px 3% 48px; /* extra top padding for mobile */
    }
}

    .tab-btn {
        padding: 10px 16px;
        font-size: 0.82rem;
    }

    .lightbox-prev { left: -6px; }
    .lightbox-next { right: -6px; }

    .lightbox-nav {
        width: 36px;
        height: 36px;
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    .photo-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 3px;
    }

    .video-grid {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }

    .photo-caption {
        font-size: 0.72rem;
        padding: 22px 8px 10px;
    }

    .page-title { font-size: 1.4rem; }
}
.video-modal-overlay {
    display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.9); z-index: 1000; justify-content: center; align-items: center;
}
.video-modal-overlay.active { display: flex; }
.video-modal-inner { width: 90%; max-width: 850px; position: relative; }
.video-modal-frame { position: relative; padding-bottom: 56.25%; height: 0; background: #000; }
.video-modal-frame iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.video-modal-close { position: absolute; top: -45px; right: 0; color: #fff; font-size: 35px; background: none; border: none; cursor: pointer; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }