/* ==========================================================
   MaRadha Scroll Zoom Banner - Stylesheet
   ========================================================== */

/* Remove default margins/paddings from Elementor parent containers for full-width capability */
.elementor-widget-maradha_banner_expand,
.elementor-widget-maradha_banner_expand .elementor-widget-container {
    padding: 0 !important;
    margin: 0 !important;
}

/* Main Scrollable Track (Desktop) */
.maradha-banner-expand-section {
    position: relative;
    width: 100%;
    box-sizing: border-box;
}

/* Viewport Sticky Frame container */
.maradha-banner-expand-sticky {
    position: -webkit-sticky;
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    z-index: 2;
    box-sizing: border-box;
}

/* Expanding Card (sizes dynamically scale using --expand-progress CSS custom property) */
.maradha-banner-expand-card {
    position: relative;
    /* Shape progress: reaches 1.0 (full screen) exactly halfway through the scroll (0.5 progress) */
    --shape-progress: clamp(0, var(--expand-progress, 0) * 2, 1);
    
    /* Scales from --boxed-width to 100vw */
    width: calc(var(--boxed-width, 1140px) + (100vw - var(--boxed-width, 1140px)) * var(--shape-progress));
    /* Scales from --boxed-height to --sticky-height */
    height: calc(var(--boxed-height, 600px) + (var(--sticky-height, 100vh) - var(--boxed-height, 600px)) * var(--shape-progress));
    max-width: 100%;
    max-height: 100%;
    /* Radius goes from --boxed-radius to 0 */
    border-radius: calc(var(--boxed-radius, 8px) * (1 - var(--shape-progress)));
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
    box-sizing: border-box;
    transition: width 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
                height 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
                border-radius 0.35s cubic-bezier(0.25, 0.8, 0.25, 1),
                box-shadow 0.3s ease;
}

/* Slide background image layer */
.maradha-banner-expand-card-inner {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    /* Parallax scale effect zoom based on progress */
    transform: scale(calc(1 + 0.12 * var(--expand-progress, 0)));
    transition: transform 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Dark Overlay for Text Visibility */
.maradha-banner-expand-card-inner::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.45);
    z-index: 1;
    transition: background-color 0.4s ease;
}

/* Content Container */
.maradha-banner-expand-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
    width: 100%;
    max-width: 800px;
    padding: 0 40px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
}

/* Subtitle / Tagline */
.maradha-banner-expand-content .subtitle {
    display: block;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.25em;
    color: #c5a880;
    margin-bottom: 1.2rem;
}

/* Heading / Title */
.maradha-banner-expand-content .title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 3.5rem;
    font-weight: 300;
    line-height: 1.25;
    margin: 0;
    text-transform: uppercase;
}

/* Details block (Description + Button) - starts hidden, reveals as container expands */
.maradha-banner-expand-details {
    margin-top: 1.5rem;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-sizing: border-box;
    
    /* Calculate progress based on dynamic start and scale variables */
    --start: var(--details-start, 0.5);
    --scale: var(--details-scale, 2);
    --details-progress: clamp(0, (var(--expand-progress, 0) - var(--start)) * var(--scale), 1);
    
    opacity: var(--details-progress);
    transform: translateY(calc(30px * (1 - var(--details-progress))));
    pointer-events: none; /* Disable button clicks while invisible */
}

/* Enable button click events once expanded */
.is-fully-expanded .maradha-banner-expand-details {
    pointer-events: auto;
}

/* Description Text */
.maradha-banner-expand-content .desc {
    font-family: 'Outfit', sans-serif;
    font-size: 1.05rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.85);
    margin: 0 0 2rem 0;
    max-width: 600px;
}

/* Action Button */
.maradha-banner-expand-content .btn-gold {
    display: inline-block;
    padding: 14px 32px;
    background-color: transparent;
    color: #ffffff;
    font-family: 'Outfit', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    text-decoration: none;
    border: 1px solid #ffffff;
    cursor: pointer;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

.maradha-banner-expand-content .btn-gold:hover {
    background-color: #ffffff;
    color: #000000;
    border-color: #ffffff;
}

/* ==========================================================
   Responsive Adaptations - Tablet & Mobile Viewports
   ========================================================== */

@media (max-width: 1024px) {
    /* Disable Scroll pinning / sticky track */
    .maradha-banner-expand-section {
        height: auto !important;
    }

    .maradha-banner-expand-sticky {
        position: relative !important;
        height: auto !important;
        padding: 0 !important; /* Remove padding to eliminate black borders */
        background-color: transparent !important; /* Remove black border background */
    }

    /* Force card to fill width at a nice static height */
    .maradha-banner-expand-card {
        width: 100% !important;
        height: auto !important;
        min-height: 480px;
        border-radius: 0 !important;
        box-shadow: none;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: none !important; /* Remove any width/height transition effects on mobile/tablet */
    }

    .maradha-banner-expand-card-inner {
        position: relative;
        padding: 80px 24px; /* Internal content padding */
        min-height: 480px;
        width: 100%;
        transform: none !important; /* Remove parallax zoom scale on mobile/tablet */
        transition: none !important;
    }

    .maradha-banner-expand-content {
        padding: 0;
    }

    .maradha-banner-expand-content h2.title {
        font-size: 2.2rem;
    }

    /* Keep details always visible on mobile */
    .maradha-banner-expand-details {
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
        transition: none !important;
    }

    .maradha-banner-expand-content .desc {
        font-size: 0.95rem;
        margin-bottom: 1.5rem;
    }
}
