html,
body {
    overflow-x: hidden;
}

/* =====================================================
   HERO BACKGROUND (HANYA AREA HERO)
   ===================================================== */
.hero-section {
    position: relative;
    min-height: 100svh;
    width: 100vw;
    margin-left: calc(50% - 50vw);

    background-image: var(--hero-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.45),
        rgba(0, 0, 0, 0.2)
    );
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    padding-top: 120px;
    padding-bottom: 60px;
}


.hero-fixed-bg {
    position: fixed;
    inset: 0;
    z-index: 0;

    background-image: var(--hero-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    pointer-events: none;
}

/* =====================================================
   SECTION HERO (PEMOTONG HERO)
   ===================================================== */

.instagram-section-wrapper {
    position: relative;
    z-index: 1;
    min-height: 50vh;
}

/* =====================================================
   SECTION SETELAH HERO
   ===================================================== */

.section-after-hero {
    position: relative;
    z-index: 3;
    background: #ffffff; 
}

   /* =====================================================
   HERO INSTAGRAM SECTION (FULL SCREEN)
   ===================================================== */

.instagram-section-wrapper {
    position: relative;
    width: 100%;
    min-height: 50vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

/* Background fix total */
.instagram-section-wrapper::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: var(--hero-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;

    transform: translateZ(0); /* ⬅️ anti jitter */
    will-change: transform;

    z-index: 0;
}

/* Pastikan konten di atas background */
.instagram-section-wrapper > * {
    position: relative;
    z-index: 1;
}


/* Mobile viewport fix */
@supports (height: 100svh) {
    .instagram-section-wrapper {
        min-height: 100svh;
    }
}

/* Overlay agar konten terbaca */
.instagram-section-wrapper::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0, 0, 0, 0.45),
        rgba(0, 0, 0, 0.2)
    );
    z-index: 1;
}

/* =====================================================
   INSTAGRAM SECTION CONTAINER
   ===================================================== */

.instagram-section {
    position: relative;
    z-index: 2;
    width: 100%;
    padding-top: 120px; /* jarak dari atas hero */
    padding-bottom: 60px;
}

/* =====================================================
   HERO FULL WIDTH (EDGE TO EDGE)
===================================================== */

.instagram-section-wrapper {
    width: 100vw;           /* ⬅️ full layar */
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

/* =====================================================
   HERO CONTENT WRAPPER
===================================================== */

.instagram-section {
    width: 100%;
    position: relative;
    z-index: 2;
}

/* =====================================================
   CUSTOM CONTAINER (GANTI .container BOOTSTRAP)
===================================================== */

.instagram-inner {
    max-width: 1400px;      /* sama seperti container */
    margin: 0 auto;
    padding-left: 12px;
    padding-right: 12px;
}

/* =====================================================
   INSTAGRAM GRID
   ===================================================== */

.instagram-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr)); /* ⬅️ PENTING */
    gap: 12px;  /* ⬅️ lebih rapat */

    width: 100%;
}


/* Desktop */
@media (min-width: 1200px) {
    .instagram-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Tablet */
@media (min-width: 768px) and (max-width: 1199px) {
    .instagram-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Mobile */
@media (max-width: 1199px) {
    .instagram-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 12px;
    }
}

@media (max-width: 767px) {
    .instagram-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
}

/* =====================================================
   INSTAGRAM CARD
   ===================================================== */

.instagram-feed-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.instagram-feed-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 36px rgba(0, 0, 0, 0.25);
}

/* =====================================================
   IMAGE (INSTAGRAM ASPECT RATIO 4:5)
   ===================================================== */

.feed-image-wrapper {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 5; /* STANDAR IG */
    background: #f1f1f1;
    overflow: hidden;
}

.feed-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

.instagram-feed-card:hover .feed-image {
    transform: scale(1.05);
}

/* =====================================================
   VIDEO ICON OVERLAY
   ===================================================== */

.video-badge-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
}

