/**
 * SBS Stack Component Styles
 * Portable CSS for stack card component
 * @version 1.0.0
 */

/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Palette màu */
    --c-bg: #050505;
    --c-card-bg: #fff;
    --c-card-content: #050505;
    --c-gold: #fff;
    --c-text-main: #ffffff;
    --c-text-sub: #bbbbbb;
    --c-border: #333333;
    
    /* Font & Layout */
    --font-main: 'Bai Jamjuree', sans-serif;
    --mw-container: 1400px;
    --radius-card: 0;
    --transition-smooth: all 0.5s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Helper Class */
.flex-center { 
    display: flex; 
    justify-content: center; 
    align-items: center; 
}

/* =========================================
   2. MAIN LAYOUT
   ========================================= */
.stack-section {
    display: flex;
    flex-direction: row-reverse; /* Desktop: Header Phải */
    max-width: var(--mw-container);
    margin: 0 auto;
    padding: 80px 20px;
    position: relative;
}

/* =========================================
   3. HEADER STYLES
   ========================================= */
.stack-header {
    flex: 0 0 35%;
    padding-left: 60px;
    position: sticky; 
    top: 150px; 
    height: fit-content; 
    z-index: 50; 
    text-align: right;
    transition: 0.3s ease;
}

.sh-title {
    font-size: 2.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--c-gold);
    line-height: 1.2;
    margin-bottom: 25px;
    text-shadow: 0 4px 20px rgba(255, 215, 0, 0.15);
}

.sh-desc {
    font-size: 1rem;
    font-weight: 300;
    color: var(--c-text-sub);
    line-height: 1.7;
    margin-bottom: 40px;
    letter-spacing: 0.5px;
}

.progress-indicator {
    font-size: 5rem;
    font-weight: 700;
    line-height: 1;
    display: flex;
    align-items: baseline;
    justify-content: flex-end;
    transition: 0.3s ease;
}

.total-count {
    font-size: 2rem;
    color: #444;
    font-weight: 400;
    margin-left: 10px;
}

/* =========================================
   4. CARDS STYLES
   ========================================= */
.stack-cards-wrapper {
    flex: 1;
    padding-bottom: 50px; 
}

.s-card {
    background-color: var(--c-card-bg);
    border: 1px solid var(--c-border);
    border-radius: var(--radius-card);
    overflow: hidden;
    display: flex;
    height: 450px; 
    margin-bottom: 50px; 
    box-shadow: 0 -10px 40px rgba(0,0,0,0.8);
    
    /* Sticky Logic */
    position: sticky; 
    top: 150px; 
    z-index: 1;
    
    transition: transform 0.5s ease, filter 0.5s ease;
    transform-origin: center top;
}

/* Text Area (35%) */
.sc-content {
    flex: 0 0 35%;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--c-card-content);
    border-right: 1px solid #222;
    text-align: left;
    position: relative;
}

/* Tam giác trắng */
.sc-content::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-right: 70px solid transparent;
    border-top: 70px solid var(--cl-1);
}

/* Image Area (65%) */
.sc-img-box { 
    flex: 1; 
    position: relative; 
    overflow: hidden; 
}

.sc-img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    /* filter: grayscale(100%);  */
    transition: all 0.6s ease; 
}

.sh-title, #currentNum {
    color: var(--cl-1);
}

/* Hover Effect */
.s-card:hover .sc-img { 
    filter: grayscale(0%); 
    transform: scale(1.05); 
}

/* Typography */
.sc-num { 
    display: none;
    font-size: 3rem; 
    font-weight: 700; 
    color: transparent; 
    -webkit-text-stroke: 1px #444; 
    margin-bottom: 10px; 
}

.sc-title { 
    font-size: 1.5625rem; 
    font-weight: 600; 
    color: #fff; 
    margin-bottom: 15px; 
    line-height: 1.3; 
}

.sc-text { 
    color: #ffffff; 
    font-size: 0.95rem; 
    line-height: 1.6; 
    font-weight: 300; 
}

/* Stacked States (Depth Effect) */
.s-card.stacked { 
    transform: scale(0.95); 
    filter: brightness(0.4); 
}

.s-card.stacked-2 { 
    transform: scale(0.90) translateY(-15px); 
    filter: brightness(0.2); 
}

/* =========================================
   5. CTA CARD
   ========================================= */
.cta-card {
    background-color: #0F0F0F; 
    color: #fff; 
    text-decoration: none; 
    
    display: flex !important;
    flex-direction: column !important;
    justify-content: center !important;
    align-items: center !important;
    text-align: center !important;
    
    position: sticky; 
    border: 1px solid var(--c-border);
    width: 100%;
}

.arch-big-num {
    position: absolute; 
    top: 50%; 
    left: 50%; 
    transform: translate(-50%, -50%);
    font-size: 18rem; 
    font-weight: 900; 
    line-height: 0.8; 
    color: transparent; 
    -webkit-text-stroke: 2px #222; 
    z-index: 1; 
    opacity: 0.5; 
    transition: var(--transition-smooth);
    pointer-events: none;
}

.arch-vertical-deco {
    position: absolute; 
    left: 30px; 
    top: 50%; 
    transform: translateY(-50%) rotate(-90deg);
    font-size: 0.8rem; 
    letter-spacing: 5px; 
    color: var(--c-gold); 
    z-index: 2; 
    text-transform: uppercase; 
    font-weight: 600; 
    opacity: 0.7;
    pointer-events: none;
}

