/**
 * ==============================================
 * HERO CAROUSEL STYLES - Al Ikhsan Beji
 * ==============================================
 * 
 * Layout: Text on LEFT, Image on RIGHT
 * Background: WHITE with soft pulsing green circles
 * 
 * Features:
 * - White background with decorative green circles
 * - Multi-slide carousel with auto-rotation
 * - Image card with rounded corners
 * - Circular navigation arrows attached to card
 * - Text slide-from-top + fade animations
 * - Image fade in/out animations
 */

/* =========================
   Google Fonts - Arabic Support
   ========================= */
@import url('https://fonts.googleapis.com/css2?family=Amiri:wght@400;700&display=swap');

/* =========================
   Hero Container
   ========================= */
.hero-carousel {
    position: relative;
    width: 100%;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 6rem 2rem 4rem;
    /* WHITE background */
    background: #ffffff;
}

/* =========================
   Decorative Green Circles
   - Top-right corner
   - Bottom-left corner
   - Soft blur, low opacity
   - Gentle pulse animation
   ========================= */
.hero-decor {
    position: absolute;
    border-radius: 50%;
    z-index: 1;
    pointer-events: none;
    /* Soft, feathered appearance using gradient */
    filter: blur(60px);
}

/* Top-right circle */
.hero-decor-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    right: -200px;
    background: radial-gradient(circle,
            rgba(134, 239, 172, 0.4) 0%,
            rgba(74, 222, 128, 0.2) 40%,
            rgba(34, 197, 94, 0.05) 70%,
            transparent 100%);
    animation: pulseCircle 6s ease-in-out infinite;
}

/* Bottom-left circle */
.hero-decor-2 {
    width: 500px;
    height: 500px;
    bottom: -150px;
    left: -150px;
    background: radial-gradient(circle,
            rgba(167, 243, 208, 0.35) 0%,
            rgba(110, 231, 183, 0.18) 40%,
            rgba(52, 211, 153, 0.05) 70%,
            transparent 100%);
    animation: pulseCircle 7s ease-in-out infinite;
    animation-delay: 1s;
}

