/**
 * Sifency Reveal Showcase - Optimized Styles
 */

/* 1. Base Container Setup */
.sifency-reveal-container {
    position: relative;
    width: 100%;
    height: 100vh;
    /* Fixed height for pinning */
    overflow: hidden;
    background-color: transparent;
}

/* 2. Background Layer (Fixed and Behind) */
.sifency-addons-reveal-bg-layer {
    position: absolute;
    inset: 0;
    z-index: 0;
    /* Always at the bottom */
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    /* User jate cards click korte pare */
}

.sifency-addons-reveal-bg-text {
    width: 100%;
    text-align: center;
    transition: opacity 0.3s ease;
}

/* 3. Cards Layer (Where the actual content scrolls) */
.sifency-addons-reveal-cards-layer {
    position: relative;
    width: 100%;
    height: 100%;
    z-index: 2;
    /* Text er upor diye jabe */
    perspective: 1500px;
}

/* 4. Common Card Styling */
.sifency-addons-reveal-card {
    will-change: transform, opacity, clip-path;
}

.sa-revel-card-inner {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
}

.sa-revel-card-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* 5. GRID LAYOUT SPECIFIC (Scattered & Scrollable) */
/* Container logic */
.sifency-reveal-container[data-layout="grid"] {
    height: 100vh;
    overflow: hidden;
    position: relative;
    /* Nicher faka space bondho korar jonno padding adjust */
    padding: 0;
}

/* Cards Layer Logic */
.sifency-reveal-container[data-layout="grid"] .sifency-addons-reveal-cards-layer {
    position: absolute;
    top: 0;
    /* JS handle korbe movement */
    left: 0;
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    /* gap: 100px 40px;
    padding: 20vh 0 20vh 0; */
    height: auto !important;
}

.sifency-reveal-container[data-layout="grid"] .sifency-addons-reveal-card {
    position: relative;
    /* Normal flow inside the layer */
    flex-shrink: 0;
    max-width: 100%;
}


/* Staggered Grid (Screenshot er moto) */
.sifency-reveal-container[data-layout="grid"] .sifency-addons-reveal-card:nth-child(even) {
    margin-top: 200px;
}

.sifency-reveal-container[data-layout="reveal"] .sifency-addons-reveal-card {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.sa-reveal-card-rich-content {
    position: relative;
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 2;
}

/* Overlay for text readability on rich images */
.sa-reveal-card-rich-content::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
}

.sa-reveal-card-rich-title {
    margin: 10px 0;
    line-height: 1.2;
}

/* Tag & Labels */
.sa-revel-card-tag {
    position: absolute;
    top: 30px;
    right: 30px;
}

/* 6. STICKY LAYOUT (Cinematic Reveal) */
.sifency-reveal-container[data-layout="sticky"] {
    height: 100vh;
    overflow: visible;
    /* Allow section to grow for scroll */
}

.sifency-reveal-container[data-layout="sticky"] .sifency-addons-reveal-cards-layer {
    position: relative;
    /* Let GSAP handle pinning */
    top: 0;
    width: 100%;
    height: 100vh;
    overflow: hidden;
}

.sifency-reveal-container[data-layout="sticky"] .sifency-addons-reveal-card {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.sifency-reveal-container[data-layout="sticky"] .sa-revel-card-inner {
    width: 100%;
    height: 100%;
    clip-path: inset(50%);
    /* Initial clipped state */
}

.sifency-reveal-container[data-layout="sticky"] .sifency-addons-reveal-card:first-child .sa-revel-card-inner {
    clip-path: inset(0%);
}

.sifency-reveal-container[data-layout="sticky"] .sa-reveal-card-rich-content {
    justify-content: center;
    align-items: center;
    text-align: center;
}

.sifency-reveal-container[data-layout="sticky"] .sa-reveal-card-rich-title {
    font-size: clamp(3rem, 8vw, 6rem);
    margin: 0;
    overflow: hidden;
}

/* Progress for Sticky */
.sifency-reveal-container[data-layout="sticky"] .sifency-reveal-progress {
    position: absolute;
    bottom: 50px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    gap: 15px;
}

.sifency-reveal-container[data-layout="sticky"] .srp-dot {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
}

.sifency-reveal-container[data-layout="sticky"] .srp-dot.is-active {
    background: #fff;
}

/* 7. Global Counter */
.sifency-global-counter {
    position: absolute;
    z-index: 10;
    font-size: 2rem;
    font-weight: bold;
    color: #fff;
    padding: 30px;
    line-height: 1;
    pointer-events: none;
}

.sifency-global-counter.sgc-pos-top-left { top: 0; left: 0; }
.sifency-global-counter.sgc-pos-top-center { top: 0; left: 50%; transform: translateX(-50%); }
.sifency-global-counter.sgc-pos-top-right { top: 0; right: 0; }
.sifency-global-counter.sgc-pos-center-left { top: 50%; left: 0; transform: translateY(-50%); }
.sifency-global-counter.sgc-pos-center { top: 50%; left: 50%; transform: translate(-50%, -50%); }
.sifency-global-counter.sgc-pos-center-right { top: 50%; right: 0; transform: translateY(-50%); }
.sifency-global-counter.sgc-pos-bottom-left { bottom: 0; left: 0; }
.sifency-global-counter.sgc-pos-bottom-center { bottom: 0; left: 50%; transform: translateX(-50%); }
.sifency-global-counter.sgc-pos-bottom-right { bottom: 0; right: 0; }