/* 
   CVP Properties Website Upgrade
   Standardization & Modernization for Homepage Slider and About Story Cards
   Features: Minimalist Design, Smooth 6s Transitions, Responsive Layout, High Contrast.
*/

/* ========================================= */
/* 1. SLIDER CONTAINER & LAYOUT              */
/* ========================================= */

.sl-slider-wrapper {
    position: relative;
    width: 100%;
    /* Reduced height as requested (approx 85% of viewport),
       keeping it modern but slightly smaller than full screen */
    height: 85vh;
    min-height: 600px;
    /* Ensure visibility on small screens */
    overflow: hidden;
}

/* Ensure slides stack correctly for fade transition */
.sl-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    transition: opacity 1.5s ease-in-out, visibility 1.5s ease-in-out;
    opacity: 0;
    visibility: hidden;
    z-index: 1;
    /* Default behind */
}

.sl-slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
    /* Active on top */
}

/* Flexbox Centering for Captions */
.sl-slide .slide-caption {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    z-index: 20;
    padding: 0 40px;
    box-sizing: border-box;
}

/* Dynamic Gradient Overlay - INCREASED DARKNESS for better contrast */
/* This ensures text pops against any background image */
.hero-gradient-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.2) 50%, rgba(0, 0, 0, 0.6) 100%);
    z-index: 10;
    pointer-events: none;
}

/* ========================================= */
/* 2. TRANSITION & OPACITY HANDLING          */
/* ========================================= */

.sl-slide {
    display: block !important;
    /* Override inline styles from old JS */
    opacity: 0;
    z-index: 1;
    transition: opacity 1.5s ease-in-out;
    visibility: visible !important;
}

.sl-slide.active {
    opacity: 1;
    z-index: 10;
}

/* Ensure the first slide is visible if JS hasn't loaded yet, or strictly controlled by JS class */
.sl-slide:first-child:not(.active) {
    opacity: 0;
    /* Let JS handle the active class adding */
}


/* ========================================= */
/* 3. MINIMALIST CAPTION CARD DESIGN         */
/* ========================================= */

.caption-content {
    max-width: 900px;
    width: 90%;
    margin: 0 auto;
    padding: 50px 40px;
    color: #ffffff;

    /* Translucent Background Box (Uniform Size) */
    background: rgba(0, 0, 0, 0.45);
    /* Dark translucent background */
    backdrop-filter: blur(8px);
    /* Modern glass blur */
    -webkit-backdrop-filter: blur(8px);
    border-radius: 12px;
    /* Soft rounded corners */
    border: 1px solid rgba(255, 255, 255, 0.15);
    /* Subtle border */

    /* Ensure uniform visual weight */
    min-height: 400px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    /* Shadow for depth */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);

    /* Animation: Entrance */
    opacity: 0;
    animation: fadeInUpSmooth 1.2s ease forwards;
    animation-delay: 0.5s;
    /* Wait briefly for slide transition */
}


/* ========================================= */
/* 4. TYPOGRAPHY & TEXT EFFECTS              */
/* ========================================= */

.slide-caption h1 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 800;
    /* Extra bold for readability */
    font-size: 4.2em;
    /* Large and prominent */
    line-height: 1.1;
    margin-bottom: 25px;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #ffffff;
    /* Strong drop shadow for high contrast */
    text-shadow: 0 4px 20px rgba(0, 0, 0, 1);
}

.slide-caption h2 {
    font-family: 'Open Sans', sans-serif;
    font-weight: 600;
    font-size: 2.0em;
    line-height: 1.4;
    margin-bottom: 30px;
    color: #ffffff;
    position: relative;
    display: inline-block;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 1);
}

/* Decorative Divider (Optional, kept minimal) */
.slide-caption h2::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background: #ffffff;
    margin: 25px auto 0;
    opacity: 0.8;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
}

.slide-caption span {
    font-family: 'Open Sans', sans-serif;
    font-size: 1.5rem;
    font-weight: 600;
    display: block;
    margin-bottom: 35px;
    color: #ffffff;
    letter-spacing: 0.5px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.9);
}

/* ========================================= */
/* 5. BUTTONS & INTERACTION                  */
/* ========================================= */

/* HIDE NAVIGATION ARROWS & DOTS (Fully Automatic) */
.nav-arrows,
.nav-dots,
#nav-arrows,
.sl-prev,
.sl-next {
    display: none !important;
}

.hero-cta-group {
    display: flex;
    justify-content: center;
    gap: 25px;
    margin-top: 40px;
    flex-wrap: wrap;

    /* Animation: Buttons slide in after text */
    opacity: 0;
    animation: fadeInUpSmooth 0.8s ease forwards;
    animation-delay: 1.0s;
}

.hero-btn-primary,
.hero-btn-outline {
    display: inline-block;
    padding: 18px 45px;
    /* Comfortable click area */
    border-radius: 50px;
    font-family: 'Open Sans', sans-serif;
    font-size: 15px;
    font-weight: 700;
    text-transform: uppercase;
    text-decoration: none !important;
    transition: all 0.3s ease;
    cursor: pointer;
    letter-spacing: 1.5px;
    min-width: 200px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Primary Button (Solid White) - Prominent/Readable */
.hero-btn-primary {
    background-color: #ffffff;
    color: #2c3e50;
    border: 3px solid #ffffff;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.hero-btn-primary:hover {
    background-color: #f2f2f2;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
}

/* Outline Button (Glassy) */
.hero-btn-outline {
    background-color: rgba(0, 0, 0, 0.3);
    color: #ffffff;
    border: 3px solid #ffffff;
    backdrop-filter: blur(4px);
}

.hero-btn-outline:hover {
    background-color: rgba(255, 255, 255, 0.15);
    border-color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

/* ========================================= */
/* 6. ANIMATIONS                             */
/* ========================================= */

@keyframes fadeInUpSmooth {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================= */
/* 7. RESPONSIVE ADJUSTMENTS                 */
/* ========================================= */

@media (max-width: 992px) {
    .sl-slider-wrapper {
        height: 75vh;
    }

    .slide-caption h1 {
        font-size: 3.0em;
    }

    .caption-content {
        padding: 30px;
    }
}

@media (max-width: 768px) {
    .sl-slider-wrapper {
        height: 80vh;
        /* More height on mobile for content stacking */
    }

    .caption-content {
        padding: 20px;
    }

    .slide-caption h1 {
        font-size: 2.2em;
        margin-bottom: 15px;
    }

    .slide-caption h2 {
        font-size: 1.4em;
        margin-bottom: 20px;
    }

    .slide-caption span {
        font-size: 1.2em;
        margin-bottom: 25px;
    }

    .hero-cta-group {
        gap: 15px;
        margin-top: 25px;
    }

    .hero-btn-primary,
    .hero-btn-outline {
        width: 100%;
        max-width: 300px;
        padding: 15px 25px;
        font-size: 14px;
    }
}

/* ========================================= */
/* 8. STORY CARD IMAGE (Resized as requested) */
/* ========================================= */

.about-story-card {
    text-align: center;
    margin-bottom: 40px;
    padding: 20px;
    transition: transform 0.3s ease;
}

.about-story-card:hover {
    transform: translateY(-5px);
}

.about-story-card img {
    width: 120px;
    /* Smaller size */
    height: 120px;
    object-fit: cover;
    border-radius: 50%;
    border: 4px solid rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 20px;
    display: inline-block;
    transition: all 0.3s ease;
}

.about-story-card img:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
    border-color: #ffffff;
}