/* ================================================================
   CATEGORY PREVIEW SECTIONS — portfolio-cat.css
   ================================================================ */

/* Alternating background */
.cat-section.alt-bg {
    background: #111;
}

/* ── Section header: title on left, More on right ── */
.cat-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.5rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
}

.cat-title-group {
    text-align: left;
}

.cat-title-group h2 {
    text-align: left;
    font-size: clamp(1.8rem, 4vw, 3rem);
    text-transform: uppercase;
    margin-bottom: 0.4rem;
    color: #fff;
}

.cat-title-group p {
    color: var(--secondary-color);
    font-size: 0.95rem;
    max-width: 480px;
    text-align: left;
    margin: 0;
}

/* More button */
.cat-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 26px;
    background: transparent;
    border: 1.5px solid var(--accent-color);
    color: var(--accent-color);
    border-radius: 40px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.88rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.3s, color 0.3s, transform 0.25s, box-shadow 0.3s;
    flex-shrink: 0;
}

.cat-more-btn:hover {
    background: var(--accent-color);
    color: #fff;
    transform: translateX(4px);
    box-shadow: 0 6px 24px rgba(196, 30, 84, 0.35);
}

.cat-more-btn i {
    transition: transform 0.25s;
}

.cat-more-btn:hover i {
    transform: translateX(4px);
}

/* ── Slider wrapper + track ── */
.cat-slider-wrap {
    position: relative;
    overflow: hidden;
}

.cat-track {
    display: flex;
    flex-wrap: nowrap;
    gap: 20px;
    overflow-x: auto;
    overflow-y: visible;
    scrollbar-width: none;
    -ms-overflow-style: none;
    padding: 8px 4px 20px;
    will-change: scroll-position;
    -webkit-overflow-scrolling: touch;
    transform: translateZ(0);
    /* GPU layer */
}

.cat-track::-webkit-scrollbar {
    display: none;
}

.cat-track-reels {
    align-items: flex-start;
}

.cat-track-wedding {
    align-items: stretch;
}

/* ── New card aspect ratios ── */
.ratio-logo {
    width: 300px;
    min-width: 260px;
    aspect-ratio: 3 / 2;
}

.ratio-thumb {
    width: 420px;
    min-width: 320px;
    aspect-ratio: 16 / 9;
}

.ratio-wedding {
    width: 580px;
    min-width: 400px;
    aspect-ratio: 16 / 9;
}

/* ── Expand overlay for image cards ── */
.pf-expand-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.35);
    opacity: 0;
    transition: opacity 0.3s;
    cursor: pointer;
}

.pf-card:hover .pf-expand-btn {
    opacity: 1;
}

.pf-expand-btn i {
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    color: #fff;
    backdrop-filter: blur(4px);
    transition: background 0.25s, transform 0.25s;
}

.pf-card:hover .pf-expand-btn i {
    background: var(--accent-color);
    border-color: var(--accent-color);
    transform: scale(1.1);
}

/* ── Behind-the-Work stat card (in slider) ── */
.btw-stat-card {
    flex-shrink: 0;
    width: 260px;
    min-width: 220px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.75rem;
}

.btw-stat-card i {
    font-size: 2rem;
    color: var(--accent-color);
}

.btw-stat-card h4 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    text-align: left;
    margin: 0;
}

.btw-stat-card p {
    color: var(--secondary-color);
    font-size: 0.85rem;
    line-height: 1.5;
    text-align: left;
    margin: 0;
}

/* ── Image lightbox ── */
.img-lightbox {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.94);
    z-index: 9990;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.25s ease;
    padding: 40px 20px;
}

.img-lightbox img {
    max-width: min(1100px, 94vw);
    max-height: 90vh;
    object-fit: contain;
    border-radius: 10px;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.8);
}

/* ================================================================
   DEDICATED CATEGORY PAGES
   ================================================================ */

.cat-page-hero {
    padding: 120px 5% 60px;
    text-align: center;
    background: var(--bg-color);
    position: relative;
}

.cat-page-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 5%;
    right: 5%;
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
}

.cat-page-hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 6vw, 5rem);
    text-transform: uppercase;
    color: #fff;
    line-height: 1.1;
    margin-bottom: 1rem;
}

.cat-page-hero p {
    color: var(--secondary-color);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--accent-color);
    font-size: 0.9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2rem;
    transition: gap 0.25s;
}

.back-link:hover {
    gap: 12px;
}

.cat-page-grid {
    padding: 4rem 5%;
    background: var(--bg-color);
}

/* Full-page grids */
.grid-16-9 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.grid-9-16 {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.grid-logo {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.grid-thumb {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 20px;
}

.grid-wedding {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(480px, 1fr));
    gap: 24px;
}

/* Grid card (dedicated pages) */
.grid-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    background: #111;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    animation: fadeUp 0.6s ease both;
}

.grid-card:hover {
    transform: translateY(-6px) scale(1.02);
    box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6), 0 0 24px rgba(196, 30, 84, 0.12);
}

.grid-card img,
.grid-card video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.grid-card:hover img,
.grid-card:hover video {
    transform: scale(1.04);
}

.grid-card.ar-16-9 {
    aspect-ratio: 16 / 9;
}

.grid-card.ar-9-16 {
    aspect-ratio: 9 / 16;
}

.grid-card.ar-3-2 {
    aspect-ratio: 3 / 2;
}

.grid-card.ar-wed {
    aspect-ratio: 16 / 9;
}

.grid-card-label {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 14px 16px 12px;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    font-size: 0.85rem;
    font-weight: 600;
    color: #fff;
    letter-spacing: 0.5px;
}

.grid-play-overlay,
.grid-expand-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    opacity: 0;
    transition: opacity 0.3s;
}

