/**
 * Hydroposhan Academy — unified hero (homepage photo slider + inner page heroes)
 * Load after tokens, header-premium, site-responsive; before site-typography.
 */

/* —— Homepage full-bleed hero (photo slider + glass content card) —— */
html.ha-unified body.page-home section.hero {
    position: relative;
    min-height: min(100vh, 920px);
    min-height: min(100dvh, 920px);
    min-height: min(calc(var(--ha-vh, 1vh) * 100), 920px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--site-fixed-header-offset, 7.5rem) + clamp(24px, 4vw, 48px)) 0 clamp(100px, 14vw, 128px);
    overflow: hidden;
    isolation: isolate;
    background: var(--dark-green, #004b04);
}

html.ha-unified body.page-home section.hero .hero-bg-slider {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
}

html.ha-unified body.page-home section.hero .hero-slide {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
    transform: scale(1);
    filter: contrast(1.04) saturate(1.06) brightness(1.05);
}

html.ha-unified body.page-home section.hero .hero-slide.is-active {
    opacity: 1;
}

html.ha-unified body.page-home section.hero.hero--interactive .hero-slide {
    animation: none !important;
}

html.ha-unified body.page-home section.hero .hero-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        radial-gradient(ellipse 70% 60% at 50% 40%, rgba(0, 20, 5, 0.12) 0%, rgba(0, 5, 0, 0.48) 100%),
        linear-gradient(180deg, rgba(0, 30, 10, 0.35) 0%, rgba(0, 10, 5, 0.55) 100%);
}

html.ha-unified body.page-home section.hero .container.relative {
    position: relative;
    z-index: 2;
}

html.ha-unified body.page-home section.hero .hero-content {
    position: relative;
    max-width: min(1040px, 94vw);
    padding: clamp(28px, 5vw, 52px) clamp(22px, 4vw, 48px) clamp(32px, 5vw, 56px) !important;
    margin: 0 auto;
    background: rgba(0, 22, 10, 0.42) !important;
    backdrop-filter: blur(14px) saturate(1.15) !important;
    -webkit-backdrop-filter: blur(14px) saturate(1.15) !important;
    border: 1px solid rgba(167, 243, 208, 0.22) !important;
    border-radius: clamp(20px, 3vw, 28px) !important;
    box-shadow:
        0 28px 60px rgba(0, 0, 0, 0.45),
        inset 0 1px 0 rgba(255, 255, 255, 0.08) !important;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.45s ease;
}

html.ha-unified body.page-home section.hero .hero-content::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.06) 0%, transparent 42%, rgba(52, 211, 153, 0.04) 100%);
    pointer-events: none;
}

html.ha-unified body.page-home section.hero .hero-content:hover {
    transform: translateY(-4px);
    box-shadow:
        0 36px 72px rgba(0, 0, 0, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.1) !important;
}

html.ha-unified body.page-home section.hero .hero-subtitle {
    font-size: clamp(0.72rem, 1.6vw, 0.95rem) !important;
    letter-spacing: 0.28em !important;
    margin-bottom: clamp(18px, 3vw, 28px) !important;
    padding: 10px 22px !important;
    gap: 10px !important;
    background: rgba(255, 255, 255, 0.12) !important;
    border: 1px solid rgba(255, 255, 255, 0.28) !important;
    color: #d1fae5 !important;
}

html.ha-unified body.page-home section.hero .hero-subtitle i {
    color: #6ee7b7;
    font-size: 0.95em;
}

html.ha-unified body.page-home section.hero h1 {
    font-size: clamp(2.15rem, 5.5vw + 0.5rem, 4rem) !important;
    line-height: 1.12 !important;
    margin-bottom: clamp(18px, 3vw, 28px) !important;
    font-weight: 800 !important;
}

