/* Gravity_Gym — Gallery Page Stylesheet
 * Integrates with style.css :root variables
 */

/* 1. Page Hero */
.gallery-hero {
    position: relative;
    min-height: 85vh;
    margin-top: -7.5rem;
    /* pull hero up behind the announcement bar + floating header (no dark strip) */
    padding: calc(10rem + 7.5rem) 0 6rem;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    isolation: isolate;
}

.gallery-hero-inner {
    max-width: 980px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    transform: translateY(-8vh);
}

@media (max-width: 768px) {
    .gallery-hero {
        min-height: 85vh;
        padding: calc(6.5rem + 7.5rem) 1rem 4rem;
    }

    .gallery-hero-inner {
        transform: translateY(-4vh);
    }
}

.gallery-hero .hero-title {
    margin-top: 1.8rem;
    font-size: clamp(2.8rem, 6vw, 5rem);
    line-height: 1.05;
}

.gallery-hero .hero-sub {
    margin: 1.5rem auto 0;
    max-width: 680px;
    font-size: 1.15rem;
    color: var(--muted);
    line-height: 1.6;
}

.gallery-hero-meta {
    margin-top: 2.2rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem 1.8rem;
    color: var(--muted);
    font-size: 0.85rem;
}

.gallery-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.45rem 1rem;
    border-radius: 999px;
    background: color-mix(in srgb, var(--purple-dark) 18%, transparent);
    border: 1px solid var(--border);
}

.gallery-hero-meta i {
    color: var(--purple-accent);
    width: 1rem;
    height: 1rem;
}


/* 2. Category Filter Bar */
.filter-bar-container {
    margin-top: 2.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.6rem;
}

@media (max-width: 640px) {
    .filter-bar-container {
        gap: 0.4rem;
        margin-top: 1.5rem;
    }

    .gal-cat-btn {
        padding: 0.45rem 0.85rem;
        font-size: 0.8rem;
    }
}

.gal-cat-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.25rem;
    border-radius: 999px;
    font-size: 0.88rem;
    font-weight: 500;
    color: var(--muted);
    background: color-mix(in srgb, var(--purple-dark) 15%, transparent);
    border: 1px solid var(--border);
    cursor: pointer;
    transition: all 0.25s ease;
}

.gal-cat-btn:hover {
    color: var(--fg);
    border-color: var(--purple-vivid);
    background: color-mix(in srgb, var(--purple-vivid) 22%, transparent);
}

.gal-cat-btn.active {
    color: var(--fg);
    background: linear-gradient(135deg, color-mix(in srgb, var(--purple-vivid) 35%, transparent), color-mix(in srgb, var(--purple-dark) 55%, transparent));
    border-color: var(--purple-accent);
    box-shadow: 0 0 20px color-mix(in srgb, var(--purple-accent) 30%, transparent);
}

.gal-cat-btn .count-badge {
    font-size: 0.72rem;
    padding: 0.1rem 0.45rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.12);
    color: var(--purple-light);
}

/* 3. Featured Project Spotlight */
.featured-project {
    margin-top: 4rem;
    padding: 2.5rem;
    border-radius: 1.8rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
}

@media (min-width: 1024px) {
    .featured-project {
        grid-template-columns: 1.1fr 1fr;
    }
}

.featured-img-wrap {
    position: relative;
    border-radius: 1.25rem;
    overflow: hidden;
    box-shadow: var(--shadow-card), 0 0 40px color-mix(in srgb, var(--purple-accent) 20%, transparent);
    border: 1px solid var(--border-bright);
}

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

.featured-img-wrap:hover img {
    transform: scale(1.04);
}

.featured-badge-top {
    position: absolute;
    top: 16px;
    left: 16px;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--purple-accent);
    border: 1px solid var(--border-bright);
}

.featured-content h2 {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    margin-top: 0.8rem;
}

.featured-stats {
    margin: 1.8rem 0;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.f-stat {
    padding: 0.85rem 1rem;
    border-radius: 0.9rem;
    background: color-mix(in srgb, var(--purple-dark) 15%, transparent);
    border: 1px solid var(--border);
    text-align: center;
}

.f-stat-v {
    font-size: 1.4rem;
    font-weight: 700;
    line-height: 1;
}

.f-stat-l {
    font-size: 0.72rem;
    color: var(--muted);
    margin-top: 0.35rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.featured-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

@media (max-width: 768px) {
    .featured-project {
        padding: 1.5rem 1.2rem;
        border-radius: 1.25rem;
        gap: 1.5rem;
        margin-top: 2rem;
    }

    .featured-stats {
        margin: 1.2rem 0;
        gap: .5rem;
    }

    .f-stat {
        padding: .75rem .4rem;
    }

    .f-stat-v {
        font-size: 1.2rem;
    }

    .f-stat-l {
        font-size: .65rem;
        letter-spacing: 0;
    }
}

@media (max-width: 480px) {
    .featured-project {
        padding: 1.2rem .85rem;
    }

    .featured-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: .35rem;
    }

    .f-stat {
        padding: .6rem .2rem;
        border-radius: .6rem;
    }

    .f-stat-v {
        font-size: 1rem;
    }

    .f-stat-l {
        font-size: .58rem;
        margin-top: .2rem;
    }

    .featured-actions {
        flex-direction: column;
        gap: .6rem;
    }

    .featured-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

/* 4. Before / After Transformation Slider */
.ba-section {
    margin-top: 1.5rem;
}

.ba-slider-container {
    position: relative;
    width: 100%;
    max-width: 960px;
    margin: 2.5rem auto 0;
    aspect-ratio: 16 / 9;
    border-radius: 1.5rem;
    overflow: hidden;
    border: 1px solid var(--border-bright);
    box-shadow: var(--shadow-card), 0 0 50px color-mix(in srgb, var(--purple-accent) 20%, transparent);
    user-select: none;
    touch-action: none;
}

.ba-image {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.ba-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.ba-after {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    width: 50%;
    overflow: hidden;
    z-index: 2;
    border-right: 2px solid var(--purple-accent);
}

.ba-after img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    max-width: none;
}

.ba-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 50%;
    width: 4px;
    background: var(--purple-vivid);
    z-index: 10;
    transform: translateX(-50%);
    cursor: ew-resize;
    box-shadow: 0 0 16px var(--purple-vivid);
}

.ba-handle-button {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 2.75rem;
    height: 2.75rem;
    border-radius: 50%;
    background: var(--purple-accent);
    color: var(--bg);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 20px color-mix(in srgb, var(--purple-light) 80%, transparent);
    font-weight: 700;
}

.ba-label {
    position: absolute;
    top: 16px;
    z-index: 8;
    padding: 0.4rem 0.9rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border);
}