.arch-content-wrapper {
    position: relative; 
    z-index: 3; 
    width: auto; 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 15px;
}

.arch-sub-label { 
    font-size: 1rem; 
    letter-spacing: 3px; 
    color: #888; 
    text-transform: uppercase; 
}

.arch-main-title { 
    font-size: 3rem; 
    font-weight: 700; 
    text-transform: uppercase; 
    color: #fff; 
    mix-blend-mode: exclusion; 
    line-height: 1.3; 
}

.arch-btn {
    margin-top: 15px; 
    border: 1px solid var(--c-gold); 
    padding: 12px 30px; 
    font-size: 1rem; 
    text-transform: uppercase; 
    letter-spacing: 1px; 
    color: var(--c-gold); 
    display: flex; 
    align-items: center; 
    gap: 10px;
    transition: 0.4s ease; 
    background: transparent;
}

.arch-arrow { 
    font-size: 1.2rem; 
    transition: transform 0.3s; 
}

/* CTA Hover */
.cta-card:hover { 
    border-color: #555; 
}

.cta-card:hover .arch-big-num { 
    -webkit-text-stroke: 2px var(--c-gold); 
    opacity: 0.2; 
    transform: translate(-50%, -50%) scale(1.1); 
}

.cta-card:hover .arch-btn { 
    background-color: var(--c-gold); 
    color: #000; 
}

.cta-card:hover .arch-arrow { 
    transform: translateX(5px); 
}

/* Scroll label */
.scroll-label {
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.scroll-label p {
    color: #555;
}

/* =========================================
   6. RESPONSIVE: TABLET (Max 1024px)
   ========================================= */
@media (max-width: 1024px) {
    .stack-section { 
        flex-direction: column; 
        padding-top: 0; 
        padding-bottom: 40px;
    }

    .stack-header { 
        position: sticky; 
        top: 0; 
        flex: none; 
        width: 100%; 
        height: auto; 
        z-index: 100;
        padding: 20px 0; 
        margin-bottom: 40px; 
        text-align: center;
        
        background: rgba(5, 5, 5, 0.95);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid #222;
        box-shadow: 0 4px 20px rgba(0,0,0,0.5);
    }
    
    .sh-title { 
        font-size: 2.5rem; 
        display: inline-block;
        border-bottom: 4px solid var(--c-gold); 
        padding-bottom: 10px; 
        margin-bottom: 20px;
    }
    
    .sh-desc { 
        display: none; 
    }

    .progress-indicator { 
        justify-content: center; 
        font-size: 3.5rem; 
        margin-top: 0; 
    }
    
    .total-count { 
        align-self: center; 
    }
    
    /* Card Tablet */
    .s-card, 
    .cta-card { 
        flex-direction: column-reverse; 
        height: auto; 
        top: 180px; 
        margin-bottom: 40px;
    }
    
    .sc-content { 
        flex: none; 
        width: 100%; 
        border-right: none; 
        border-bottom: 1px solid #222; 
        padding: 30px; 
        text-align: left; 
    }
    
    .sc-img-box { 
        height: 300px; 
        flex: none; 
    }
    
    .cta-card { 
        height: 400px; 
    }
    
    .arch-big-num { 
        font-size: 12rem; 
    }
    
    .arch-vertical-deco { 
        display: none; 
    }
}

/* =========================================
   7. RESPONSIVE: MOBILE (Max 768px)
   ========================================= */
@media (max-width: 768px) {
    .stack-section {
        padding-top: 0; 
        padding-left: 15px; 
        padding-right: 15px;
    }

    .stack-header {
        position: sticky; 
        top: 0;
        width: calc(100% + 30px); 
        margin-left: -15px;
        padding: 15px 20px; 
        margin-bottom: 30px;
        
        display: flex; 
        flex-direction: row; 
        justify-content: space-between; 
        align-items: center; 
        text-align: left;
    }

    /* Title LỚN */
    .sh-title {
        font-size: 1.6rem; 
        margin: 0; 
        padding: 0; 
        border: none; 
        flex: 1; 
        padding-right: 15px;
        text-shadow: none;
    }

    /* Số NHỎ */
    .progress-indicator {
        font-size: 0.9rem; 
        font-weight: 600; 
        background: var(--c-card-bg); 
        padding: 6px 10px; 
        border-radius: 6px; 
        border: 1px solid #333;
        flex: 0 0 auto;
    }
    
    .total-count { 
        font-size: 0.8rem; 
        color: #666; 
        margin-left: 5px; 
    }

    /* Card Mobile */
    .s-card, 
    .cta-card {
        flex-direction: column-reverse; 
        height: auto;
        top: 90px; 
        margin-bottom: 25px;
    }

    .sc-content { 
        border-top: 1px solid #222; 
        border-bottom: none; 
        padding: 20px; 
    }
    
    .sc-title { 
        font-size: 1.3rem; 
        margin-bottom: 10px; 
    }
    
    .sc-num { 
        font-size: 2.5rem; 
        margin-bottom: 5px; 
    }
    
    .sc-img-box { 
        height: 220px; 
    }

    .cta-card { 
        height: 320px; 
    }
    
    .arch-big-num { 
        font-size: 8rem; 
    }
    
    .arch-main-title { 
        font-size: 2rem; 
    }
}