.grid-card:hover .grid-play-overlay,
.grid-card:hover .grid-expand-overlay {
    opacity: 1;
}

.grid-play-overlay i,
.grid-expand-overlay i {
    width: 60px;
    height: 60px;
    background: var(--accent-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
    transform: scale(0.9);
    transition: transform 0.25s;
    padding-left: 4px;
}

.grid-card:hover .grid-play-overlay i,
.grid-card:hover .grid-expand-overlay i {
    transform: scale(1);
}

.grid-expand-overlay i {
    padding-left: 0;
    font-size: 1.2rem;
}

/* BTW Detail grid */
.btw-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 24px;
    margin-top: 4rem;
}

.btw-detail-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 2.5rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    animation: fadeUp 0.6s ease both;
}

.btw-detail-card i {
    font-size: 2.5rem;
    color: var(--accent-color);
}

.btw-detail-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 700;
    color: #fff;
    text-align: left;
    margin: 0;
}

.btw-detail-card p {
    color: var(--secondary-color);
    font-size: 0.9rem;
    line-height: 1.6;
    text-align: left;
    margin: 0;
}

/* Animation */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.grid-card:nth-child(1) {
    animation-delay: 0.05s;
}

.grid-card:nth-child(2) {
    animation-delay: 0.10s;
}

.grid-card:nth-child(3) {
    animation-delay: 0.15s;
}

.grid-card:nth-child(4) {
    animation-delay: 0.20s;
}

.grid-card:nth-child(5) {
    animation-delay: 0.25s;
}

.grid-card:nth-child(6) {
    animation-delay: 0.30s;
}

.grid-card:nth-child(7) {
    animation-delay: 0.35s;
}

.grid-card:nth-child(8) {
    animation-delay: 0.40s;
}

.grid-card:nth-child(9) {
    animation-delay: 0.45s;
}

.grid-card:nth-child(10) {
    animation-delay: 0.50s;
}

/* Responsive */
@media (max-width: 768px) {
    .cat-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .cat-more-btn {
        align-self: flex-end;
    }

    .ratio-wedding {
        width: 340px;
        min-width: 280px;
    }

    .ratio-thumb {
        width: 300px;
        min-width: 240px;
    }

    .ratio-logo {
        width: 220px;
        min-width: 180px;
    }

    .grid-16-9,
    .grid-wedding {
        grid-template-columns: 1fr;
    }

    .grid-9-16 {
        grid-template-columns: repeat(2, 1fr);
    }

    .grid-logo,
    .grid-thumb {
        grid-template-columns: repeat(2, 1fr);
    }

    .cat-page-hero {
        padding: 100px 5% 48px;
    }

    .btw-stat-card {
        width: 220px;
        min-width: 200px;
    }
}

@media (max-width: 480px) {

    .grid-9-16,
    .grid-logo,
    .grid-thumb {
        grid-template-columns: 1fr;
    }
}

/* ================================================================
   BEHIND THE SCENE SPLIT LAYOUT
   ================================================================ */
.bts-split-container {
    display: flex;
    flex-wrap: nowrap;
    gap: 24px;
    margin-top: 2rem;
    align-items: stretch;
}

.bts-left-col {
    flex: 0 0 60%;
    width: 60%;
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.bts-right-col {
    flex: 0 0 calc(40% - 24px);
    width: calc(40% - 24px);
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    background: #111;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

/* Before/After Slider */
.ba-slider-container {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    user-select: none;
    cursor: ew-resize;
    touch-action: pan-y;
    /* allow page vertical scroll, but capture horizontal */
    transform: translateZ(0);
}

.ba-image-base {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    will-change: transform;
    transform: translateZ(0);
}

.ba-image-overlay-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    clip-path: polygon(0 0, 50% 0, 50% 100%, 0 100%);
    will-change: clip-path;
    transform: translateZ(0);
}

.ba-image-overlay-wrapper.smooth-transition {
    transition: clip-path 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.ba-image-overlay {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: translateZ(0);
}

.ba-slider-handle {
    position: absolute;
    top: 0;
    bottom: 0;
    left: -100%;
    width: 100%;
    z-index: 10;
    pointer-events: none;
    will-change: transform;
    transform: translate3d(50%, 0, 0);
}

.ba-slider-handle.smooth-transition {
    transition: transform 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.ba-slider-line {
    position: absolute;
    top: 0;
    bottom: 0;
    right: -1.5px;
    width: 3px;
    background: #fff;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}

.ba-slider-button {
    position: absolute;
    top: 50%;
    right: -20px;
    transform: translateY(-50%) translateZ(0);
    width: 40px;
    height: 40px;
    background: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent-color);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
    font-size: 1.1rem;
    will-change: transform;
}

/* Moving Gallery */
.bts-gallery-viewport {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.bts-gallery-track {
    display: flex;
    flex-direction: column;
    gap: 16px;
    padding: 16px;
    animation: scrollGallery 25s linear infinite;
    will-change: transform;
}

.bts-gallery-viewport:hover .bts-gallery-track {
    animation-play-state: paused;
}

@keyframes scrollGallery {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-50%);
    }
}

.bts-gallery-item {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    /* prevent ratio shift */
    flex-shrink: 0;
}

.bts-gallery-item img {
    display: block;
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.bts-gallery-item:hover img {
    transform: scale(1.04);
}

/* Animations */
.bts-fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.bts-fade-in.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.bts-delay {
    transition-delay: 0.2s;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .bts-split-container {
        flex-direction: column;
        gap: 20px;
    }

    .bts-left-col {
        flex: auto;
        width: 100%;
    }

    .bts-right-col {
        flex: none;
        width: 100%;
        height: 350px;
        /* Fixed height for gallery on mobile so it doesn't collapse */
    }
}