/* ===================================================================
   3D Perspective Gallery Carousel - Scoped Component Styles
   Deep Concave Perspective & Uniform Gapping matching Framer Reference
   =================================================================== */

:root {
    --pgc-primary-orange: #fd5b38;
    --pgc-bg-dark: #0f0f0f;
    --pgc-card-bg: #141414;
    --pgc-card-radius: 32px;
    --pgc-card-width: 480px;
    --pgc-card-height: 640px;
    --pgc-cylinder-radius: 1989px;
    --pgc-cylinder-z: -1989px;
    --pgc-perspective: 897px;
}

/* Section Container - Increased top padding for spacious, elegant breathing room */
.perspective-gallery-section {
    position: relative;
    background-color: #0f0f0f;
    padding: 120px 0 50px;
    overflow: hidden;
    z-index: 5;
}

/* Elegant bottom section divider line matching site design system */
.perspective-gallery-section::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(1200px, 90%);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.15), transparent);
    pointer-events: none;
}

/* Header styling */
.perspective-gallery-section .sec-head {
    position: relative;
    z-index: 10;
    margin-bottom: 0 !important;
}

.perspective-gallery-section .sec-head .sub-title {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--pgc-primary-orange);
    display: inline-block;
}

.perspective-gallery-section .sec-head h2 {
    font-size: 48px;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.2;
    margin-top: 6px;
    margin-bottom: 10px;
    letter-spacing: -0.5px;
}

.perspective-gallery-section .sec-head p {
    font-size: 16px;
    color: #a0a0a0;
    max-width: 620px;
    margin: 0 auto;
    line-height: 1.5;
}

.perspective-gallery-section .sec-head .cta-wrap {
    margin-top: 12px;
    margin-bottom: 0;
}

.perspective-gallery-section .sec-head .contact-btn {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 11px 26px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    background: #111111;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: all 0.3s cubic-bezier(0.25, 1, 0.5, 1);
}

.perspective-gallery-section .sec-head .contact-btn:hover {
    border-color: var(--pgc-primary-orange);
    background: rgba(253, 91, 56, 0.12);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(253, 91, 56, 0.2);
}

.perspective-gallery-section .sec-head .contact-btn svg {
    transition: transform 0.3s ease;
}

.perspective-gallery-section .sec-head .contact-btn:hover svg {
    transform: translateX(4px);
}

/* ===================================================================
   3D Carousel Scene & Stage (Deep Perspective & Uniform Gapping)
   =================================================================== */

.perspective-carousel-wrapper {
    position: relative;
    width: 100%;
    margin-top: -110px;
    margin-bottom: 0;
    z-index: 2;
    overflow: hidden;
    transform: translateZ(0);
    contain: layout paint;
}

/* Feathered side vignette fades matching Framer reference */
.perspective-carousel-wrapper::before,
.perspective-carousel-wrapper::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: clamp(120px, 16vw, 260px);
    z-index: 5;
    pointer-events: none;
}

.perspective-carousel-wrapper::before {
    left: 0;
    background: linear-gradient(
        90deg,
        #0f0f0f 0%,
        rgba(15, 15, 15, 0.98) 25%,
        rgba(15, 15, 15, 0.75) 55%,
        rgba(15, 15, 15, 0.25) 80%,
        transparent 100%
    );
}

.perspective-carousel-wrapper::after {
    right: 0;
    background: linear-gradient(
        270deg,
        #0f0f0f 0%,
        rgba(15, 15, 15, 0.98) 25%,
        rgba(15, 15, 15, 0.75) 55%,
        rgba(15, 15, 15, 0.25) 80%,
        transparent 100%
    );
}

.perspective-carousel-scene {
    position: relative;
    width: 100%;
    height: 620px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: var(--pgc-perspective);
    -webkit-perspective: var(--pgc-perspective);
    perspective-origin: 50% 50%;
    -webkit-perspective-origin: 50% 50%;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}

