/**
 * CBT Hero Banner Styles
 * Full-width hero with crossfading slides (image + text per slide).
 * Eventbrite-inspired design with rounded corners.
 *
 * @package CBT_Events_Marketplace
 * @since 5.7.14
 */

/* ============================================
   HERO BANNER CONTAINER
   ============================================ */

.cbt-hero-banner {
    position: relative;
    width: calc(100% - 48px);
    max-width: 1400px;
    height: 480px;
    margin: 16px auto 28px;
    overflow: hidden !important;
    background: #1a1a2e;
    border-radius: 16px !important;
}

/* Full-width variant — edge-to-edge, breaks out of any container */
.cbt-hero-banner.cbt-hero-fullwidth {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(-50vw + 50%) !important;
    margin-right: calc(-50vw + 50%) !important;
    margin-top: 0 !important;
    margin-bottom: 0 !important;
    border-radius: 0 !important;
}

.cbt-hero-banner.cbt-hero-fullwidth .cbt-hero-overlay {
    border-radius: 0;
}

/* ============================================
   BACKGROUND IMAGES (crossfade)
   ============================================ */

.cbt-hero-bg {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    z-index: 1;
}

.cbt-hero-bg.active {
    opacity: 1;
}

/* ============================================
   OVERLAY
   ============================================ */

.cbt-hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: 16px;
}

/* ============================================
   CONTENT
   ============================================ */

.cbt-hero-content {
    position: relative;
    z-index: 3;
    max-width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 0 60px;
}

.cbt-hero-text {
    max-width: 560px;
}

/* Alignment variants */
.cbt-hero-align-center .cbt-hero-content {
    justify-content: center;
    text-align: center;
}

.cbt-hero-align-center .cbt-hero-text {
    max-width: 700px;
}

/* ============================================
   HEADLINE
   ============================================ */

.cbt-hero-headline {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 48px;
    font-weight: 800;
    line-height: 1.15;
    margin: 0 0 14px;
    color: inherit;
    letter-spacing: -0.5px;
}

/* ============================================
   SUBTITLE
   ============================================ */

.cbt-hero-subtitle {
    font-size: 18px;
    line-height: 1.5;
    margin: 0 0 24px;
    opacity: 0.9;
    color: inherit;
    font-weight: 400;
}

/* ============================================
   CTA BUTTON
   ============================================ */

.cbt-hero-cta {
    display: inline-block;
    padding: 14px 32px;
    background: #fff;
    color: #1a1a2e !important;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    text-decoration: none !important;
    transition: all 0.25s ease;
    border: 2px solid transparent;
}

.cbt-hero-cta:hover {
    background: transparent;
    color: #fff !important;
    border-color: #fff;
    text-decoration: none !important;
    transform: translateY(-1px);
}

/* ============================================
   TEXT FADE ANIMATION (on slide change)
   ============================================ */

.cbt-hero-text {
    animation: cbtHeroFadeIn 0.6s ease-out;
}

.cbt-hero-text.cbt-text-exit {
    animation: cbtHeroFadeOut 0.4s ease-in forwards;
}

.cbt-hero-text.cbt-text-enter {
    animation: cbtHeroFadeIn 0.6s ease-out forwards;
}

@keyframes cbtHeroFadeIn {
    from { opacity: 0; transform: translateY(15px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes cbtHeroFadeOut {
    from { opacity: 1; transform: translateY(0); }
    to   { opacity: 0; transform: translateY(-10px); }
}

/* ============================================
   TABLET
   ============================================ */

@media (max-width: 1024px) {
    .cbt-hero-banner {
        height: 400px;
        width: calc(100% - 32px);
        border-radius: 12px;
    }
    
    .cbt-hero-headline {
        font-size: 38px;
    }
    
    .cbt-hero-subtitle {
        font-size: 16px;
    }
    
    .cbt-hero-content {
        padding: 0 40px;
    }
}

/* ============================================
   MOBILE
   ============================================ */

@media (max-width: 768px) {
    .cbt-hero-banner {
        height: 280px;
        width: calc(100% - 24px);
        margin: 20px auto 20px;
        border-radius: 12px;
    }
    
    .cbt-hero-bg {
        background-position: center 20%;
    }
    
    .cbt-hero-content {
        padding: 0 24px;
        align-items: flex-end;
        padding-bottom: 32px;
    }
    
    .cbt-hero-headline {
        font-size: 28px;
        line-height: 1.2;
        letter-spacing: -0.3px;
    }
    
    .cbt-hero-subtitle {
        font-size: 14px;
        margin-bottom: 16px;
        line-height: 1.4;
    }
    
    .cbt-hero-cta {
        padding: 10px 24px;
        font-size: 14px;
        border-radius: 6px;
    }
    
    .cbt-hero-text {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .cbt-hero-banner {
        height: 280px;
        width: calc(100% - 16px);
        margin: 24px auto 16px;
        border-radius: 10px;
    }
    
    .cbt-hero-bg {
        background-position: center 20%;
    }
    
    .cbt-hero-content {
        padding: 0 16px 24px;
    }
    
    .cbt-hero-headline {
        font-size: 24px;
    }
    
    .cbt-hero-subtitle {
        font-size: 13px;
        margin-bottom: 14px;
    }
    
    .cbt-hero-cta {
        padding: 9px 20px;
        font-size: 13px;
    }
}
