/**
 * [BLOCK STYLE: PRICING GRID]
 * LOCATION: logic/blocks/pricinggridblock/style.css
 * STATUS: INTERACTIVE (Hover Reveal Added)
 */

.block-pricing {
    position: relative;
    background-color: var(--c-navy-900, #0b1124); 
    padding: 5rem 0;
    text-align: center;
    overflow: hidden;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

/* SECTION OVERLAY */
.block-pricing__overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(11, 17, 36, 0.85); 
    z-index: 1;
}

.block-pricing__header,
.block-pricing__grid {
    position: relative;
    z-index: 2;
}

/* --- HEADER --- */
.block-pricing__header {
    padding: 0 1.5rem;
}

.block-pricing__headline {
    font-size: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 3rem;
    font-weight: 700;
}

.block-pricing__headline .text-white { color: var(--c-text-light, #ffffff); }
.block-pricing__headline .text-gold { color: var(--c-accent, #c5a059); margin-left: 0.3em; }

/* --- GRID LAYOUT --- */
.block-pricing__grid {
    display: flex;
    gap: 1.5rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    -webkit-overflow-scrolling: touch;
    padding: 1rem 1.5rem 3rem 1.5rem;
    width: 100%;
    scrollbar-width: none; 
}

.block-pricing__grid::-webkit-scrollbar {
    display: none; 
}

@media (min-width: 900px) {
    .block-pricing__grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        max-width: 1200px;
        margin: 0 auto;
        overflow-x: visible;
        padding: 0 1.5rem;
    }
}

/* --- CARD DESIGN --- */
.pricing-card {
    position: relative; 
    flex: 0 0 80vw; 
    max-width: 380px;
    scroll-snap-align: center;
    scroll-snap-stop: normal;
    
    background: rgba(15, 23, 42, 0.6); 
    backdrop-filter: blur(12px);       
    -webkit-backdrop-filter: blur(12px);
    
    border: 1px solid var(--c-accent, #c5a059); 
    border-radius: 4px;
    padding: 2.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    
    background-size: cover;
    background-position: center;
    overflow: hidden; 
}

/* --- CARD WITH IMAGE VARIANT --- */
.pricing-card--has-bg {
    background-color: transparent; 
    border-color: rgba(197, 160, 89, 0.5); 
}

/* THE MATTED OVERLAY (Default State) */
.pricing-card--has-bg::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    
    /* Strong tint + Blur to keep text readable */
    background: rgba(11, 17, 36, 0.8); 
    backdrop-filter: blur(5px); 
    z-index: 1;
    
    /* ANIMATION: Prepare for the hover change */
    transition: background 0.4s ease, backdrop-filter 0.4s ease;
}

/* HOVER STATE: REVEAL THE IMAGE */
.pricing-card--has-bg:hover::before {
    /* Reduce tint significantly */
    background: rgba(11, 17, 36, 0.4); 
    /* Remove blur completely */
    backdrop-filter: blur(0px);
}

.pricing-card > * {
    position: relative;
    z-index: 2;
    /* Optional: Add a slight shadow to text so it remains readable even when image is clear */
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

@media (min-width: 900px) {
    .pricing-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 15px 40px rgba(0,0,0,0.4); 
    }
}

/* --- TYPOGRAPHY & BUTTONS --- */
.pricing-card__title {
    color: var(--c-accent, #c5a059);
    font-size: 1.1rem;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    margin-bottom: 1.5rem;
    position: relative;
    padding-bottom: 1rem;
}

.pricing-card__title::after {
    content: '';
    position: absolute;
    bottom: 0; left: 50%;
    transform: translateX(-50%);
    width: 30px;
    height: 1px;
    background: rgba(255,255,255,0.3);
}

.pricing-card__price {
    color: var(--c-text-light, #ffffff);
    margin-bottom: 2rem;
    font-family: serif; 
}

.pricing-card__price .amount { font-size: 2.5rem; font-weight: 700; }
.pricing-card__price .period { font-size: 0.9rem; color: rgba(255,255,255,0.7); text-transform: uppercase; }

.pricing-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 2.5rem 0;
    flex-grow: 1; 
}

.pricing-card__features li {
    color: var(--c-text-body, #e2e8f0);
    font-size: 0.95rem;
    margin-bottom: 0.75rem;
    line-height: 1.4;
}

.pricing-card__btn {
    display: inline-block;
    padding: 0.8rem 2rem;
    background: var(--c-accent, #c5a059);
    color: #000;
    text-decoration: none;
    text-transform: uppercase;
    font-weight: bold;
    font-size: 0.9rem;
    border-radius: 2px;
    width: 100%;
}
/* =========================================
   BLOCK ANIMATIONS (Default: Staggered Fade Up)
   ========================================= */

/* 1. INITIAL STATE (Hidden) */
/* Only applies if the PHP logic added the 'reveal-group' class */
.block-pricing.reveal-group .block-pricing__header,
.block-pricing.reveal-group .pricing-card {
    opacity: 0;
    transform: translateY(40px);
    
    /* Smooth Physics */
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), 
                transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* 2. ACTIVE STATE (Visible) */
/* Triggered by JS adding 'reveal-active' */
.block-pricing.reveal-active .block-pricing__header,
.block-pricing.reveal-active .pricing-card {
    opacity: 1;
    transform: translateY(0);
}

/* 3. STAGGERED DELAYS (The "Construction" Effect) */
/* Header appears first */
.block-pricing.reveal-active .block-pricing__header {
    transition-delay: 0.1s;
}

/* Cards cascade in one by one */
.block-pricing.reveal-active .pricing-card:nth-child(1) { transition-delay: 0.2s; }
.block-pricing.reveal-active .pricing-card:nth-child(2) { transition-delay: 0.3s; }
.block-pricing.reveal-active .pricing-card:nth-child(3) { transition-delay: 0.4s; }
.block-pricing.reveal-active .pricing-card:nth-child(4) { transition-delay: 0.5s; }