html.ha-unified body.page-home section.hero .text-gradient {
    background: linear-gradient(92deg, #86efac 0%, #34d399 45%, #22c55e 100%) !important;
    background-clip: text !important;
    -webkit-background-clip: text !important;
    -webkit-text-fill-color: transparent !important;
    color: transparent !important;
    filter: drop-shadow(0 2px 12px rgba(34, 197, 94, 0.45)) !important;
}

html.ha-unified body.page-home section.hero p.desc {
    font-size: clamp(1rem, 2vw, 1.28rem) !important;
    line-height: 1.75 !important;
    margin-bottom: clamp(22px, 4vw, 32px) !important;
    color: rgba(255, 255, 255, 0.94) !important;
}

/* Hero highlight strip (replaces old stats boxes) */
html.ha-unified .hero-highlights {
    list-style: none;
    margin: clamp(22px, 4vw, 30px) 0 0;
    padding: 14px 18px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 0;
    max-width: min(920px, 100%);
    margin-inline: auto;
    border-radius: 14px;
    background: rgba(0, 0, 0, 0.28);
    border: 1px solid rgba(167, 243, 208, 0.22);
}

html.ha-unified .hero-highlights li {
    position: relative;
    font-family: 'Inter', system-ui, sans-serif;
    font-size: clamp(0.72rem, 1.5vw, 0.84rem);
    font-weight: 600;
    letter-spacing: 0.02em;
    color: rgba(236, 253, 245, 0.95);
    line-height: 1.4;
    padding: 0 12px;
}

html.ha-unified .hero-highlights li:not(:last-child)::after {
    content: "•";
    position: absolute;
    right: -2px;
    color: #6ee7b7;
    font-weight: 700;
}

/* Quick-link badges */
html.ha-unified .hero-badges {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: clamp(20px, 3.5vw, 28px);
}

html.ha-unified .hero-badges a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid rgba(167, 243, 208, 0.35);
    background: rgba(0, 0, 0, 0.22);
    color: #e5f9f0;
    font-size: 0.78rem;
    text-decoration: none;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    transition: all 0.25s ease;
}

html.ha-unified .hero-badges a:hover {
    background: rgba(16, 185, 129, 0.92);
    color: #022c22;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

html.ha-unified .hero-badges a i {
    font-size: 0.8rem;
    color: #a7f3d0;
}

html.ha-unified .hero-badges a:hover i {
    color: #022c22;
}

/* Slider controls */
html.ha-unified body.page-home section.hero .hero-controls {
    position: absolute;
    z-index: 4;
    inset: auto 0 clamp(56px, 9vw, 72px) 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: clamp(10px, 2vw, 16px);
    pointer-events: none;
}

html.ha-unified body.page-home section.hero .hero-arrow {
    pointer-events: auto;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.38);
    background: rgba(0, 0, 0, 0.38);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

html.ha-unified body.page-home section.hero .hero-arrow:hover {
    transform: translateY(-2px);
    background: rgba(0, 115, 5, 0.55);
    border-color: rgba(255, 255, 255, 0.7);
}

html.ha-unified body.page-home section.hero .hero-dots {
    pointer-events: auto;
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.22);
    background: rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

html.ha-unified body.page-home section.hero .hero-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.45);
    background: rgba(255, 255, 255, 0.18);
    cursor: pointer;
}

html.ha-unified body.page-home section.hero .hero-dot.is-active {
    background: rgba(52, 211, 153, 0.95);
    border-color: rgba(167, 243, 208, 0.95);
    box-shadow: 0 0 0 3px rgba(0, 115, 5, 0.25);
}

html.ha-unified body.page-home section.hero .scroll-indicator {
    z-index: 5;
    bottom: clamp(14px, 3vw, 24px);
}

html.ha-unified body.page-home section.hero .scroll-indicator a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background: rgba(0, 0, 0, 0.25);
    font-size: 1.1rem;
}

/* Staggered entrance */
html.ha-unified body.page-home section.hero .hero-badges {
    opacity: 0;
    animation: ha-hero-fade-up 0.85s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
}