.perspective-carousel-scene.is-dragging {
    cursor: grabbing;
}

/* The 3D Rotating Cylinder */
.perspective-carousel-cylinder {
    position: relative;
    width: 0;
    height: 0;
    top: 0;
    transform-style: preserve-3d;
    -webkit-transform-style: preserve-3d;
    will-change: transform;
}

/* Individual Image Card - Explicit 3:4 Aspect Ratio */
.perspective-card {
    position: absolute;
    width: var(--pgc-card-width);
    height: var(--pgc-card-height);
    aspect-ratio: 3 / 4;
    left: calc(var(--pgc-card-width) / -2);
    top: calc(var(--pgc-card-height) / -2);
    border-radius: var(--pgc-card-radius);
    overflow: hidden;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.45);
    background-color: #141414;
    cursor: pointer;
    transition: border-color 0.35s ease, box-shadow 0.35s ease;
}

/* Luxury Skeleton Shimmer Layer while image loads */
.perspective-card::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        110deg,
        rgba(255, 255, 255, 0.01) 0%,
        rgba(255, 255, 255, 0.035) 25%,
        rgba(253, 91, 56, 0.09) 50%,
        rgba(255, 255, 255, 0.035) 75%,
        rgba(255, 255, 255, 0.01) 100%
    );
    background-size: 200% 100%;
    animation: pgcCardShimmer 2.2s infinite ease-in-out;
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.6s ease;
}

/* Minimalist center loading indicator spinner glow */
.perspective-card::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.07);
    border-top-color: var(--pgc-primary-orange, #fd5b38);
    opacity: 0.6;
    z-index: 2;
    animation: pgcSpinGlow 1.2s cubic-bezier(0.5, 0, 0.5, 1) infinite;
    pointer-events: none;
    transition: opacity 0.5s ease, transform 0.5s ease;
}

/* Fade out shimmer and spinner once loaded */
.perspective-card.is-img-loaded::before {
    opacity: 0;
    animation: none;
}

.perspective-card.is-img-loaded::after {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.6);
    animation: none;
}

@keyframes pgcCardShimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

@keyframes pgcSpinGlow {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }
    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.perspective-card:hover {
    border-color: rgba(255, 255, 255, 0.22);
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.55);
}

.perspective-card.is-active {
    border-color: rgba(255, 255, 255, 0.35);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.65);
}

.perspective-card:focus-visible {
    outline: 2px solid rgba(255, 255, 255, 0.4);
    outline-offset: 4px;
}