.video-badge-overlay i {
    font-size: 52px;
    color: #ffffff;
    text-shadow: 0 6px 16px rgba(0, 0, 0, 0.65);
}

/* =====================================================
   EMPTY STATE
   ===================================================== */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    opacity: 0.9;
}

.empty-state i {
    font-size: 48px;
}

.empty-state p {
    font-size: 14px;
}

/* =====================================================
   MOBILE HORIZONTAL SCROLL (OPTIONAL)
   ===================================================== */

@media (max-width: 576px) {
    .instagram-grid {
        display: flex;
        overflow-x: auto;
        gap: 16px;
        padding-bottom: 12px;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
    }

    .instagram-feed-card {
        min-width: 85%;
        flex-shrink: 0;
        scroll-snap-align: start;
    }

    .instagram-grid::-webkit-scrollbar {
        height: 6px;
    }

    .instagram-grid::-webkit-scrollbar-thumb {
        background: rgba(255, 255, 255, 0.6);
        border-radius: 10px;
    }
}

/* =====================================================
   SECTION SETELAH HERO - INI DARI GIT
   ===================================================== */
/* ===================================== */
/* ===================================== */
/* ===================================== */
/* ===================================== */
/* ===================================== */

/* Thumbnail berita */
.news-thumb-wrapper {
    width: 100%;
    height: 180px;           
    overflow: hidden;
    background-color: #f1f1f1;
}

.news-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;       
    display: block;
}


/* Streaming section */
#streaming-overlay {
    background: rgba(0, 0, 0, 0.55);
    z-index: 2;
    transition: opacity 0.4s ease;
}

#streaming-overlay.hide {
    opacity: 0;
    pointer-events: none;
}

#streaming-wrapper iframe {
    z-index: 1;
}



/* ================== HEADER ================== */
.feed-header {
    padding: 12px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #eeeeee;
}

.feed-header h6 {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 0;
}

.feed-header small {
    font-size: 0.75rem;
    color: #6b7280;
}

.profile-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: linear-gradient(45deg, #f09433, #dc2743, #bc1888);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1rem;
}

/* ================== IMAGE ================== */


/* ================== CAPTION ================== */
.feed-caption {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.feed-caption p {
    font-size: 0.85rem;
    line-height: 1.4;
    margin-bottom: 8px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.view-post-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: #dc2626;
    margin-top: auto;
    text-decoration: none;
}

.view-post-link:hover {
    text-decoration: underline;
}

/* Mobile tuning */
@media (max-width: 576px) {
    .feed-header h6 {
        font-size: 0.85rem;
    }

    .feed-caption p {
        -webkit-line-clamp: 2;
    }
}

/* Carousel */
.carousel-inner img {
    object-fit: cover;
    height: 400px;
}

@media (max-width: 768px) {
    /* Slider berita */
    #carouselBerita .carousel-inner img {
        height: 220px;
        object-fit: cover;
    }
    /* Thumbnail berita list */
    .news-thumb-wrapper {
        height: 140px;
    }
}


/* Animasi */
.scroll-fade {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease-out;
}

.scroll-fade.active {
    opacity: 1;
    transform: translateY(0);
}


/* Carousel */
/* Bulatan indikator */
.carousel-indicators {
    justify-content: center;
    gap: 8px;
}

.carousel-indicators [data-bs-target] {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: #ccc;
    opacity: 0.8;
    border: none;
    transition: all 0.3s ease;
}

.carousel-indicators .active {
    background-color: #007bff;
    width: 14px;
    height: 14px;
    opacity: 1;
}

/* Hilangkan tombol prev-next */
.carousel-control-prev,
.carousel-control-next {
    display: none !important;
}

/* Responsif teks di bawah */
.carousel-caption {
    position: static;
    margin-top: -4px;
}

@media (max-width: 768px) {
    .carousel-caption h5 {
        font-size: 1rem;
    }

    .carousel-caption p {
        font-size: 0.85rem;
    }
}