/* ========================================
   HERO V2 — FLEXBOX-FIRST CAROUSEL
   Component: home-hero-v2
   ======================================== */

.hero-v2 {
    position: relative;
    width: 100%;
    height: 60vh;
    min-height: 420px;
    max-height: 750px;
    overflow: hidden;
    background: #002a20;
}

/* Background Image Layers */
.hero-v2__bg-layer {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.hero-v2__bg-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    opacity: 0;
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: opacity;
    transform: scale(1.03);
}

.hero-v2__bg-slide.active {
    opacity: 1;
    transform: scale(1);
    transition: opacity 1s cubic-bezier(0.4, 0, 0.2, 1), transform 8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Gradient Overlay */
.hero-v2__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background: linear-gradient(160deg,
            rgba(0, 42, 32, 0.88) 0%,
            rgba(0, 50, 40, 0.65) 35%,
            rgba(0, 55, 45, 0.50) 55%,
            rgba(0, 42, 32, 0.78) 100%);
    pointer-events: none;
}

/* ========================================
   CONTENT — FLEXBOX LAYOUT
   ========================================
   Logo + text + buttons are a single flex column.
   No absolute positioning. No fixed heights.
   Content is always vertically centered.
   ======================================== */
.hero-v2__content {
    position: relative;
    z-index: 3;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    padding: 60px 24px 64px;
}

/* Slide Content — only active one is visible */
.hero-v2__slide {
    display: none;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 640px;
    width: 100%;
    gap: 0;
}

.hero-v2__slide.active {
    display: flex;
    animation: heroFadeIn 0.7s ease-out;
}

@keyframes heroFadeIn {
    from {
        opacity: 0;
        transform: translateY(8px);
    }

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

/* Course Logo */
.hero-v2__logo {
    width: 130px;
    height: 130px;
    object-fit: contain;
    border-radius: 28px;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.90));
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow:
        0 16px 48px rgba(0, 0, 0, 0.35),
        0 6px 20px rgba(0, 0, 0, 0.20),
        inset 0 1px 0 rgba(255, 255, 255, 0.7);
    margin-bottom: 24px;
    flex-shrink: 0;
}

/* Course Name */
.hero-v2__name {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #d4af37;
    margin-bottom: 12px;
    opacity: 0.9;
}

/* Fallback h1 when no logo is provided */
.hero-v2__name-heading {
    font-size: 22px;
    font-weight: 700;
    color: #ffffff;
    margin-bottom: 14px;
    text-shadow:
        0 2px 16px rgba(0, 0, 0, 0.7),
        0 1px 3px rgba(0, 0, 0, 0.6);
}

/* Description */
.hero-v2__description {
    font-size: 20px;
    font-weight: 500;
    line-height: 1.55;
    color: #ffffff;
    margin-bottom: 0;
    text-shadow:
        0 2px 16px rgba(0, 0, 0, 0.7),
        0 1px 3px rgba(0, 0, 0, 0.6);
}

/* CTA Buttons */
.hero-v2__actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
    max-width: 320px;
    margin-top: 28px;
}

.hero-v2__btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 54px;
    padding: 14px 28px;
    font-family: inherit;
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.01em;
    text-decoration: none;
    white-space: nowrap;
    border-radius: 14px;
    border: none;
    cursor: pointer;
    transition: transform 0.15s ease, box-shadow 0.2s ease;
    -webkit-tap-highlight-color: transparent;
}

.hero-v2__btn:active {
    transform: scale(0.97);
}

.hero-v2__btn--primary {
    background: #d4af37;
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(212, 175, 55, 0.3);
}

.hero-v2__btn--primary:hover {
    box-shadow: 0 6px 24px rgba(212, 175, 55, 0.45);
    transform: translateY(-1px);
}

.hero-v2__btn--secondary {
    background: rgba(0, 65, 50, 0.85);
    color: #ffffff;
    border: 1px solid rgba(212, 175, 55, 0.5);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.hero-v2__btn--secondary:hover {
    background: rgba(0, 65, 50, 0.95);
    color: #ffffff;
    border-color: rgba(212, 175, 55, 0.8);
    transform: translateY(-1px);
}

.hero-v2__btn-icon {
    font-size: 18px;
    line-height: 1;
    display: flex;
    align-items: center;
}

/* ========================================
   CAROUSEL CONTROLS
   Mobile-first: pill bar with arrows + dots
   ======================================== */
.hero-v2__controls {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 16px;
    background: rgba(0, 30, 25, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.10);
}

.hero-v2__nav-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    color: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    padding: 0;
    flex-shrink: 0;
}