/* Card Image - Cinematic Blur-Up & Scale Settle */
.perspective-card-img {
    position: relative;
    z-index: 3;
    width: 100%;
    height: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    object-position: center;
    display: block;
    border-radius: inherit;
    pointer-events: none;
    opacity: 0;
    filter: blur(12px) brightness(0.7);
    transform: scale(1.06);
    transition: 
        opacity 0.75s cubic-bezier(0.16, 1, 0.3, 1),
        filter 0.75s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.85s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Loaded State */
.perspective-card-img.is-loaded {
    opacity: 1;
    filter: blur(0px) brightness(1);
    transform: scale(1);
}

/* Interactive Hover state after load */
.perspective-card:hover .perspective-card-img.is-loaded {
    transform: scale(1.035);
    transition: transform 0.45s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ===================================================================
   Responsive Adjustments (Deep Perspective Arc)
   =================================================================== */

/* Laptop / Small Desktop (Max 1199px) */
@media (max-width: 1199px) {
    :root {
        --pgc-card-width: 432px;
        --pgc-card-height: 576px;
        --pgc-cylinder-radius: 1794px;
        --pgc-cylinder-z: -1794px;
        --pgc-perspective: 819px;
        --pgc-card-radius: 28px;
    }

    .perspective-gallery-section {
        padding: 110px 0 45px;
    }

    .perspective-carousel-wrapper {
        margin-top: -95px;
    }

    .perspective-carousel-scene {
        height: 560px;
    }
}

/* Tablet (Max 991px) */
@media (max-width: 991px) {
    :root {
        --pgc-card-width: 375px;
        --pgc-card-height: 500px;
        --pgc-cylinder-radius: 1560px;
        --pgc-cylinder-z: -1560px;
        --pgc-perspective: 741px;
        --pgc-card-radius: 24px;
    }

    .perspective-gallery-section {
        padding: 100px 0 40px;
    }

    .perspective-gallery-section .sec-head h2 {
        font-size: 38px;
    }

    .perspective-carousel-wrapper {
        margin-top: -80px;
    }

    .perspective-carousel-scene {
        height: 490px;
    }
}

/* Mobile (Max 767px) - 30% Bigger Carousel */
@media (max-width: 767px) {
    :root {
        --pgc-card-width: 390px;
        --pgc-card-height: 520px;
        --pgc-cylinder-radius: 1673px;
        --pgc-cylinder-z: -1673px;
        --pgc-perspective: 862px;
        --pgc-card-radius: 26px;
    }

    .perspective-gallery-section {
        padding: 85px 0 40px;
    }

    .perspective-gallery-section .sec-head h2 {
        font-size: 28px;
    }

    .perspective-gallery-section .sec-head p {
        font-size: 14px;
    }

    .perspective-carousel-wrapper {
        margin-top: -65px;
        margin-bottom: 0;
    }

    .perspective-carousel-scene {
        height: 546px;
    }

    /* Hide 4-step process features on mobile */
    .gallery-process-features {
        display: none !important;
    }
}

/* Extra Small Mobile (Max 480px) - 30% Bigger Carousel */
@media (max-width: 480px) {
    :root {
        --pgc-card-width: 330px;
        --pgc-card-height: 442px;
        --pgc-cylinder-radius: 1369px;
        --pgc-cylinder-z: -1369px;
        --pgc-perspective: 760px;
        --pgc-card-radius: 23px;
    }

    .perspective-carousel-wrapper {
        margin-top: -45px;
        margin-bottom: 0;
    }

    .perspective-carousel-scene {
        height: 468px;
    }
}

/* Accessibility: Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .perspective-card,
    .perspective-carousel-cylinder {
        transition: none !important;
    }

    .perspective-card::before,
    .perspective-card::after {
        animation: none !important;
        display: none !important;
    }

    .perspective-card-img {
        transition: none !important;
        filter: none !important;
        transform: none !important;
        opacity: 1 !important;
    }
}

/* ===================================================================
   Gallery Process Features (#01 Strategy & Planning, etc.)
   =================================================================== */
.gallery-process-features {
    position: relative;
    z-index: 10;
    margin-top: -125px;
    margin-bottom: 25px;
}

.gallery-process-features .process-item {
    padding: 12px 10px;
    transition: transform 0.3s ease;
}

.gallery-process-features .process-item:hover {
    transform: translateY(-4px);
}

.gallery-process-features .process-num {
    font-family: 'Plus Jakarta Sans', 'Poppins', sans-serif;
    font-size: 17px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.gallery-process-features .process-num .hash {
    color: var(--pgc-primary-orange, #fd5b38);
    font-weight: 800;
    margin-right: 1px;
}

.gallery-process-features .process-title {
    font-family: 'Plus Jakarta Sans', 'Poppins', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #e0e0e0;
    margin: 0;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.gallery-process-features .process-item:hover .process-title {
    color: #ffffff;
}

@media (max-width: 1199px) {
    .gallery-process-features {
        margin-top: -105px;
    }
}

@media (max-width: 991px) {
    .gallery-process-features {
        margin-top: -85px;
        margin-bottom: 15px;
    }

    .gallery-process-features .process-item {
        margin-bottom: 24px;
    }
}

@media (max-width: 767px) {
    .gallery-process-features {
        display: none !important;
    }
}