.ba-label.before-label {
    left: 16px;
    background: color-mix(in srgb, var(--bg) 80%, transparent);
    color: var(--muted);
}

.ba-label.after-label {
    right: 16px;
    background: color-mix(in srgb, var(--purple-dark) 85%, transparent);
    color: var(--fg);
    border-color: var(--purple-accent);
}

/* 5. Video Gallery Section */
.video-section {
    margin-top: 1.5rem;
}

.video-grid {
    margin-top: 2.5rem;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: 1fr;
}

@media (min-width: 640px) {
    .video-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

.video-card {
    border-radius: 1.4rem;
    overflow: hidden;
    border: 1px solid var(--border);
    transition: transform 0.35s ease, border-color 0.35s ease, box-shadow 0.35s ease;
    cursor: pointer;
}

.video-card:hover {
    transform: translateY(-5px);
    border-color: var(--purple-vivid);
    box-shadow: var(--shadow-card), 0 0 35px color-mix(in srgb, var(--purple-accent) 22%, transparent);
}

.video-thumb {
    position: relative;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: var(--bg-2);
}

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

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

.video-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background: color-mix(in srgb, var(--purple-vivid) 85%, transparent);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 30px color-mix(in srgb, var(--purple-accent) 60%, transparent);
    transition: transform 0.3s ease, background 0.3s ease;
}

.video-card:hover .video-play-btn {
    transform: translate(-50%, -50%) scale(1.12);
    background: var(--purple-vivid);
}

.video-play-btn i {
    width: 1.5rem;
    height: 1.5rem;
    margin-left: 2px;
}

.video-duration {
    position: absolute;
    bottom: 12px;
    right: 12px;
    background: color-mix(in srgb, var(--bg) 85%, transparent);
    backdrop-filter: blur(6px);
    padding: 0.2rem 0.6rem;
    border-radius: 0.4rem;
    font-size: 0.72rem;
    color: var(--fg);
    border: 1px solid color-mix(in srgb, var(--purple-accent) 20%, transparent);
}

.video-info {
    padding: 1.4rem;
}

.video-info h3 {
    font-size: 1.08rem;
    color: var(--fg);
}

.video-info p {
    margin-top: 0.4rem;
    font-size: 0.85rem;
    color: var(--muted);
}

/* 6. Load More Section */
.load-more-container {
    margin-top: 3.5rem;
    text-align: center;
}

.btn-load-more {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.85rem 2rem;
    font-size: 0.95rem;
    font-weight: 500;
    border-radius: 999px;
    background: color-mix(in srgb, var(--purple-dark) 25%, transparent);
    border: 1px solid var(--border-bright);
    color: var(--fg);
    cursor: pointer;
    transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease, box-shadow 0.25s ease;
    user-select: none;
    outline: none;
}

.btn-load-more:hover {
    background: color-mix(in srgb, var(--purple-vivid) 40%, transparent);
    border-color: var(--purple-vivid);
    transform: translateY(-2px);
    box-shadow: 0 0 30px color-mix(in srgb, var(--purple-accent) 30%, transparent);
}

.btn-load-more:active {
    transform: translateY(0);
}

.btn-load-more svg {
    width: 1.15rem;
    height: 1.15rem;
    stroke: currentColor;
    flex-shrink: 0;
}

.btn-load-more.loading .spinner {
    display: inline-block;
    width: 1.1rem;
    height: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--purple-accent);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Video Modal */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 9500;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(16px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.35s ease;
}

.video-modal.open {
    opacity: 1;
    pointer-events: all;
}

.video-modal-inner {
    position: relative;
    width: 100%;
    max-width: 900px;
    aspect-ratio: 16 / 9;
    background: #000;
    border-radius: 1.2rem;
    overflow: hidden;
    box-shadow: 0 40px 80px rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border-bright);
}

.video-modal iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

.video-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 1.2rem;
    z-index: 10;
    transition: background 0.2s ease;
}

.video-modal-close:hover {
    background: color-mix(in srgb, var(--purple-vivid) 50%, transparent);
}

/* Hero buttons — side by side (Explore Gallery + Contact Us) */
.gallery-hero .hero-cta {
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
}