/* ============================================================
   Beranda (Homepage) Styles
   ============================================================ */

/* ------------------------------------------------------------
   Hero Section
   ------------------------------------------------------------ */
.hero-section {
    position: relative;
    width: 100%;
    aspect-ratio: 24 / 10;
    height: auto;
    overflow: hidden;
}

.hero-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: bottom;
    z-index: -2;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(28, 51, 96, 0.82) 0%, rgba(28, 51, 96, 0.45) 60%, transparent 100%);
    z-index: -1;
}

.badge-custom {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--color-white);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 50rem;
    color: var(--color-primary-600);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
}

.btn-outline-white {
    background-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(4px);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-outline-white:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

/* ------------------------------------------------------------
   Hero Carousel
   ------------------------------------------------------------ */
.hero-carousel-wrap {
    position: relative;
}

.hero-carousel-wrap .carousel,
.hero-carousel-wrap .carousel-inner,
.hero-carousel-wrap .carousel-item {
    height: 100%;
}

.hero-slide-content {
    position: relative;
    z-index: 2;
    width: 100%;
}

/* Slide banner ucapan — tanpa overlay gradient */
.hero-banner-slide {
    position: relative;
}

.hero-banner-slide > .hero-bg-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Overlay untuk slide berita — lebih gelap di kiri */
.hero-overlay-news {
    background: linear-gradient(to right,
            rgba(10, 20, 60, 0.8) 0%,
            rgba(10, 25, 70, 0.45) 60%,
            rgba(0, 0, 0, 0.15) 100%) !important;
}

/* Judul berita */
.hero-news-title {
    font-size: clamp(1.6rem, 3vw, 2.4rem);
    line-height: 1.3;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Ringkasan berita di hero */
.hero-news-excerpt {
    font-size: 1rem;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.85);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 6px rgba(0, 0, 0, 0.4);
}

.hero-carousel-btn {
    --bs-carousel-control-icon-filter: ;
    width: 48px;
    height: 48px;
    background-color: rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(4px);
    border: 1.5px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    top: 50%;
    transform: translateY(-50%);
    bottom: auto;
    opacity: 0;
    /* Saat opacity 0, jangan halangi klik/sentuh pada konten slide */
    pointer-events: none;
    transition: opacity 0.3s ease, background-color 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10;
}

.carousel-control-prev.hero-carousel-btn {
    left: 20px;
}

.carousel-control-next.hero-carousel-btn {
    right: 20px;
}

.hero-carousel-btn:hover {
    background-color: rgba(255, 255, 255, 0.32);
}

/* Saat hero dihover / tombol mendapat fokus — aktifkan pointer events */
.hero-carousel-wrap:hover .hero-carousel-btn,
.hero-carousel-btn:focus {
    opacity: 1;
    pointer-events: auto;
}

.hero-carousel-btn .carousel-control-prev-icon,
.hero-carousel-btn .carousel-control-next-icon {
    width: 20px;
    height: 20px;
}

/* Indicator bar — rectangular pill */
.hero-carousel-indicators {
    bottom: 18px;
    margin-bottom: 0;
    gap: 6px;
}

.hero-carousel-indicators button {
    width: 28px;
    height: 4px;
    border-radius: 2px;
    border: none;
    background-color: rgba(255, 255, 255, 0.4);
    transition: background-color 0.3s ease, width 0.3s ease;
    opacity: 1;
    margin: 0;
}

.hero-carousel-indicators button.active {
    background-color: var(--color-white);
    width: 44px;
}

/* Animasi konten slide — dikontrol 100% via JS */
.hero-anim-el {
    opacity: 0;
    transform: translateY(28px);
}

.hero-anim-el.do-anim {
    animation: fadeInUp 0.75s ease-out forwards;
}


/* ------------------------------------------------------------
   Exclusive News Carousel (3 visible, slide 1 at a time)
   ------------------------------------------------------------ */

.exc-carousel-wrap {
    width: 100%;
    margin-top: 1.25rem;
}

.exc-carousel {
    position: relative;
}

.exc-viewport {
    overflow: hidden;
}

.exc-track {
    display: flex;
    gap: 1rem;
    transition: transform 0.45s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.exc-item {
    flex: 0 0 calc((100% - 2rem) / 3);
    min-width: 0;
}

/* Wrapper card — layout & ukuran asli */
.exc-card {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    position: relative;
    border-radius: 1.25rem;
    background: rgba(6, 28, 60, 0.55);
    backdrop-filter: blur(18px) saturate(1.6);
    -webkit-backdrop-filter: blur(18px) saturate(1.6);
    border: 1px solid rgba(255, 255, 255, 0.14);
    box-shadow:
        0 8px 32px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    overflow: hidden;
    height: 185px;
    padding: 0.75rem 0 0.75rem 0.75rem;
}

/* Left: image wrapper */
.exc-img-wrap {
    flex: 0 0 45%;
    max-width: 45%;
    height: 100%;
    display: block;
    overflow: hidden;
    border-radius: 0.85rem;
}

.exc-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.5s ease;
}

.exc-img-wrap:hover .exc-img {
    transform: scale(1.05);
}

/* Right: info panel */
.exc-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 0.5rem 0.85rem 0.5rem 0.75rem;
    gap: 0.35rem;
    min-width: 0;
}