.hero-v2__nav-btn:hover {
    background: rgba(255, 255, 255, 0.22);
}

.hero-v2__nav-btn svg {
    width: 16px;
    height: 16px;
}

.hero-v2__dots {
    display: flex;
    gap: 8px;
    align-items: center;
}

.hero-v2__dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.30);
    border: none;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-v2__dot:hover {
    background: rgba(255, 255, 255, 0.55);
}

.hero-v2__dot.active {
    background: #d4af37;
    box-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
    transform: scale(1.35);
}

/* Screen reader only */
.hero-v2__sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* ========================================
   RESPONSIVE — MOBILE
   ======================================== */
@media (max-width: 768px) {
    .hero-v2 {
        height: 85dvh;
        min-height: unset;
        max-height: none;
    }

    .hero-v2__content {
        padding: 80px 20px 100px;
    }

    .hero-v2__logo {
        width: 110px;
        height: 110px;
        padding: 14px;
        border-radius: 26px;
        margin-bottom: 20px;
    }

    .hero-v2__name {
        font-size: 12px;
        margin-bottom: 10px;
    }

    .hero-v2__description {
        font-size: 17px;
        line-height: 1.6;
        padding: 0 8px;
    }

    .hero-v2__actions {
        max-width: 300px;
        margin-top: 24px;
        gap: 10px;
    }

    .hero-v2__btn {
        min-height: 50px;
        font-size: 15px;
        border-radius: 13px;
    }

    .hero-v2__controls {
        bottom: 18px;
        padding: 10px 14px;
        gap: 10px;
    }

    .hero-v2__nav-btn {
        width: 32px;
        height: 32px;
    }

    .hero-v2__dot {
        width: 7px;
        height: 7px;
    }
}

@media (max-width: 390px) {
    .hero-v2__content {
        padding: 70px 16px 85px;
    }

    .hero-v2__logo {
        width: 95px;
        height: 95px;
        padding: 12px;
        margin-bottom: 16px;
    }

    .hero-v2__description {
        font-size: 15px;
    }

    .hero-v2__actions {
        max-width: 270px;
        margin-top: 20px;
    }
}

/* ========================================
   RESPONSIVE — DESKTOP
   ======================================== */
@media (min-width: 769px) {
    .hero-v2__slide {
        flex-direction: column;
        max-width: 800px;
    }

    .hero-v2__logo {
        width: 150px;
        height: 150px;
        border-radius: 32px;
        margin-bottom: 28px;
    }

    .hero-v2__name {
        font-size: 14px;
        margin-bottom: 14px;
    }

    .hero-v2__description {
        font-size: 22px;
    }

    .hero-v2__actions {
        flex-direction: row;
        max-width: 560px;
        gap: 16px;
        margin-top: 32px;
    }

    .hero-v2__btn {
        min-height: 48px;
        border-radius: 24px;
        padding: 12px 36px;
    }

    /* Desktop: break wrapper, arrows to sides, dots to bottom */
    .hero-v2__controls {
        display: contents;
    }

    .hero-v2__nav-btn {
        position: absolute;
        top: 50%;
        transform: translateY(-50%);
        z-index: 10;
        width: 48px;
        height: 48px;
        background: rgba(0, 30, 25, 0.4);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border: 1px solid rgba(255, 255, 255, 0.12);
        color: rgba(255, 255, 255, 0.6);
        opacity: 0;
        transition: all 0.25s ease;
    }

    .hero-v2:hover .hero-v2__nav-btn {
        opacity: 1;
    }

    .hero-v2__nav-btn:hover {
        background: rgba(0, 30, 25, 0.65);
        color: #ffffff;
        border-color: rgba(255, 255, 255, 0.25);
        transform: translateY(-50%) scale(1.08);
    }

    .hero-v2__prev {
        left: 24px;
    }

    .hero-v2__next {
        right: 24px;
    }

    .hero-v2__nav-btn svg {
        width: 22px;
        height: 22px;
    }

    .hero-v2__dots {
        position: absolute;
        bottom: 20px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 10;
        gap: 10px;
    }

    .hero-v2__dot {
        width: 7px;
        height: 7px;
    }
}