/* ===========================================================================
   gallery.css
   ---------------------------------------------------------------------------
   Page-specific styles for the Gallery page (gallery.php). Imports
   testimonials.css (which imports mentors.css → courses.css → home.css),
   reusing: breadcrumb hero, stat counters, filter pills, masonry gallery
   grid + lightbox, video card + play modal, submission form styling,
   and the CTA banner — all as-is. This file adds only what's unique to
   Gallery: album cards, event cards, and the Instagram-style grid.
=========================================================================== */
@import url('testimonials.css');

/* ===========================================================================
   FEATURED ALBUMS
=========================================================================== */
.tp-album-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 26px;
}

.tp-album-card {
    position: relative;
    border-radius: var(--tp-radius-lg);
    overflow: hidden;
    aspect-ratio: 4/3.2;
    background: linear-gradient(135deg, var(--tp-primary), #1e293b);
    cursor: pointer;
}
.tp-album-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.tp-album-card:hover img { transform: scale(1.1); }
.tp-album-card-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 30%, rgba(15,23,42,0.92));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 22px;
    color: #fff;
}
.tp-album-count-badge {
    position: absolute;
    top: 14px; right: 14px;
    background: rgba(15,23,42,0.7);
    backdrop-filter: blur(6px);
    color: #fff;
    font-size: 11.5px;
    font-weight: 700;
    padding: 6px 12px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.tp-album-count-badge svg { width: 13px; height: 13px; }
.tp-album-card-overlay h3 { color: #fff; font-size: 17px; margin-bottom: 4px; }
.tp-album-card-overlay .date { font-size: 12px; color: rgba(226,232,240,0.75); margin-bottom: 10px; }
.tp-album-view-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: 700;
    color: #fff;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}
.tp-album-card:hover .tp-album-view-btn { opacity: 1; transform: translateY(0); }
.tp-album-view-btn svg { width: 13px; height: 13px; }

@media (max-width: 900px) { .tp-album-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .tp-album-grid { grid-template-columns: 1fr; } }

/* ===========================================================================
   PHOTO CAPTIONS (extends the shared .tp-gallery-overlay from home.css)
=========================================================================== */
.tp-gallery-overlay .caption-meta {
    display: block;
    font-size: 11px;
    color: rgba(226,232,240,0.7);
    margin-top: 3px;
}

/* ===========================================================================
   RECENT EVENTS
=========================================================================== */
.tp-event-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 26px;
}
.tp-event-card {
    display: flex;
    gap: 20px;
    background: var(--tp-card);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius-lg);
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.tp-event-card:hover { transform: translateY(-6px); box-shadow: var(--tp-shadow-md); }
.tp-event-banner {
    width: 140px;
    flex-shrink: 0;
    background: linear-gradient(135deg, var(--tp-primary), #1e293b);
    overflow: hidden;
}
.tp-event-banner img { width: 100%; height: 100%; object-fit: cover; }
.tp-event-banner-fallback { width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; color: rgba(255,255,255,0.25); }
.tp-event-body { padding: 20px 20px 20px 0; display: flex; flex-direction: column; }
.tp-event-date-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    font-weight: 700;
    color: var(--tp-accent);
    margin-bottom: 8px;
}
.tp-event-date-badge svg { width: 13px; height: 13px; }
.tp-event-body h3 { font-size: 16px; margin-bottom: 6px; }
.tp-event-location { font-size: 12px; color: var(--tp-text-muted); margin-bottom: 8px; display: flex; align-items: center; gap: 5px; }
.tp-event-location svg { width: 13px; height: 13px; }
.tp-event-desc { font-size: 13px; color: var(--tp-text-muted); margin-bottom: 14px; flex: 1; }

@media (max-width: 820px) { .tp-event-grid { grid-template-columns: 1fr; } }
@media (max-width: 480px) { .tp-event-card { flex-direction: column; } .tp-event-banner { width: 100%; height: 140px; } .tp-event-body { padding: 16px; } }

/* ===========================================================================
   INSTAGRAM-STYLE GALLERY
=========================================================================== */
.tp-insta-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 6px;
}
.tp-insta-item {
    position: relative;
    aspect-ratio: 1/1;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, var(--tp-primary), #1e293b);
}
.tp-insta-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.tp-insta-item:hover img { transform: scale(1.12); }
.tp-insta-item-overlay {
    position: absolute; inset: 0;
    background: rgba(16,185,129,0.55);
    display: flex; align-items: center; justify-content: center;
    opacity: 0;
    transition: opacity 0.25s ease;
    color: #fff;
}
.tp-insta-item:hover .tp-insta-item-overlay { opacity: 1; }
.tp-insta-item-overlay svg { width: 22px; height: 22px; }

@media (max-width: 900px) { .tp-insta-grid { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 560px) { .tp-insta-grid { grid-template-columns: repeat(3, 1fr); gap: 4px; } }

/* ===========================================================================
   RICH GALLERY LIGHTBOX (prev/next/fullscreen/caption)
   Separate from the simpler .tp-lightbox in home.css to avoid any
   event-binding collision — this page uses its own #tpGalleryLightbox.
=========================================================================== */
.tp-rich-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(4, 8, 16, 0.94);
    z-index: 2200;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px;
}
.tp-rich-lightbox.is-open { display: flex; }

.tp-rich-lightbox-stage {
    position: relative;
    max-width: 900px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.tp-rich-lightbox-stage img {
    max-width: 100%;
    max-height: 70vh;
    border-radius: 12px;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}
.tp-rich-lightbox-caption { color: #fff; font-size: 15px; font-weight: 600; margin-top: 18px; text-align: center; }
.tp-rich-lightbox-meta { color: rgba(226,232,240,0.65); font-size: 12.5px; margin-top: 4px; text-align: center; }

.tp-rich-lightbox-controls {
    position: absolute;
    top: -50px;
    right: 0;
    display: flex;
    gap: 8px;
}
.tp-rich-lightbox-btn {
    width: 40px; height: 40px; border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
    font-size: 18px;
}
.tp-rich-lightbox-btn:hover { background: var(--tp-accent); border-color: transparent; }
.tp-rich-lightbox-btn svg { width: 16px; height: 16px; }

.tp-rich-lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px; height: 46px; border-radius: 50%;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer;
}
.tp-rich-lightbox-nav:hover { background: var(--tp-accent); border-color: transparent; }
.tp-rich-lightbox-nav svg { width: 18px; height: 18px; }
.tp-rich-lightbox-nav.prev { left: -70px; }
.tp-rich-lightbox-nav.next { right: -70px; transform: translateY(-50%) rotate(180deg); }

@media (max-width: 900px) {
    .tp-rich-lightbox { padding: 20px; }
    .tp-rich-lightbox-nav.prev { left: 8px; }
    .tp-rich-lightbox-nav.next { right: 8px; }
    .tp-rich-lightbox-controls { top: -46px; }
}