/* Badge */
.exc-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: #fff;
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    width: fit-content;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.4);
}

/* Title link */
.exc-title {
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
    transition: color 0.2s ease;
}

.exc-title:hover {
    color: #93c5fd;
}

/* Date */
.exc-date {
    color: rgba(255, 255, 255, 0.65);
    font-size: 0.78rem;
    margin: 0;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Arrow buttons */
.exc-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.12);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    cursor: pointer;
    z-index: 20;
    transition: background 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
    opacity: 0;
    pointer-events: none;
}

.exc-arrow--prev { left: -0.35rem; }
.exc-arrow--next { right: -0.35rem; }

.exc-carousel:hover .exc-arrow {
    opacity: 1;
    pointer-events: auto;
}

.exc-arrow:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    transform: translateY(-50%) scale(1.1);
}

/* Pagination dots */
.exc-dots {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: 0.85rem;
    z-index: 20;
}

.exc-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: background 0.3s ease, width 0.3s ease;
}

.exc-dot--active {
    background: #f59e0b;
    width: 22px;
    border-radius: 4px;
}

.exc-dot:hover:not(.exc-dot--active) {
    background: rgba(255, 255, 255, 0.65);
}

@media (max-width: 991.98px) {
    .exc-item {
        flex: 0 0 calc((100% - 1rem) / 2);
    }
}

@media (min-width: 576px) and (max-width: 767.98px) {
    .exc-card { min-height: 175px; height: 175px; }
    .exc-img-wrap { flex: 0 0 40%; max-width: 40%; }
    .exc-title { font-size: 0.86rem; -webkit-line-clamp: 3; line-clamp: 3; }
    .exc-info { padding: 0.45rem 0.75rem 0.45rem 0.65rem; }
}