/* Gentle pulse animation */
@keyframes pulseCircle {

    0%,
    100% {
        opacity: 1;
        transform: scale(1);
    }

    50% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

/* =========================
   Hero Wrapper (Main Layout)
   ========================= */
.hero-wrapper {
    position: relative;
    z-index: 10;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

/* =========================
   LEFT: Text Content Area
   ========================= */
.hero-text-area {
    position: relative;
    min-height: 380px;
}

/* Individual slide text containers */
.hero-slide-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    opacity: 0;
    transform: translateY(-30px);
    pointer-events: none;
    transition:
        opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Active slide text - visible and interactive */
.hero-slide-text--active {
    position: relative;
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

/* Arabic Tagline */
.hero-arabic-text {
    font-family: 'Amiri', serif;
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    font-weight: 700;
    color: #046e50;
    margin-bottom: 0.75rem;
    direction: rtl;
    text-align: left;
    letter-spacing: 0.02em;
}

/* Main Headline */
.hero-title {
    font-size: clamp(1.75rem, 4.5vw, 2.75rem);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
    color: #111827;
}

.hero-title-highlight {
    background: linear-gradient(135deg, #046e50 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Description */
.hero-desc {
    font-size: clamp(0.9375rem, 2vw, 1.0625rem);
    line-height: 1.7;
    color: #4b5563;
    margin-bottom: 1.75rem;
    max-width: 520px;
}

/* CTA Button Group */
.hero-cta-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

/* CTA Buttons - Base */
.hero-cta {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 999px;
    transition: all 0.3s ease;
}

.hero-cta i {
    font-size: 1rem;
}

/* Primary Button - Green solid */
.hero-cta-primary {
    background: linear-gradient(135deg, #046e50 0%, #059669 100%);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(4, 110, 80, 0.35);
}

.hero-cta-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 35px rgba(4, 110, 80, 0.45);
}

/* Secondary Button - Outline */
.hero-cta-secondary {
    background: transparent;
    color: #046e50;
    border: 2px solid #046e50;
    box-shadow: none;
}

.hero-cta-secondary:hover {
    background: #046e50;
    color: #ffffff;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(4, 110, 80, 0.3);
}

/* =========================
   RIGHT: Image Card Area
   ========================= */
.hero-image-area {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 
   Image Card Container
   - Green rounded card as backdrop (LANDSCAPE)
   - PNG student image positioned at bottom center
   - overflow: visible allows image to extend outside
*/
.hero-image-card {
    position: relative;
    width: 100%;
    max-width: 500px;
    aspect-ratio: 16 / 9;
    /* Landscape ratio */
    display: flex;
    align-items: flex-end;
    justify-content: center;
    /* No overflow hidden - allow PNG to extend outside */
    overflow: visible;
}

/* Green rounded backdrop card */
.hero-image-bg {
    position: absolute;
    inset: 0;
    background: linear-gradient(160deg, #0d9463 0%, #065f46 100%);
    border-radius: 30px;
    z-index: 0;
    box-shadow:
        0 20px 40px -10px rgba(6, 95, 70, 0.4),
        0 10px 20px -5px rgba(0, 0, 0, 0.1);
}

/* 
   Slide Images Container
   - Positioned to allow PNG to extend beyond card
   - Bottom aligned with slight extension
*/
.hero-slide-image {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -20px;
    /* PNG extends below the card */
    z-index: 1;
    opacity: 0;
    transform: scale(0.95) translateY(20px);
    transition:
        opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    justify-content: center;
    pointer-events: none;
}

.hero-slide-image--active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* 
   PNG Student Image Styling
   - Positioned at bottom center of card
   - Maintains natural proportions
   - Extends above the card for emphasis
   
   === GANTI GAMBAR DI HTML ===
   Gunakan gambar PNG dengan background transparan
   Path: img/hero-student-1.png, img/hero-student-2.png, dll.
*/
.hero-slide-image img {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    height: auto;
    max-height: 130%;
    /* Allow to extend above card */
    width: auto;
    max-width: 80%;
    object-fit: contain;
    filter: drop-shadow(0 10px 25px rgba(0, 0, 0, 0.2));
}

/* =========================
   Navigation Arrows
   ========================= */
.hero-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: none;
    background: #ffffff;
    color: #046e50;
    font-size: 1.25rem;
    cursor: pointer;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12);
    transition: all 0.3s ease;
}

.hero-arrow:hover {
    background: #046e50;
    color: #ffffff;
    transform: translateY(-50%) scale(1.08);
    box-shadow: 0 8px 25px rgba(4, 110, 80, 0.4);
}

.hero-arrow:active {
    transform: translateY(-50%) scale(0.95);
}

/* Arrow positioning - attached to card edges */
.hero-arrow-prev {
    left: -26px;
}

.hero-arrow-next {
    right: -26px;
}

/* =========================
   Slider Dots
   ========================= */
.hero-dots {
    position: relative;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-top: 2.5rem;
}

.hero-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(4, 110, 80, 0.2);
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.hero-dot:hover {
    background: rgba(4, 110, 80, 0.4);
    transform: scale(1.15);
}

.hero-dot--active {
    background: #046e50;
    width: 36px;
    border-radius: 999px;
    box-shadow: 0 2px 8px rgba(4, 110, 80, 0.4);
}

/* =========================
   Wave Divider
   ========================= */
.hero-wave {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    z-index: 5;
    line-height: 0;
}

.hero-wave svg {
    display: block;
    width: 100%;
    height: auto;
}

/* =========================
   Initial Animation States
   (for IntersectionObserver)
   ========================= */
.hero-carousel.hero-not-visible .hero-slide-text--active {
    opacity: 0;
    transform: translateY(-30px);
}

.hero-carousel.hero-not-visible .hero-slide-image--active {
    opacity: 0;
    transform: scale(1.1);
}

.hero-carousel.hero-not-visible .hero-arrow,
.hero-carousel.hero-not-visible .hero-dots {
    opacity: 0;
}

/* Transition when hero becomes visible */
.hero-carousel.hero-visible .hero-arrow {
    animation: fadeIn 0.6s ease forwards;
    animation-delay: 0.4s;
}

.hero-carousel.hero-visible .hero-dots {
    animation: fadeIn 0.6s ease forwards;
    animation-delay: 0.6s;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* =========================
   Responsive Adjustments
   ========================= */

/* =========================
   Responsive: Tablet (1024px and below)
   ========================= */
@media (max-width: 1024px) {
    .hero-carousel {
        padding: 5rem 1.5rem 3.5rem;
    }

    .hero-wrapper {
        gap: 2rem;
    }

    .hero-image-card {
        max-width: 400px;
        aspect-ratio: 16 / 9;
    }

    .hero-slide-image img {
        max-height: 120%;
    }

    .hero-arrow {
        width: 46px;
        height: 46px;
    }

    .hero-arrow-prev {
        left: -23px;
    }

    .hero-arrow-next {
        right: -23px;
    }

    .hero-decor-1 {
        width: 450px;
        height: 450px;
    }

    .hero-decor-2 {
        width: 350px;
        height: 350px;
    }
}

/* =========================
   Responsive: Mobile (768px and below)
   Layout: Stacked (Image on top, text below)
   ========================= */
@media (max-width: 768px) {
    .hero-carousel {
        min-height: auto;
        padding: 5rem 1rem 3rem;
    }

    .hero-wrapper {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 1.5rem;
        text-align: center;
    }

    /* Image Area - First on mobile */
    .hero-image-area {
        order: -1;
        width: 100%;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    /* Text Area */
    .hero-text-area {
        width: 100%;
        min-height: auto;
        padding: 0 0.5rem;
    }

    /* Force only active slide to show */
    .hero-slide-text {
        position: relative;
        display: none !important;
        transform: none;
        opacity: 0;
    }

    .hero-slide-text--active {
        display: block !important;
        opacity: 1;
    }

    /* Arabic text */
    .hero-arabic-text {
        text-align: center;
        font-size: 1.125rem;
        margin-bottom: 0.5rem;
    }

    /* Title */
    .hero-title {
        font-size: 1.5rem;
        line-height: 1.35;
        margin-bottom: 0.75rem;
    }

    .hero-title br {
        display: none;
    }

    /* Description */
    .hero-desc {
        max-width: 100%;
        font-size: 0.9rem;
        line-height: 1.6;
        margin-bottom: 1.25rem;
        padding: 0 0.25rem;
    }

    /* CTA Buttons - Stack vertically on mobile */
    .hero-cta-group {
        flex-direction: column;
        align-items: center;
        gap: 0.625rem;
        width: 100%;
    }

    .hero-cta {
        width: 100%;
        max-width: 280px;
        justify-content: center;
        padding: 0.875rem 1.5rem;
        font-size: 0.9rem;
    }

    /* Image card on mobile - LANDSCAPE */
    .hero-image-card {
        max-width: 320px;
        aspect-ratio: 16 / 9;
        margin: 0 auto;
    }

    .hero-image-bg {
        border-radius: 20px;
    }

    .hero-slide-image {
        bottom: 0;
    }

    .hero-slide-image img {
        max-height: 150%;
        max-width: 90%;
    }

    /* Navigation arrows - positioned inside card area */
    .hero-arrow {
        width: 36px;
        height: 36px;
        font-size: 0.875rem;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
    }

    .hero-arrow-prev {
        left: -18px;
    }

    .hero-arrow-next {
        right: -18px;
    }

    /* Slider dots - hide on mobile */
    .hero-dots {
        display: none !important;
    }

    /* Decorative circles - larger for mobile visibility */
    .hero-decor-1 {
        width: 280px;
        height: 280px;
        top: -80px;
        right: -80px;
        filter: blur(40px);
        opacity: 0.35;
    }

    .hero-decor-2 {
        width: 220px;
        height: 220px;
        bottom: -70px;
        left: -70px;
        filter: blur(40px);
        opacity: 0.3;
    }

    /* Wave */
    .hero-wave svg {
        height: 50px;
    }
}

/* =========================
   Responsive: Small Mobile (480px and below)
   iPhone SE, older phones
   ========================= */
@media (max-width: 480px) {
    .hero-carousel {
        padding: 4.5rem 0.75rem 2.5rem;
    }

    .hero-wrapper {
        gap: 1.25rem;
    }

    .hero-text-area {
        padding: 0;
    }

    .hero-arabic-text {
        font-size: 1rem;
    }

    .hero-title {
        font-size: 1.25rem;
        line-height: 1.4;
        margin-bottom: 0.625rem;
    }

    .hero-desc {
        font-size: 0.85rem;
        line-height: 1.55;
        margin-bottom: 1rem;
    }

    .hero-image-card {
        max-width: 280px;
        aspect-ratio: 16 / 9;
    }

    .hero-image-bg {
        border-radius: 16px;
    }

    .hero-slide-image {
        bottom: 0;
    }

    .hero-slide-image img {
        max-height: 160%;
        max-width: 95%;
    }

    .hero-arrow {
        width: 32px;
        height: 32px;
        font-size: 0.75rem;
    }

    .hero-arrow-prev {
        left: -16px;
    }

    .hero-arrow-next {
        right: -16px;
    }

    .hero-cta {
        max-width: 260px;
        padding: 0.75rem 1.25rem;
        font-size: 0.85rem;
    }

    .hero-dots {
        margin-top: 1rem;
    }

    .hero-dot {
        width: 6px;
        height: 6px;
    }

    .hero-dot--active {
        width: 20px;
    }

    /* Decorative circles - still visible on small screens */
    .hero-decor-1 {
        width: 220px;
        height: 220px;
        top: -60px;
        right: -60px;
        filter: blur(35px);
        opacity: 0.3;
    }

    .hero-decor-2 {
        width: 180px;
        height: 180px;
        bottom: -50px;
        left: -50px;
        filter: blur(35px);
        opacity: 0.25;
    }

    .hero-wave svg {
        height: 40px;
    }
}

/* =========================
   Accessibility: Reduced Motion
   ========================= */
@media (prefers-reduced-motion: reduce) {

    .hero-slide-text,
    .hero-slide-image,
    .hero-arrow,
    .hero-dot,
    .hero-cta {
        transition: none;
    }

    .hero-slide-text {
        transform: none;
    }

    .hero-slide-image {
        transform: none;
    }

    .hero-decor {
        animation: none;
    }

    .hero-carousel.hero-visible .hero-arrow,
    .hero-carousel.hero-visible .hero-dots {
        animation: none;
        opacity: 1;
    }
}