/*
 * DT Hero Banner Styles
 * (Corrected layout - removed negative margin)
 */

/* --- Default Desktop Styles --- */
.dt-hero-banner {
    position: relative;
    color: #fff;
    overflow: hidden;
    min-height: 90vh;
    display: flex;
    align-items: center;
    
    /* --- Full-width rules --- */
    width: 100vw;
    margin-left: calc(50% - 50vw);
    
    margin-top: -50px;
    /* This allows it to sit naturally below the header */
}

/* --- 1. Main Background Wrapper --- */
.dt-hero-video {
    position: absolute;
    inset: 0;
    z-index: 1;
    background-color: #55426b;
    overflow: hidden;
}
.dt-hero-poster {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: 3;
    transition: opacity 0.4s ease, visibility 0.4s ease;
    pointer-events: none;
}
.dt-hero-poster.is-hidden {
    opacity: 0;
    visibility: hidden;
}
.dt-hero-video__iframe-wrap {
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 1;
}
.vimeo-player {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 177.78vh;
    height: 100vh;
    min-width: 100%;
    min-height: 100%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}
.video-overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(106, 76, 137, 0.5);
    z-index: 2;
    pointer-events: none;
}

/* --- Content (Desktop) --- */
.dt-hero-mobile-title {
    display: none; /* Hide mobile title on desktop */
}
.dt-hero-desktop-title {
    display: block; /* Show desktop title */
}
.dt-hero-content {
    position: relative; /* Sits on top of video */
    z-index: 4;
    text-align: left;
    max-width: 700px;
    padding: 2rem 20px;
    margin-right: auto;
    margin-left: 10%;
}
.dt-hero-content h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1rem;
    color: #fff;
    font-family: 'Fredoka', sans-serif;
}
.dt-hero-content p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    color: #f0f0f0;
    font-family: 'Poppins', sans-serif;
}

/* --- Scroller (Desktop) --- */
.dt-hero-scroller-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #ffffff; /* <--- THIS IS THE FIX */
    padding: 1.5rem 0;
    z-index: 4;
}

/* --- Buttons (Shared) --- */
.dt-hero1-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}
.dt-hero-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 999px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent; /* Prepare for border */
    font-family: 'Poppins', sans-serif;
}

/* PRIMARY: Solid Purple */
.dt-hero-button-primary {
    background-color: #6a4c89;
    color: #fff;
    border-color: #6a4c89;
}
.dt-hero-button-primary:hover {
    background-color: #553b70;
    border-color: #553b70;
    color: #fff;
}

/* SECONDARY: White BG, Dark Text, Purple Border */
.dt-hero-button-secondary {
   background-color: #6a4c89 !important;
    color: #ffffff; /* Dark Text */
    border: 2px solid #6a4c89; /* Light Purple Border */
}
.dt-hero-button-secondary:hover {
    background-color: #553b70 !important;
    color: #ffffff;
    border-color: #6a4c89;
}

/* --- 8. Responsive (NEW MOBILE STACK) --- */
@media (max-width: 768px) {
    /* 1. Main banner is now a block */
    .dt-hero-banner {
        display: block;
        min-height: auto;
        width: 100%; /* Reset full-width properties */
        margin-left: 0;
    }

    /* 2. The mobile title block */
    .dt-hero-mobile-title {
        display: block;
        background: #fff; /* White background */
        padding: 2rem 1.5rem 1.5rem;
        text-align: center;
    }
    .dt-hero-mobile-title h1 {
        color: #000; /* Black text */
        font-size: 2.2rem;
        line-height: 1.2;
        margin: 0;
        font-family: 'Fredoka', sans-serif;
    }
    
    /* 3. The image/video area */
    .dt-hero-video {
        position: relative; /* No longer absolute */
        min-height: 450px; 
        display: block; /* No flex */
    }
    
    /* 4. The content block (subtitle/buttons) */
    .dt-hero-desktop-title {
        display: none; /* Hide the desktop title */
    }
    .dt-hero-content {
        position: relative; /* No longer absolute */
        z-index: 4;
        background: #333; /* Dark background */
        
        margin: 0; /* Reset desktop margins */
        max-width: none;
        text-align: center;
        padding: 1.5rem 1.5rem 2rem; /* Add padding */
    }
    .dt-hero-content p {
        font-size: 1rem;
        color: #fff; /* White text */
        font-family: 'Poppins', sans-serif;
    }
    .dt-hero-buttons {
        justify-content: center;
    }
    .dt-hero-button {
        width: 100%;
        max-width: 300px;
    }

    /* 5. The scroller (Mobile) */
    .dt-hero-scroller-wrapper {
        position: relative; /* Stacks normally */
        background-color: rgba(255, 255, 255, 0.9);
        padding: 1.5rem 0;
        z-index: 4;
    }

    /* 6. Mobile Video Rules */
    .dt-hero-video__iframe-wrap {
        display: none !important; /* Hide video */
    }
    .dt-hero-poster,
    .dt-hero-poster.is-hidden {
        opacity: 1 !important; /* Show poster */
        visibility: visible !important;
    }
    /* Hide the purple overlay, we don't need it on mobile */
    .video-overlay {
        display: none;
    }
}
/* ===================================================================
   NEW: Contained Layout Override
=================================================================== */

/*
 * This targets the banner when "Contained" is selected.
 * It resets the full-width styles.
*/
.dt-hero-banner.dt-hero-layout-contained {
    width: 100%;
    margin-left: 0;
    
    /* This makes it fit nicely inside the course player */
    border-radius: 8px; 
    min-height: 400px; /* Give it a reasonable default height */
}

/* We also need to hide the mobile-specific title block */
.dt-hero-banner.dt-hero-layout-contained .dt-hero-mobile-title {
    display: none;
}

/* And make the main content title visible on mobile */
.dt-hero-banner.dt-hero-layout-contained .dt-hero-desktop-title {
    display: block;
}
/* This hides the poster image when the video is playing */
.dt-hero-banner .dt-hero-poster {
  opacity: 1;
  transition: opacity 0.5s ease;
  z-index: 2; /* Make sure poster is on top to start */
}

.dt-hero-banner .dt-hero-video__iframe-wrap {
  z-index: 1; /* Video is behind poster */
}

.dt-hero-banner.video-is-playing .dt-hero-poster {
  opacity: 0;
  z-index: -1; /* Move poster behind video */
}