/* ============================================
   HERO SECTION - 3 BANNER LAYOUT - CONSOLIDATED
   ============================================ */

.hero-section-3banner {
    padding: 2px 0 12px 0;
    background: #f8f9fa;
}

/* BASE GRID - MOBILE FIRST (Vertical Stack) */
.hero-grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
    width: 100%;
}

/* Banner Container Base Styles */
.hero-banner {
    position: relative;
    overflow: hidden;
    border-radius: 12px;
    /* Consistent rounded corners */
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    background-color: #fff;
    /* Fallback */
}

.hero-banner:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* CAROUSEL WRAPPERS */
.hero-carousel-wrapper,
.hero-carousel {
    width: 100%;
    height: 100%;
    position: relative;
    display: block;
}

.hero-slide {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.6s ease-in-out;
    z-index: 1;
    display: block;
}

.hero-slide.active {
    opacity: 1;
    z-index: 2;
    position: relative;
    /* Takes up space */
}

/* IMAGES */
.hero-slide img {
    width: 100%;
    height: 100%;
    display: block;
}

/* ============================================
   DESKTOP LAYOUT (>= 992px)
   ============================================ */
@media (min-width: 992px) {
    .hero-grid-3 {
        grid-template-columns: 2.5fr 1fr;
        /* 2.5:1 ratio matches reference */
        grid-template-rows: 1fr 1fr;
        /* Two Equal Rows for Right Side */
        gap: 20px;
        min-height: 480px;
        /* Force minimum height for structure */
        align-items: stretch;
    }

    /* MAIN BANNER (Left) - Spans 2 Rows */
    .hero-banner-large {
        grid-column: 1;
        grid-row: 1 / span 2;
        width: 100%;
        height: auto;
        min-height: 100%;
    }

    .hero-banner-large .hero-slide.active {
        height: 100%;
        /* Force fill */
    }

    .hero-banner-large .hero-slide a {
        height: 100% !important;
        display: block;
    }

    .hero-banner-large .hero-slide img {
        object-fit: cover !important;
        /* Ensure it fills the tall area */
        height: 100% !important;
        width: 100% !important;
    }

    /* RIGHT TOP BANNER */
    .hero-banner-top {
        grid-column: 2;
        grid-row: 1;
        width: 100%;
        height: 100%;
    }

    /* RIGHT BOTTOM BANNER */
    .hero-banner-bottom {
        grid-column: 2;
        grid-row: 2;
        width: 100%;
        height: 100%;
    }

    /* Small banners image fitting */
    .hero-banner-small .hero-slide img {
        object-fit: contain;
        background: #f0f0f0;
    }
}

/* ============================================
   TABLET LAYOUT (768px - 991px)
   ============================================ */
@media (min-width: 768px) and (max-width: 991px) {
    .hero-grid-3 {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: auto auto;
    }

    .hero-banner-large {
        grid-column: 1 / span 2;
        grid-row: 1;
        aspect-ratio: 2/1;
    }

    .hero-banner-top {
        grid-column: 1;
        grid-row: 2;
        aspect-ratio: 16/9;
    }

    .hero-banner-bottom {
        grid-column: 2;
        grid-row: 2;
        aspect-ratio: 16/9;
    }
}

/* ============================================
   MOBILE LAYOUT (< 768px)
   ============================================ */
@media (max-width: 767px) {
    .hero-grid-3 {
        display: grid;
        grid-template-columns: 1fr 1fr;
        /* Two columns for side-by-side */
        grid-template-rows: auto auto;
        gap: 10px;
    }

    /* Main Banner: Full Width Top */
    .hero-banner-large {
        grid-column: 1 / span 2;
        grid-row: 1;
        width: 100%;
        aspect-ratio: 16/9;
    }

    /* Small Banners: Side by Side Bottom — landscape friendly */
    .hero-banner-top {
        grid-column: 1;
        grid-row: 2;
        width: 100%;
        aspect-ratio: 4/3;
    }

    .hero-banner-bottom {
        grid-column: 2;
        grid-row: 2;
        width: 100%;
        aspect-ratio: 4/3;
    }

    /* Show full image without cropping on mobile */
    .hero-banner-small .hero-slide img {
        width: 100% !important;
        height: 100% !important;
        object-fit: contain !important;
        display: block !important;
    }
}


/* ============================================
   CONTENT STYLES
   ============================================ */
/* Dots */
.hero-carousel-dots {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 20px;
    backdrop-filter: blur(2px);
}

.hero-carousel-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.7);
}

.hero-carousel-dot.active {
    background: #fff;
    transform: scale(1.2);
    border-color: #fff;
}

/* Arrows */
.hero-carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.8);
    border: none;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    opacity: 0;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.hero-banner:hover .hero-carousel-btn {
    opacity: 1;
}

.hero-carousel-btn:hover {
    background: #fff;
    color: #00AEEF;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.hero-prev {
    left: 16px;
}

.hero-next {
    right: 16px;
}

/* Mobile Optimizations — carousel dots: subtle grey (tidak mengganggu estetika banner) */
@media (max-width: 768px) {
    .hero-carousel-btn {
        display: none;
    }

    .hero-carousel-dots {
        bottom: 10px;
        padding: 6px 10px;
        background: rgba(255, 255, 255, 0.25) !important;
        backdrop-filter: none;
    }

    .hero-carousel-dot {
        width: 6px;
        height: 6px;
        background: rgba(0, 0, 0, 0.2) !important;
        border: none !important;
    }

    .hero-carousel-dot.active {
        background: rgba(0, 0, 0, 0.6) !important;
        transform: none !important;
    }
}