@media (max-width: 575.98px) {
    .exc-carousel-wrap {
        margin-top: 1.1rem;
    }

    .exc-track {
        gap: 0.75rem;
    }

    .exc-item {
        flex: 0 0 100%;
    }

    .exc-card {
        flex-direction: column;
        min-height: auto;
        height: auto;
        border-radius: 1rem;
        padding: 0.65rem;
    }

    .exc-img-wrap {
        flex: 0 0 95px;
        max-width: 100%;
        border-radius: 0.65rem 0.65rem 0 0;
    }

    .exc-info {
        padding: 0.55rem 0.45rem 0.25rem;
        gap: 0.3rem;
    }

    .exc-title {
        font-size: 0.88rem;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .exc-arrow {
        width: 28px;
        height: 28px;
        font-size: 0.75rem;
        opacity: 0.75;
        pointer-events: auto;
    }

    .exc-arrow--prev { left: 0.15rem; }
    .exc-arrow--next { right: 0.15rem; }
}

/* ------------------------------------------------------------
   Section Shared
   ------------------------------------------------------------ */
.section-padding {
    padding: 80px 0;
    background-color: var(--color-slate-100);
}

/* ------------------------------------------------------------
   Service Card
   ------------------------------------------------------------ */
.service-card {
    text-decoration: none;
    display: block;
    height: 100%;
    padding: 1.5rem;
    background-color: var(--color-white);
    border: 1px solid var(--color-gray-100);
    border-radius: 0.75rem;
    transition: all 0.3s ease;
}

.service-card:hover {
    box-shadow: 0 1rem 3rem var(--overlay-black-10) !important;
    border-color: var(--color-primary-600) !important;
    transform: translateY(-5px);
}

.service-card .icon-box {
    width: 56px;
    height: 56px;
    background-color: var(--color-info-100);
    color: var(--color-primary-600);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.service-card:hover .icon-box {
    background-color: var(--color-primary-600);
    color: var(--color-white);
}

.service-card h3 {
    font-size: 1.125rem;
    color: var(--color-gray-800);
    transition: color 0.3s ease;
}

.service-card:hover h3 {
    color: var(--color-primary-600);
}

.service-description {
    color: var(--color-gray-700);
    font-size: 0.875rem;
    margin-bottom: 0;
}

/* ------------------------------------------------------------
   News Section
   ------------------------------------------------------------ */
.news-section {
    padding: 80px 0;
    background-color: var(--color-white);
}

.news-card {
    background-color: var(--color-slate-100);
    border: 1px solid var(--color-gray-150);
    border-radius: 0.75rem;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.news-card:hover {
    box-shadow: 0 1rem 3rem var(--overlay-black-10);
    transform: translateY(-4px);
}

.news-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.news-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.news-meta {
    color: var(--color-zinc-500);
    font-size: 0.875rem;
}

.news-title {
    color: var(--color-zinc-900);
    font-size: 1.25rem;
}

.news-excerpt {
    color: var(--color-zinc-600);
    display: -webkit-box;
    line-clamp: 3;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.news-content a {
    margin-top: auto !important;
    align-self: flex-start;
}

/* ------------------------------------------------------------
   Gallery Section
   ------------------------------------------------------------ */
.gallery-section {
    padding: 80px 0;
    background-color: var(--color-slate-100);
}

.gallery-link {
    color: var(--color-primary-600);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.gallery-link:hover {
    text-decoration: underline;
}

.gallery-item {
    position: relative;
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: 0.75rem;
    text-decoration: none;
    display: block;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-image {
    transform: scale(1.08);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 1rem;
}

.gallery-date {
    font-size: 0.75rem;
    color: var(--color-primary-400);
    margin-bottom: 0.25rem;
}

.gallery-title {
    margin: 0;
    color: var(--color-white);
    font-size: 0.95rem;
    font-weight: 600;
}

/* ------------------------------------------------------------
   Video Section
   ------------------------------------------------------------ */
.video-section {
    padding: 80px 0;
    background-color: var(--color-white);
}

.video-link {
    color: var(--color-primary-600);
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.video-link:hover {
    text-decoration: underline;
}

.video-card {
    text-decoration: none;
    display: block;
    height: 100%;
    cursor: pointer;
    background-color: var(--color-slate-100);
    border: 1px solid var(--color-gray-150);
    border-radius: 0.75rem;
    padding: 1rem;
    transition: box-shadow 0.3s ease, transform 0.3s ease, border-color 0.3s ease;
}

.video-card:hover {
    box-shadow: 0 1rem 3rem var(--overlay-black-10);
    border-color: var(--color-primary-600);
    transform: translateY(-4px);
}

.video-thumb-wrap {
    position: relative;
    aspect-ratio: 16 / 9;
    border-radius: 0.75rem;
    overflow: hidden;
    margin-bottom: 1rem;
}

.video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.video-card:hover .video-thumb {
    transform: scale(1.05);
}

.video-overlay {
    position: absolute;
    inset: 0;
    background-color: var(--overlay-black-40);
    transition: background-color 0.3s ease;
}

.video-card:hover .video-overlay {
    background-color: var(--overlay-black-50);
}

.video-play-center {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-play-btn {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: var(--overlay-white-90);
    color: var(--color-primary-600);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.video-card:hover .video-play-btn {
    transform: scale(1.1);
    background-color: var(--color-white);
}

.video-duration {
    position: absolute;
    bottom: 0.75rem;
    right: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.35rem;
    background-color: var(--overlay-black-80);
    color: var(--color-white);
    font-size: 0.75rem;
    font-weight: 600;
}

.video-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-zinc-500);
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.video-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--color-zinc-900);
    transition: color 0.3s ease;
}

.video-card:hover .video-title {
    color: var(--color-primary-600);
}

/* ------------------------------------------------------------
   Video Modal
   ------------------------------------------------------------ */
.video-modal .modal-content {
    background-color: var(--color-black);
    border: 0;
    border-radius: 0.75rem;
}

.video-modal .btn-close {
    filter: invert(1) grayscale(100%);
}

/* ------------------------------------------------------------
   Dark Mode Overrides
   ------------------------------------------------------------ */
[data-bs-theme="dark"] .service-card {
    background-color: var(--color-slate-900) !important;
    border-color: var(--color-slate-800) !important;
}

[data-bs-theme="dark"] .service-card:hover {
    border-color: var(--color-primary-500) !important;
    background-color: var(--color-slate-800) !important;
}

[data-bs-theme="dark"] .service-card h3 {
    color: var(--color-slate-100);
}

[data-bs-theme="dark"] .service-description {
    color: var(--color-slate-400);
}

[data-bs-theme="dark"] .service-card .icon-box {
    background-color: var(--overlay-blue-15);
    color: var(--color-primary-400);
}

[data-bs-theme="dark"] #layanan {
    background-color: var(--color-slate-950);
}

[data-bs-theme="dark"] .text-dark-white {
    color: var(--color-white) !important;
}

[data-bs-theme="dark"] .text-muted {
    color: var(--color-slate-400) !important;
}

[data-bs-theme="dark"] .news-section {
    background-color: var(--color-slate-850);
}

[data-bs-theme="dark"] .news-card {
    background-color: var(--color-slate-750);
    border-color: var(--color-slate-700);
}

[data-bs-theme="dark"] .news-meta,
[data-bs-theme="dark"] .news-excerpt {
    color: var(--color-zinc-400);
}

[data-bs-theme="dark"] .news-title {
    color: var(--color-gray-150);
}

[data-bs-theme="dark"] .gallery-section {
    background-color: var(--color-slate-950);
}

[data-bs-theme="dark"] .gallery-link {
    color: var(--color-primary-400);
}

[data-bs-theme="dark"] .video-section {
    background-color: var(--color-zinc-900);
}

[data-bs-theme="dark"] .video-link {
    color: var(--color-primary-400);
}

[data-bs-theme="dark"] .video-meta {
    color: var(--color-zinc-400);
}

[data-bs-theme="dark"] .video-card {
    background-color: var(--color-slate-750);
    border-color: var(--color-slate-700);
}

[data-bs-theme="dark"] .video-card:hover {
    border-color: var(--color-primary-500);
    background-color: var(--color-slate-650);
}

[data-bs-theme="dark"] .video-title {
    color: var(--color-gray-150);
}

[data-bs-theme="dark"] .video-card:hover .video-title {
    color: var(--color-primary-400);
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */
/* ── Tablet landscape / small desktop (≤991px) ────────────────── */
@media (max-width: 991.98px) {
    .hero-section {
        height: auto;
        min-height: unset;
        padding: 0;
    }

    .hero-carousel-wrap .carousel,
    .hero-carousel-wrap .carousel-inner,
    .hero-carousel-wrap .carousel-item {
        height: 100%;
    }

    .hero-slide-content {
        padding-top: 15px;
    }

    /* Beri ruang untuk tombol panah kiri/kanan agar tidak menimpa konten */
    .hero-slide-content .container {
        padding-left: 64px !important;
        padding-right: 64px !important;
    }

    /* Geser tombol ke tepi layar */
    .carousel-control-prev.hero-carousel-btn {
        left: 8px;
    }

    .carousel-control-next.hero-carousel-btn {
        right: 8px;
    }

    .hero-overlay {
        background: linear-gradient(to bottom,
                rgba(28, 51, 96, 0.82) 0%,
                rgba(28, 51, 96, 0.5) 60%,
                rgba(28, 51, 96, 0.3) 100%);
    }

    .hero-section .display-4 {
        font-size: 1.5rem;
        margin-bottom: 0.35rem !important;
    }

    .hero-section .lead {
        font-size: 0.85rem !important;
    }

    .hero-section p.fs-5 {
        font-size: 0.8rem !important;
        margin-bottom: 0.5rem !important;
    }

    .hero-section .btn-lg {
        padding: 0.4rem 0.8rem !important;
        font-size: 0.8rem !important;
    }

    .hero-section .btn {
        width: auto;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
    }

    .hero-section .btn i {
        margin: 0 !important;
    }

    .section-padding,
    .news-section {
        padding: 64px 0;
    }

    .news-image {
        height: 200px;
    }
}

/* ── Desktop sempit / tablet landscape besar (992px – 1024px) ───── */
@media (min-width: 992px) and (max-width: 1024px) {
    /* Container: beri ruang untuk tombol panah */
    .hero-slide-content .container {
        padding-left: 68px !important;
        padding-right: 68px !important;
    }

    /* Tombol panah ke tepi */
    .carousel-control-prev.hero-carousel-btn {
        left: 8px;
    }

    .carousel-control-next.hero-carousel-btn {
        right: 8px;
    }

    /* Badge */
    .hero-section .badge-custom {
        font-size: 0.78rem;
        padding: 0.3rem 0.7rem;
    }

    /* Spacing badge wrapper */
    .hero-section .mb-4 {
        margin-bottom: 0.6rem !important;
    }

    /* Judul utama */
    .hero-section .display-4 {
        font-size: 1.65rem;
        line-height: 1.25;
        margin-bottom: 0.6rem !important;
    }

    /* Deskripsi */
    .hero-section p.fs-5 {
        font-size: 0.875rem !important;
        line-height: 1.5;
        margin-bottom: 0.75rem !important;
    }

    /* Tombol CTA */
    .hero-section .btn-lg {
        padding: 0.45rem 1rem !important;
        font-size: 0.85rem !important;
    }
}

/* ── Tablet portrait (576px – 767px) ────────────────────────────── */
@media (max-width: 767.98px) {
    .hero-slide-content {
        padding-top: 10px;
    }

    /* Beri ruang untuk tombol panah di kiri/kanan */
    .hero-slide-content .container {
        padding-left: 52px !important;
        padding-right: 52px !important;
    }

    .hero-section .display-4 {
        font-size: clamp(1rem, 3.5vw, 1.35rem);
        line-height: 1.25;
        margin-bottom: 0.3rem !important;
    }

    .hero-news-title {
        font-size: clamp(0.95rem, 3.2vw, 1.25rem);
        line-height: 1.25;
        margin-bottom: 0.25rem !important;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .hero-news-excerpt {
        font-size: 0.8rem;
        line-height: 1.45;
        margin-bottom: 0.35rem !important;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    .hero-section p.fs-5 {
        font-size: 0.75rem !important;
        margin-bottom: 0.35rem !important;
    }

    .badge-custom {
        font-size: 0.7rem;
        padding: 0.25rem 0.55rem;
    }

    .hero-section .btn-lg {
        padding: 0.35rem 0.75rem !important;
        font-size: 0.75rem !important;
    }

    /* Tombol panah — tempatkan lebih ke tepi */
    .carousel-control-prev.hero-carousel-btn {
        left: 6px;
    }

    .carousel-control-next.hero-carousel-btn {
        right: 6px;
    }

    /* Indicator */
    .hero-carousel-indicators {
        bottom: 8px;
        gap: 4px;
    }

    .hero-carousel-indicators button {
        width: 18px;
        height: 3px;
    }

    .hero-carousel-indicators button.active {
        width: 28px;
    }
}

/* ── Mobile phone (≤575px) ─────────────────────────────────────── */
@media (max-width: 575.98px) {
    .hero-section {
        height: auto;
        min-height: unset;
        padding: 0;
        overflow: hidden;
    }

    .hero-slide-content {
        padding-top: 6px;
        padding-bottom: 4px;
    }

    /* Beri ruang untuk tombol panah di kiri/kanan */
    .hero-slide-content .container {
        padding-left: 40px !important;
        padding-right: 40px !important;
    }

    /* Tombol panah — selalu terlihat di HP, tidak blocking sentuhan saat tersembunyi */
    .hero-carousel-btn {
        width: 28px;
        height: 28px;
        opacity: 0.8 !important;
        pointer-events: auto !important; /* selalu bisa diklik di HP */
    }

    .carousel-control-prev.hero-carousel-btn {
        left: 4px;
    }

    .carousel-control-next.hero-carousel-btn {
        right: 4px;
    }

    .hero-carousel-btn .carousel-control-prev-icon,
    .hero-carousel-btn .carousel-control-next-icon {
        width: 13px;
        height: 13px;
    }

    /* Judul utama Dinas — sangat kecil di HP */
    .hero-section .display-4 {
        font-size: clamp(0.8rem, 3.5vw, 1.05rem);
        line-height: 1.2;
        margin-bottom: 0.2rem !important;
    }

    /* Sembunyikan deskripsi di HP untuk hemat ruang */
    .hero-section p.fs-5 {
        display: none !important;
    }

    /* Judul berita */
    .hero-news-title {
        font-size: clamp(0.8rem, 3.2vw, 1rem);
        line-height: 1.2;
        margin-bottom: 0.15rem !important;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    /* Excerpt berita */
    .hero-news-excerpt {
        font-size: 0.7rem;
        line-height: 1.35;
        margin-bottom: 0.25rem !important;
        -webkit-line-clamp: 2;
        line-clamp: 2;
    }

    /* Badge */
    .badge-custom {
        font-size: 0.6rem;
        padding: 0.15rem 0.4rem;
    }

    /* Tombol CTA */
    .hero-section .btn-lg {
        padding: 0.28rem 0.65rem !important;
        font-size: 0.7rem !important;
    }

    /* Sembunyikan mb-4/mb-5 Bootstrap di dalam hero */
    .hero-section .mb-4 {
        margin-bottom: 0.3rem !important;
    }

    .hero-section .mb-5 {
        margin-bottom: 0 !important;
    }

    .hero-section .mb-3 {
        margin-bottom: 0.2rem !important;
    }

    /* Indicator bar */
    .hero-carousel-indicators {
        bottom: 5px;
        gap: 3px;
    }

    .hero-carousel-indicators button {
        width: 14px;
        height: 2.5px;
    }

    .hero-carousel-indicators button.active {
        width: 22px;
    }

    /* Card & news non-hero */
    .service-card,
    .news-content {
        padding: 1.15rem;
    }

    .news-title {
        font-size: 1.1rem;
    }

    .news-image {
        height: 180px;
    }

    #berita .d-flex.align-items-end {
        align-items: flex-start !important;
    }
}

@media (min-width: 1700px) {
    .hero-section {
        height: auto;
    }
}

/* ------------------------------------------------------------
   Berita Detail
   ------------------------------------------------------------ */
.berita-detail-card {
    padding: 2rem;
}

.berita-back-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-zinc-600);
    text-decoration: none;
    font-weight: 500;
    margin-bottom: 1.5rem;
}

.berita-back-link:hover {
    color: var(--color-primary-600);
}

.detail-category {
    display: inline-block;
    background: var(--color-info-100);
    color: var(--color-primary-700);
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
}

.detail-title {
    font-size: 2rem;
    font-weight: 800;
    color: var(--color-zinc-900);
    line-height: 1.25;
}

.detail-meta {
    color: var(--color-zinc-500);
    font-size: 0.95rem;
}

.detail-share {
    padding: 1rem 0;
    border-bottom: 1px solid var(--color-gray-150);
}

.detail-featured-image img {
    width: 100%;
    border-radius: 1rem;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.detail-content {
    background: var(--color-slate-100);
    border: 1px solid var(--color-gray-150);
    border-radius: 1rem;
    padding: 1.5rem;
    color: var(--color-zinc-700);
    line-height: 1.8;
    overflow-wrap: break-word;
    word-wrap: break-word;
    word-break: break-word;
}

.detail-content img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.detail-content p,
.detail-content li {
    color: var(--color-black);
}

.detail-content h2 {
    font-size: 1.35rem;
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--color-black);
}

.detail-tags .badge {
    margin-right: 0.35rem;
    margin-bottom: 0.35rem;
    font-weight: 500;
}

.popular-news-box {
    background: var(--color-slate-100);
    border: 1px solid var(--color-gray-150);
    border-radius: 1rem;
    padding: 1.25rem;
    position: static;
}

.popular-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--color-zinc-900);
}

.popular-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.popular-item {
    display: flex;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--color-gray-150);
}

.popular-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.popular-item img {
    width: 78px;
    height: 78px;
    border-radius: 0.65rem;
    object-fit: cover;
}

.popular-item h4 {
    margin: 0 0 0.35rem;
    font-size: 0.92rem;
    line-height: 1.4;
    font-weight: 600;
    color: var(--color-zinc-900);
}

.popular-item p {
    color: var(--color-zinc-500);
    font-size: 0.8rem;
}

.popular-all-link {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: var(--color-white);
    font-weight: 600;
}

.popular-all-link:hover {
    color: var(--color-primary-500);
}

@media (max-width: 767.98px) {
    .berita-detail-card {
        padding: 1.2rem;
    }

    .detail-title {
        font-size: 1.5rem;
    }
}

[data-bs-theme="dark"] .berita-back-link {
    color: var(--color-zinc-400);
}

[data-bs-theme="dark"] .berita-back-link:hover {
    color: var(--color-primary-400);
}

[data-bs-theme="dark"] .detail-title,
[data-bs-theme="dark"] .detail-content h2,
[data-bs-theme="dark"] .popular-title,
[data-bs-theme="dark"] .popular-item h4 {
    color: var(--color-gray-150);
}

[data-bs-theme="dark"] .detail-meta,
[data-bs-theme="dark"] .popular-item p {
    color: var(--color-zinc-400);
}

[data-bs-theme="dark"] .detail-share,
[data-bs-theme="dark"] .popular-item {
    border-color: var(--color-slate-700);
}

[data-bs-theme="dark"] .detail-content,
[data-bs-theme="dark"] .popular-news-box {
    background: var(--color-slate-750);
    border-color: var(--color-slate-700);
}

[data-bs-theme="dark"] .detail-content p,
[data-bs-theme="dark"] .detail-content li {
    color: var(--color-slate-100);
}

[data-bs-theme="dark"] .detail-content strong,
[data-bs-theme="dark"] .detail-content b {
    color: var(--color-white);
}

[data-bs-theme="dark"] .detail-content a {
    color: var(--color-primary-300);
}

[data-bs-theme="dark"] .detail-content a:hover {
    color: var(--color-primary-200);
}

[data-bs-theme="dark"] .detail-category {
    background: var(--overlay-blue-15);
    color: var(--color-primary-400);
}

/* ------------------------------------------------------------
   Galeri Foto Detail
   ------------------------------------------------------------ */
.galeri-foto-detail-card {
    padding: 2rem;
}

.photo-detail-meta {
    color: var(--color-zinc-500);
    font-size: 0.95rem;
}

.photo-detail-image img,
.photo-main-img {
    width: 100%;
    height: auto;
    max-height: 80vh;
    border-radius: 1rem;
    object-fit: contain;
    background-color: var(--color-slate-900);
    border: 1px solid var(--color-gray-150);
    transition: opacity 0.18s ease;
}

/* Thumbnail strip — grid 4 kolom */
.photo-thumb-strip {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.photo-thumb-btn {
    padding: 0;
    border: 2.5px solid transparent;
    border-radius: 0.5rem;
    overflow: hidden;
    cursor: pointer;
    background: none;
    transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
    aspect-ratio: 1 / 1;
}

.photo-thumb-btn img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.photo-thumb-btn:hover {
    border-color: var(--color-primary-400);
    transform: translateY(-3px);
}

.photo-thumb-btn.active {
    border-color: var(--color-primary-600);
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--color-primary-600) 20%, transparent);
}


.photo-detail-caption h2 {
    font-size: 1.55rem;
    margin-bottom: 0.5rem;
    color: var(--color-zinc-900);
}

.photo-detail-caption p {
    margin-bottom: 0;
    color: var(--color-zinc-700);
}

.photo-related-box {
    background: var(--color-slate-100);
    border: 1px solid var(--color-gray-150);
    border-radius: 1rem;
    padding: 1.25rem;
}

.photo-related-title {
    font-size: 1.2rem;
    margin-bottom: 1rem;
    font-weight: 700;
    color: var(--color-zinc-900);
}

.photo-related-list {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.photo-related-item {
    display: flex;
    gap: 0.75rem;
    text-decoration: none;
    color: inherit;
    padding-bottom: 0.9rem;
    border-bottom: 1px solid var(--color-gray-150);
}

.photo-related-item:last-child {
    border-bottom: 0;
    padding-bottom: 0;
}

.photo-related-item img {
    width: 78px;
    height: 78px;
    border-radius: 0.65rem;
    object-fit: cover;
}

.photo-related-item h4 {
    margin: 0 0 0.35rem;
    font-size: 0.92rem;
    line-height: 1.4;
    font-weight: 600;
    color: var(--color-zinc-900);
}

.photo-related-item p {
    color: var(--color-zinc-500);
    font-size: 0.8rem;
}

.photo-related-all-link {
    margin-top: 1rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    text-decoration: none;
    color: var(--color-primary-600);
    font-weight: 600;
    transition: color 0.2s ease;
}

.photo-related-all-link:hover {
    color: var(--color-primary-500);
}

@media (max-width: 767.98px) {
    .galeri-foto-detail-card {
        padding: 1.2rem;
    }

    .photo-detail-caption h2 {
        font-size: 1.3rem;
    }
}

[data-bs-theme="dark"] .photo-detail-meta,
[data-bs-theme="dark"] .photo-related-item p {
    color: var(--color-zinc-400);
}

[data-bs-theme="dark"] .photo-detail-caption h2,
[data-bs-theme="dark"] .photo-related-title,
[data-bs-theme="dark"] .photo-related-item h4 {
    color: var(--color-gray-150);
}

[data-bs-theme="dark"] .photo-detail-caption p {
    color: var(--color-slate-100);
}

[data-bs-theme="dark"] .photo-related-box {
    background: var(--color-slate-750);
    border-color: var(--color-slate-700);
}

[data-bs-theme="dark"] .photo-related-item {
    border-color: var(--color-slate-700);
}

[data-bs-theme="dark"] .photo-detail-image img {
    border-color: var(--color-slate-700);
}