html.ha-unified body.page-home section.hero .hero-highlights {
    opacity: 0;
    animation: ha-hero-fade-up 0.85s cubic-bezier(0.16, 1, 0.3, 1) 1.05s forwards;
}

@keyframes ha-hero-fade-up {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* —— Inner page heroes (.page-hero) —— */
html.ha-unified .page-hero {
    position: relative;
    overflow: visible !important;
    color: #fff;
    text-align: center;
    border-bottom: 3px solid var(--primary-green, #007305);
    background:
        radial-gradient(ellipse 75% 90% at 50% -10%, rgba(52, 211, 153, 0.22) 0%, transparent 55%),
        radial-gradient(ellipse 60% 50% at 100% 100%, rgba(0, 121, 198, 0.12) 0%, transparent 50%),
        linear-gradient(165deg, #003208 0%, #004b04 42%, #001a08 100%) !important;
    padding-top: calc(var(--site-fixed-header-offset, 8.5rem) + clamp(24px, 5vw, 48px)) !important;
    padding-bottom: clamp(40px, 6vw, 64px) !important;
    margin-bottom: 0;
    min-height: 0;
}

html.ha-unified .page-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.5) 0%, transparent 85%);
    pointer-events: none;
}

html.ha-unified .page-hero::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: min(320px, 60%);
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(110, 231, 183, 0.6), transparent);
    pointer-events: none;
}

html.ha-unified .page-hero .container {
    position: relative;
    z-index: 1;
}

html.ha-unified .page-hero .hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    padding: 8px 18px;
    border-radius: 999px;
    font-family: 'Inter', sans-serif;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: #ecfdf5;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(167, 243, 208, 0.45);
}

html.ha-unified .page-hero .hero-kicker i {
    color: #fbbf24;
}

html.ha-unified .page-hero .hero-title {
    color: #fff !important;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: clamp(1.75rem, 4vw + 0.85rem, 2.85rem) !important;
    line-height: 1.12 !important;
    margin-bottom: 0.35em !important;
    text-shadow: 0 4px 28px rgba(0, 0, 0, 0.55) !important;
    letter-spacing: -0.02em !important;
}

html.ha-unified .page-hero p {
    max-width: 42rem;
    margin: 14px auto 0;
    font-family: 'Inter', sans-serif;
    font-size: clamp(0.95rem, 1.8vw, 1.12rem);
    line-height: 1.65;
    color: rgba(255, 255, 255, 0.9);
}

html.ha-unified .page-hero .hero-divider {
    width: clamp(56px, 12vw, 80px);
    height: 3px;
    margin: clamp(12px, 2vw, 18px) auto 0;
    background: linear-gradient(90deg, var(--accent-blue, #0079c6), #34d399, var(--primary-green, #007305));
    border-radius: 2px;
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.35);
}

@media (max-width: 767.98px) {
    html.ha-unified .page-hero {
        padding-top: calc(var(--site-fixed-header-offset, 9.5rem) + clamp(20px, 5vw, 32px)) !important;
        padding-bottom: clamp(36px, 8vw, 52px) !important;
    }

    html.ha-unified .page-hero .container {
        width: 100%;
        padding-inline: var(--gutter, 16px);
    }

    html.ha-unified .page-hero .hero-kicker {
        margin-top: 2px;
    }

    html.ha-unified .hero-highlights {
        padding: 12px 12px;
        gap: 6px 0;
    }

    html.ha-unified .hero-highlights li {
        flex: 1 1 100%;
        text-align: center;
        padding: 2px 8px;
    }

    html.ha-unified .hero-highlights li:not(:last-child)::after {
        display: none;
    }

    html.ha-unified body.page-home section.hero .hero-badges a {
        font-size: 0.72rem;
        padding: 7px 12px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html.ha-unified body.page-home section.hero .hero-badges {
        animation: none;
        opacity: 1;
    }
}
