/* =========================================================
   SIMONSMILERS — Gallery Page Styles
   gallery-page.css
   ========================================================= */


/* ------- GALLERY HERO ------- */
.gallery-page-hero {
    position: relative;
    overflow: hidden;
    padding: 120px 0 70px;
    background: var(--gradient-hero);
    text-align: center;
}

.gallery-page-hero .container {
    position: relative;
    z-index: 2;
}

.gallery-page-title {
    font-size: clamp(2.8rem, 6vw, 5rem);
    font-weight: 900;
    color: var(--primary-dark);
    margin: 12px 0 16px;
    line-height: 1.1;
}

.gallery-page-subtitle {
    max-width: 560px;
    margin: 0 auto;
    color: var(--text-body);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Decorative blobs */
.gallery-hero-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    opacity: 0.25;
    pointer-events: none;
}

.gallery-hero-blob.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary-light);
    top: -120px;
    left: -100px;
}

.gallery-hero-blob.blob-2 {
    width: 350px;
    height: 350px;
    background: var(--secondary);
    bottom: -80px;
    right: -80px;
}


/* ------- FILTER TABS ------- */
.gallery-filter-tabs {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.gallery-tab {
    padding: 10px 28px;
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    font-weight: 600;
    font-family: 'Poppins', sans-serif;
    border: 2px solid transparent;
    background: var(--bg-soft);
    color: var(--text-body);
    cursor: pointer;
    transition: var(--transition);
}

.gallery-tab:hover {
    background: rgba(27, 79, 168, 0.08);
    color: var(--primary);
}

.gallery-tab.active {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 4px 20px rgba(27, 79, 168, 0.3);
}


/* ------- GALLERY SECTION ------- */
.gallery-page-section {
    padding: 60px 0 100px;
    background: var(--bg-light);
}


/* ------- GALLERY GRID ------- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    grid-auto-rows: 280px;
    gap: 24px;
}

@media (min-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (min-width: 768px) and (max-width: 1023px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 767px) {
    .gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 14px;
    }
}

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

/* data-reveal animation */
.gallery-grid-item {
    animation: fadeUp 0.5s ease both;
}

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


/* ------- IMAGE CARD ------- */
.gallery-image-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    background: #e0e8f5;
    height: 100%;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.gallery-image-card:hover,
.gallery-image-card:focus {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-hover);
    outline: none;
}

.gallery-image-card:focus-visible {
    outline: 3px solid var(--primary);
    outline-offset: 2px;
}

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

.gallery-image-card:hover .gallery-image {
    transform: scale(1.07);
}

/* Hover overlay */
.gallery-image-overlay {
    position: absolute;
    inset: 0;
    background: rgba(27, 79, 168, 0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.gallery-image-card:hover .gallery-image-overlay,
.gallery-image-card:focus .gallery-image-overlay {
    opacity: 1;
}

.gallery-zoom-icon {
    font-size: 2rem;
    filter: drop-shadow(0 2px 8px rgba(0,0,0,0.4));
    animation: zoomPop 0.3s ease;
}

@keyframes zoomPop {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}


/* ------- VIDEO CARD ------- */
.gallery-video-card {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    height: 100%;
    background: #111;
    box-shadow: var(--shadow-card);
    transition: var(--transition);
}

.gallery-video-card:hover,
.gallery-video-card:focus {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-hover);
    outline: none;
}

.gallery-video-card:focus-visible {
    outline: 3px solid var(--secondary);
    outline-offset: 2px;
}

.gallery-video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 0.85;
    transition: opacity 0.35s ease, transform 0.5s ease;
}

.gallery-video-card:hover .gallery-video-thumb {
    opacity: 0.6;
    transform: scale(1.05);
}

/* Play button */
.gallery-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
}

.play-icon {
    width: 64px;
    height: 64px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    padding-left: 5px;
    box-shadow: 0 4px 24px rgba(0,0,0,0.35);
    transition: transform 0.3s ease, background 0.3s ease;
}

.gallery-video-card:hover .play-icon {
    transform: scale(1.15);
    background: #fff;
}

/* YouTube badge */
.gallery-video-card::after {
    content: 'YouTube';
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ff0000;
    color: #fff;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}


/* ------- ITEM CAPTION ------- */
.gallery-item-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(15,45,107,0.85) 0%, transparent 100%);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 500;
    padding: 20px 12px 10px;
    opacity: 0;
    transform: translateY(6px);
    transition: opacity 0.35s ease, transform 0.35s ease;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.gallery-image-card:hover .gallery-item-caption,
.gallery-video-card:hover .gallery-item-caption,
.gallery-image-card:focus .gallery-item-caption,
.gallery-video-card:focus .gallery-item-caption {
    opacity: 1;
    transform: translateY(0);
}


/* ------- EMPTY STATE ------- */
.gallery-empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    padding: 80px 20px;
    text-align: center;
}

.gallery-empty-icon {
    font-size: 3rem;
}

.gallery-empty-state p {
    font-size: 1.05rem;
    color: var(--text-muted);
}


/* =========================================================
   LIGHTBOX (Image Modal)
   ========================================================= */
.ss-lightbox {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lbFadeIn 0.25s ease;
}

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

.ss-lightbox-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 20, 50, 0.93);
    cursor: pointer;
}

.ss-lightbox-content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
    max-width: 90vw;
    max-height: 90vh;
}

.ss-lightbox-img {
    max-width: 88vw;
    max-height: 78vh;
    border-radius: var(--radius-lg);
    box-shadow: 0 32px 100px rgba(0,0,0,0.6);
    display: block;
    object-fit: contain;
    animation: lbImgIn 0.3s ease;
}

@keyframes lbImgIn {
    from { transform: scale(0.9); opacity: 0; }
    to   { transform: scale(1);   opacity: 1; }
}

.ss-lightbox-caption {
    color: rgba(255,255,255,0.8);
    font-size: 0.9rem;
    text-align: center;
    max-width: 480px;
}

.ss-lightbox-close {
    position: absolute;
    top: -44px;
    right: 0;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    line-height: 1;
}

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

.ss-lightbox-prev,
.ss-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 44px;
    height: 44px;
    font-size: 1.8rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
    z-index: 10;
    line-height: 1;
}

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

.ss-lightbox-prev:hover { background: rgba(255,255,255,0.3); transform: translateY(-50%) scale(1.1); }
.ss-lightbox-next:hover { background: rgba(255,255,255,0.3); transform: translateY(-50%) scale(1.1); }

@media (max-width: 640px) {
    .ss-lightbox-prev { left: -48px; }
    .ss-lightbox-next { right: -48px; }
}


/* =========================================================
   VIDEO MODAL (YouTube)
   ========================================================= */
.ss-video-modal {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: lbFadeIn 0.25s ease;
}

.ss-video-overlay {
    position: absolute;
    inset: 0;
    background: rgba(8, 20, 50, 0.95);
    cursor: pointer;
}

.ss-video-content {
    position: relative;
    z-index: 2;
    width: min(860px, 92vw);
}

.ss-video-close {
    position: absolute;
    top: -44px;
    right: 0;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border: none;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.2s;
    line-height: 1;
}

.ss-video-close:hover { background: rgba(255,255,255,0.3); }

.ss-video-wrapper {
    position: relative;
    padding-top: 56.25%; /* 16:9 */
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 32px 100px rgba(0,0,0,0.6);
    animation: lbImgIn 0.3s ease;
}

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