/* =============================================
   GALLERY PAGE STYLES
   ============================================= */

/* --- Gallery Filters --- */
.gallery-filters {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 60px;
    border: 1px solid rgba(198, 168, 90, 0.1);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-filter {
    padding: 0.6rem 1.5rem;
    border: none;
    background: transparent;
    color: var(--color-text-muted, #999);
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    cursor: pointer;
    border-radius: 40px;
    transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.gallery-filter:hover {
    color: var(--color-text, #eaeaea);
}

.gallery-filter.active {
    background: var(--color-gold, #C6A85A);
    color: var(--color-black, #0B0B0B);
    font-weight: 600;
}

/* --- Instagram-Style Square Grid --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    cursor: pointer;
    border-radius: 8px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    /* Override pages.css which sets aspect-ratio:4/3 — we control shape via __inner */
    aspect-ratio: unset !important;
}

.gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.gallery-item__inner {
    position: relative;
    width: 100%;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 8px 8px 0 0;
}

.gallery-item__inner img,
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    /* object-position set inline by JS from focal_x/focal_y */
    object-position: 50% 50%;
    transition: transform 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* --- Hover overlay (icon only) --- */
.gallery-item__overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.35s ease;
    z-index: 2;
}

.gallery-item:hover .gallery-item__overlay {
    opacity: 1;
}

.gallery-item__overlay-icon {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: rgba(198, 168, 90, 0.9);
    color: var(--color-black, #0B0B0B);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* --- Caption below tile --- */
.gallery-item__caption {
    padding: 0.75rem 0.85rem 0.9rem;
    background: rgba(255, 255, 255, 0.03);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    flex: 1;
}

.gallery-item__tag {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    background: var(--color-gold, #C6A85A);
    color: var(--color-black, #0B0B0B);
    font-family: var(--font-accent, 'Space Grotesk', sans-serif);
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    border-radius: 3px;
    margin-bottom: 0.35rem;
}

.gallery-item__title {
    font-family: var(--font-heading, 'Cormorant Garamond', serif);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-text, #eaeaea);
    margin-bottom: 0.3rem;
    line-height: 1.3;
}

.gallery-item__meta {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.75rem;
    color: var(--color-text-muted, #999);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* --- Expand Button --- */
.gallery-item__expand {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.35s ease;
    z-index: 3;
}

.gallery-item:hover .gallery-item__expand {
    opacity: 1;
    transform: scale(1);
}

.gallery-item__expand:hover {
    background: var(--color-gold, #C6A85A);
    color: var(--color-black, #0B0B0B);
}

/* --- Video Play Button --- */
.gallery-item__play {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 72px;
    height: 72px;
    background: rgba(198, 168, 90, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-black, #0B0B0B);
    z-index: 3;
    transition: all 0.35s ease;
    box-shadow: 0 8px 32px rgba(198, 168, 90, 0.3);
}

.gallery-item:hover .gallery-item__play {
    transform: translate(-50%, -50%) scale(1.1);
    box-shadow: 0 12px 48px rgba(198, 168, 90, 0.4);
}

.gallery-item__play svg {
    margin-left: 3px;
}

/* --- Hidden State --- */
.gallery-item.hidden {
    display: none;
}

/* --- Load More --- */
.gallery-load-more {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
}

/* --- Gallery Section --- */
.gallery-section {
    padding: 2rem 0 6rem;
}

/* =============================================
   SOCIAL FEED SECTION
   ============================================= */

.social-feed-section {
    padding: 6rem 0;
}

.social-feed__header {
    text-align: center;
    margin-bottom: 3rem;
}

.social-feed__header .section-subtitle {
    margin-top: 0.5rem;
    color: var(--color-text-muted, #999);
}

.social-feed-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.25rem;
}

.social-post {
    border-radius: 12px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    transition: all 0.4s ease;
}

.social-post:hover {
    transform: translateY(-4px);
    border-color: rgba(198, 168, 90, 0.2);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}

.social-post__link {
    display: block;
    text-decoration: none;
}

.social-post__thumb {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
}

.social-post__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.social-post:hover .social-post__thumb img {
    transform: scale(1.06);
}

.social-post__platform {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.social-post__platform--ig {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
    color: #fff;
}

.social-post__platform--yt {
    background: #FF0000;
    color: #fff;
}

.social-post__platform--fb {
    background: #1877F2;
    color: #fff;
}

.social-post__play-sm {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 44px;
    height: 44px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1rem;
    z-index: 2;
}

.social-post__caption {
    padding: 1rem;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--color-text-muted, #999);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.social-feed__cta {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-top: 3rem;
    flex-wrap: wrap;
}

/* =============================================
   LIGHTBOX
   ============================================= */

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lightbox.active {
    opacity: 1;
    visibility: visible;
}

.lightbox__backdrop {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(20px);
}

.lightbox__container {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 2rem;
    max-width: 90vw;
    max-height: 90vh;
}

.lightbox__content {
    position: relative;
    max-width: 80vw;
    max-height: 85vh;
}

.lightbox__image {
    max-width: 100%;
    max-height: 80vh;
    object-fit: contain;
    border-radius: 8px;
    transform: scale(0.9);
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.lightbox.active .lightbox__image {
    transform: scale(1);
}

.lightbox__video-wrap {
    width: 80vw;
    max-width: 960px;
    aspect-ratio: 16/9;
}

.lightbox__video-wrap iframe {
    width: 100%;
    height: 100%;
    border-radius: 8px;
}

.lightbox__native-video-wrap {
    width: 80vw;
    max-width: 960px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__native-video-wrap video {
    width: 100%;
    max-height: 80vh;
    border-radius: 8px;
    background: #000;
}

.lightbox__info {
    text-align: center;
    padding: 1.25rem 0 0;
}

/* Social video play overlay on lightbox thumbnail */
.lightbox__image-wrap {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox__social-play {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    text-decoration: none;
    cursor: pointer;
    transition: opacity 0.2s;
}

.lightbox__social-play:hover { opacity: 0.85; }

.lightbox__social-play span {
    color: #fff;
    font-size: 0.9rem;
    font-family: var(--font-body, 'Inter', sans-serif);
    background: rgba(0,0,0,0.55);
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    letter-spacing: 0.03em;
}

.lightbox__title {
    font-family: var(--font-heading, 'Cormorant Garamond', serif);
    font-size: 1.5rem;
    color: #fff;
    margin-bottom: 0.25rem;
}

.lightbox__meta {
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
}

.lightbox__watch-link {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1rem;
    padding: 0.55rem 1.4rem;
    background: var(--color-gold, #C6A85A);
    color: #0a0a0a;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.88rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-decoration: none;
    border-radius: 4px;
    transition: opacity 0.2s;
}
.lightbox__watch-link:hover { opacity: 0.85; }

.lightbox__close {
    position: absolute;
    top: -3rem;
    right: 0;
    width: 48px;
    height: 48px;
    border: none;
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
}

.lightbox__close:hover {
    background: var(--color-gold, #C6A85A);
    color: var(--color-black, #0B0B0B);
}

.lightbox__nav {
    width: 48px;
    height: 48px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.lightbox__nav:hover {
    background: var(--color-gold, #C6A85A);
    color: var(--color-black, #0B0B0B);
    border-color: var(--color-gold, #C6A85A);
}

/* =============================================
   RESPONSIVE — GALLERY
   ============================================= */

@media (max-width: 1024px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.4rem;
    }

    .social-feed-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .gallery-filters {
        border-radius: 12px;
    }

    .gallery-filter {
        padding: 0.5rem 1rem;
        font-size: 0.75rem;
    }

    .gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 0.3rem;
    }

    .gallery-item__caption {
        padding: 0.5rem 0.6rem 0.65rem;
    }

    .gallery-item__title {
        font-size: 0.85rem;
    }

    .gallery-item__meta {
        display: none;
    }

    .lightbox__container {
        flex-direction: column;
        gap: 1rem;
    }

    .lightbox__nav {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
    }

    .lightbox__nav--prev { left: 0.5rem; }
    .lightbox__nav--next { right: 0.5rem; }

    .social-feed-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.75rem;
    }

    .social-feed__cta {
        flex-direction: column;
        align-items: center;
    }
}

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

    .gallery-item__play {
        width: 56px;
        height: 56px;
    }

    .gallery-item__play svg {
        width: 36px;
        height: 36px;
    }

    .social-feed-grid {
        grid-template-columns: 1fr;
    }
}
