/* =========================================================
   styles.css - MA DARUL FIKRI
   Responsive production styling
   ========================================================= */

:root {
    --primary-color: #2e7d32;
    --secondary-color: #1b5e20;
    --accent-color: #4caf50;
    --light-green: #e8f5e9;
    --dark-text: #1f2937;
    --muted-text: #6b7280;
    --white: #ffffff;
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 20px 45px rgba(0, 0, 0, 0.16);
}

/* =========================================================
   GLOBAL RESET
   ========================================================= */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    color: var(--dark-text);
    overflow-x: hidden;
    width: 100%;
    min-width: 0;
    position: relative;
    background: #ffffff;
}

img {
    max-width: 100%;
}

button,
a,
input,
select,
textarea {
    -webkit-tap-highlight-color: transparent;
}

/* =========================================================
   NAVIGATION
   ========================================================= */

.nav-link {
    text-decoration: none !important;
    transition:
        color 0.25s ease,
        background-color 0.25s ease,
        transform 0.25s ease;
}

.nav-link:hover {
    transform: translateY(-1px);
}

.nav-link.active {
    color: #fde047 !important;
    position: relative;
}

@media (min-width: 1024px) {
    .nav-link.active::after {
        content: "";
        position: absolute;
        left: 50%;
        bottom: -8px;
        width: 70%;
        height: 3px;
        border-radius: 999px;
        background: #fde047;
        transform: translateX(-50%);
    }
}

/* ---- Dropdown menu (Program, Berita) ---- */
.nav-dropdown { position: relative; }
.dropdown-trigger {
    background: transparent;
    border: 0;
    cursor: pointer;
    font: inherit;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.dropdown-chevron { width: 14px; height: 14px; transition: transform 0.2s ease; }
.nav-dropdown.open .dropdown-chevron,
.nav-dropdown:hover .dropdown-chevron { transform: rotate(180deg); }

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    margin-top: 12px;
    min-width: 240px;
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 18px 40px rgba(0,0,0,0.18);
    padding: 8px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 60;
}
.nav-dropdown:hover .dropdown-menu,
.nav-dropdown.open .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 10px;
    color: #1f2937 !important;
    font-weight: 600;
    font-size: 0.92rem;
    text-decoration: none !important;
    transition: background-color 0.15s ease, color 0.15s ease;
}
.dropdown-item:hover { background: #f0fdf4; color: #15803d !important; }
.dropdown-item.active { background: #f0fdf4; color: #15803d !important; }
.dropdown-item i { color: #16a34a; width: 18px; text-align: center; flex-shrink: 0; }

/* ---- Mobile accordion dropdown ---- */
.mobile-dropdown-trigger {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: transparent;
    border: 0;
    cursor: pointer;
    text-align: left;
    font: inherit;
}
.mobile-dropdown-panel {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
}
.mobile-dropdown-panel.open { max-height: 260px; }
.mobile-dropdown-panel a {
    display: block;
    padding: 8px 0 8px 14px;
    font-size: 0.92rem;
    color: #d1fae5 !important;
}
.mobile-dropdown-panel a:hover { color: #fde047 !important; }

/* Mobile/tablet navbar */
@media (max-width: 1023.98px) {
    #mobile-menu {
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100vw;
        background: var(--secondary-color);
        box-shadow: 0 12px 25px rgba(0, 0, 0, 0.18);
        z-index: 9998;
        overflow-x: hidden;
    }

    #mobile-menu a {
        display: block;
        width: 100%;
    }

    #menu-btn {
        display: flex !important;
        flex-shrink: 0;
        align-items: center;
        justify-content: center;
    }

    /* Mengatasi class Tailwind hidden md:flex */
    nav .hidden.md\:flex {
        display: none !important;
    }
}

/* HP kecil */
@media (max-width: 480px) {
    #mobile-menu {
        max-height: calc(100vh - 70px);
        overflow-y: auto;
    }
}

/* =========================================================
   SECTION
   ========================================================= */

section {
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.section-divider {
    width: 80px;
    height: 4px;
    border-radius: 999px;
    background: linear-gradient(
        90deg,
        var(--primary-color),
        var(--accent-color)
    );
    margin: 0 auto;
}

.card-hover {
    transition:
        transform 0.3s ease,
        box-shadow 0.3s ease;
}

.card-hover:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

/* =========================================================
   HERO SLIDER
   ========================================================= */

.hero-slider {
    position: relative;
    width: 100%;
    height: clamp(500px, 78vh, 800px);
    overflow: hidden;
    isolation: isolate;
}

.slide {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    visibility: hidden;
    transition:
        opacity 1s ease,
        visibility 1s ease;
}

.slide.active {
    opacity: 1;
    visibility: visible;
    z-index: 1;
}

.slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

/* Overlay agar teks tetap terbaca */
.hero-slider .slide::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(
            90deg,
            rgba(0, 0, 0, 0.60) 0%,
            rgba(0, 0, 0, 0.34) 45%,
            rgba(0, 0, 0, 0.12) 100%
        );
    pointer-events: none;
}

/* Konten hero */
.hero-slider .slide > div {
    max-width: 100%;
}

/* Dot navigation */
.nav-dots {
    position: absolute;
    left: 50%;
    bottom: 28px;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transform: translateX(-50%);
}

.nav-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.55);
    cursor: pointer;
    transition:
        width 0.25s ease,
        background-color 0.25s ease,
        transform 0.25s ease;
}

.nav-dot:hover {
    transform: scale(1.15);
}

.nav-dot.active {
    width: 28px;
    border-radius: 999px;
    background: #ffffff;
}

/* =========================================================
   3D PROFILE CARD
   ========================================================= */

.transform-style-preserve-3d {
    transform-style: preserve-3d;
}

.backface-hidden {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.rotate-y-180 {
    transform: rotateY(180deg);
}

/* Support class Tailwind: group-hover:rotate-y-180 */
.group:hover .group-hover\:rotate-y-180 {
    transform: rotateY(180deg);
}

/* Support struktur custom jika dipakai */
.flip-card {
    perspective: 1000px;
}

.flip-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transition: transform 0.7s ease;
    transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
    transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
    position: absolute;
    inset: 0;
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

.flip-card-back {
    transform: rotateY(180deg);
}

/* =========================================================
   PROGRAM / FACILITY CARDS
   ========================================================= */

.program-card,
.facility-card,
.card-hover {
    min-width: 0;
    overflow: hidden;
}

.program-card img,
.facility-card img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.program-card a {
    text-decoration: none;
}

/* Hindari anchor inline yang menyebabkan ukuran kartu kacau */
.program-card a.inline-flex {
    display: flex;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

/* =========================================================
   TESTIMONIAL
   ========================================================= */

#testimonial {
    position: relative;
    overflow: hidden;
    /* Background gelap dikembalikan: judul & subjudul di section ini
       memakai teks putih (diatur di index.html), jadi background terang
       membuat tulisannya nyaris tak terbaca. */
    background:
        linear-gradient(
            135deg,
            #2e7d32 0%,
            #1565c0 100%
        );
}

#testimonial::before,
#testimonial::after {
    content: "";
    position: absolute;
    border-radius: 50%;
    pointer-events: none;
}

#testimonial::before {
    width: 280px;
    height: 280px;
    top: -120px;
    left: -100px;
    /* Putih transparan supaya terlihat di atas background gelap */
    background: rgba(255, 255, 255, 0.10);
    animation: testimonialFloat 8s ease-in-out infinite;
}

#testimonial::after {
    width: 320px;
    height: 320px;
    right: -120px;
    bottom: -140px;
    background: rgba(255, 255, 255, 0.08);
    animation: testimonialFloat 10s ease-in-out infinite reverse;
}

@keyframes testimonialFloat {
    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

.testimonial-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    height: 500px;
    margin: 0 auto;
    perspective: 1500px;
}

.testimonial-card {
    position: absolute;
    left: 50%;
    top: 50%;
    width: min(600px, 90%);
    padding: 50px 40px;
    border-radius: 30px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.12);
    transform-style: preserve-3d;
    transform: translate(-50%, -50%) scale(0.82);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition:
        transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.5s ease,
        visibility 0.5s ease;
    z-index: 1;
}

.testimonial-card.active {
    transform: translate(-50%, -50%) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    z-index: 3;
}

.testimonial-card.prev {
    transform: translate(calc(-50% - 150px), -50%) scale(0.88) rotateY(8deg);
    opacity: 0.35;
    visibility: visible;
    z-index: 2;
}

.testimonial-card.next {
    transform: translate(calc(-50% + 150px), -50%) scale(0.88) rotateY(-8deg);
    opacity: 0.35;
    visibility: visible;
    z-index: 2;
}

.testimonial-card.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.slider-nav {
    position: absolute;
    top: 50%;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border: 0;
    border-radius: 50%;
    background: rgba(46, 125, 50, 0.95);
    color: #ffffff;
    cursor: pointer;
    box-shadow: var(--shadow-md);
    transform: translateY(-50%);
    transition:
        transform 0.2s ease,
        background-color 0.2s ease,
        box-shadow 0.2s ease;
}

.slider-nav:hover {
    transform: translateY(-50%) scale(1.08);
    background: var(--secondary-color);
    box-shadow: var(--shadow-lg);
}

.slider-nav.prev {
    left: 5%;
}

.slider-nav.next {
    right: 5%;
}

/* =========================================================
   CHAT / WHATSAPP
   ========================================================= */

.chat-widget {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1000;
}

.chat-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 15px 25px;
    border: 0;
    border-radius: 999px;
    background: #25d366;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 12px 25px rgba(37, 211, 102, 0.30);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.chat-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 16px 30px rgba(37, 211, 102, 0.36);
}

.chat-button:active {
    transform: scale(0.96);
}

.whatsapp-icon {
    width: 28px;
    height: 28px;
    flex-shrink: 0;
}

.chat-popup {
    position: fixed;
    right: 20px;
    bottom: 90px;
    display: none;
    flex-direction: column;
    width: min(380px, calc(100vw - 20px));
    max-height: min(600px, calc(100vh - 110px));
    overflow: hidden;
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.20);
    z-index: 1001;
}

.chat-popup.active {
    display: flex;
    animation: chatPopupIn 0.25s ease;
}

@keyframes chatPopupIn {
    from {
        opacity: 0;
        transform: translateY(12px) scale(0.97);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ---------- ISI CHAT POPUP ----------
   Bagian di bawah ini sempat hilang, sehingga popup Help Desk tampil
   tanpa layout: avatar jadi kotak besar dan teks menumpuk polos.
   Dikembalikan tanpa mengubah .chat-popup / .chat-button / bagian responsive. */

.chat-header {
    flex-shrink: 0;
    padding: 18px 20px;
    background: #25d366;
    color: #ffffff;
    text-align: center;
    position: relative;
}

.chat-header h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 4px;
}

.chat-header p {
    font-size: 13px;
    opacity: 0.92;
    line-height: 1.4;
}

.close-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    color: #ffffff;
    font-size: 18px;
    line-height: 1;
    cursor: pointer;
    transition: background 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.35);
}

.contact-list {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
}

.contact-item {
    display: flex;
    align-items: center;
    padding: 12px;
    margin-bottom: 8px;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.contact-item:hover {
    background: #f4f4f5;
}

.contact-avatar {
    position: relative;
    flex-shrink: 0;
    width: 50px;
    height: 50px;
    margin-right: 14px;
    border-radius: 50%;
    background: #e5e7eb;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: #ffffff;
    font-size: 16px;
}

.contact-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.status-indicator {
    position: absolute;
    right: 1px;
    bottom: 1px;
    width: 12px;
    height: 12px;
    border: 2px solid #ffffff;
    border-radius: 50%;
    background: #4caf50;
}

.contact-info {
    flex: 1;
    min-width: 0;
}

.contact-name {
    font-size: 15px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 2px;
}

.contact-role {
    font-size: 13px;
    color: #6b7280;
}

.contact-status {
    font-size: 12px;
    color: #4caf50;
    margin-top: 2px;
}

.contact-action {
    display: flex;
    flex-shrink: 0;
    gap: 8px;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s ease, background 0.2s ease;
}

.whatsapp-btn { background: #25d366; }
.whatsapp-btn:hover { background: #20ba5a; transform: scale(1.08); }

.phone-btn { background: #2196f3; }
.phone-btn:hover { background: #1976d2; transform: scale(1.08); }

.action-icon {
    width: 20px;
    height: 20px;
    fill: #ffffff;
}

/* =========================================================
   NEWS
   ========================================================= */

.news-section {
    position: relative;
    padding: 5rem 0;
    background: #ffffff;
}

/* Judul section (dipakai Berita & Event) */
.block-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 2.25rem;
}

.block-title {
    margin: 0;
    font-size: clamp(2rem, 1.2rem + 2.6vw, 2.75rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.025em;
    color: #0f1a12;
}

.block-title::after {
    content: "";
    display: block;
    width: 56px;
    height: 5px;
    margin-top: 14px;
    border-radius: 999px;
    background: var(--primary-color);
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 2rem 1.5rem;
}

.news-card {
    display: flex;
    flex-direction: column;
    min-width: 0;
    color: inherit;
    text-decoration: none;
    border-radius: 16px;
}

.news-media {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 16px;
    background: #e3ebe4;
}

.news-media::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    box-shadow: inset 0 0 0 1px rgba(15, 26, 18, 0.06);
    pointer-events: none;
}

.news-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.news-card:hover .news-media img {
    transform: scale(1.06);
}

/* Panah kecil muncul saat kartu di-hover */
.news-go {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    place-items: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: #ffffff;
    color: var(--secondary-color);
    font-size: 0.85rem;
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.18);
    opacity: 0;
    transform: translateY(8px) rotate(-45deg);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.news-card:hover .news-go,
.news-card:focus-visible .news-go {
    opacity: 1;
    transform: translateY(0) rotate(-45deg);
}

.news-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin: 1rem 0 0.9rem;
    font-size: 1.0625rem;
    font-weight: 500;
    line-height: 1.5;
    color: #1c2a20;
    transition: color 0.2s ease;
}

.news-card:hover .news-title {
    color: var(--primary-color);
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: auto;
}

.news-tag,
.news-date {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 8px;
    font-size: 0.8125rem;
    line-height: 1.4;
}

.news-tag {
    background: #fdc21b;
    color: #1f2937;
    font-weight: 700;
}

.news-date {
    background: #f0f4f1;
    color: #374151;
    font-weight: 600;
}

.news-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 2.5rem;
}

.news-more-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: 2px solid var(--primary-color);
    border-radius: 12px;
    background: transparent;
    color: var(--primary-color);
    font-weight: 600;
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.news-more-btn i {
    font-size: 0.75rem;
    transition: transform 0.2s ease;
}

.news-more-btn:hover {
    background: var(--primary-color);
    color: #ffffff;
}

.news-more-btn:hover i {
    transform: translateX(3px);
}

.news-card:focus-visible,
.event-card:focus-visible,
.news-more-btn:focus-visible {
    outline: 3px solid #fdc21b;
    outline-offset: 4px;
}

@media (max-width: 1023.98px) {
    .news-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 559.98px) {
    .news-section,
    .events-section {
        padding: 3.5rem 0;
    }

    .news-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .news-footer {
        justify-content: stretch;
    }

    .news-more-btn {
        width: 100%;
        justify-content: center;
    }
}

/* =========================================================
   EVENTS
   ========================================================= */

.events-section {
    position: relative;
    padding: 5rem 0;
    background: #f1f7f1;
}

.event-controls {
    display: flex;
    flex-shrink: 0;
    gap: 10px;
}

.event-controls[hidden] {
    display: none;
}

.event-nav-btn {
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border: 1.5px solid #c9dcca;
    border-radius: 50%;
    background: #ffffff;
    color: var(--secondary-color);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.event-nav-btn:hover:not(:disabled) {
    background: var(--primary-color);
    border-color: var(--primary-color);
    color: #ffffff;
}

.event-nav-btn:disabled {
    opacity: 0.35;
}

/* Slider: geser dengan swipe (HP) atau tombol panah (desktop) */
.event-track {
    --event-gap: 24px;
    --event-visible: 3;
    display: flex;
    gap: var(--event-gap);
    padding: 6px 0 26px;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
}

.event-track::-webkit-scrollbar {
    display: none;
}

.event-empty {
    width: 100%;
    text-align: center;
    color: #6b7280;
    padding: 40px 12px;
    font-size: 0.95rem;
}

.event-card {
    display: flex;
    flex: 0 0 calc(
        (100% - (var(--event-gap) * (var(--event-visible) - 1))) /
        var(--event-visible)
    );
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    border: 1px solid #dfeadf;
    border-radius: 20px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
    scroll-snap-align: start;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 22px 36px -20px rgba(27, 94, 32, 0.4);
}

.event-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e3ebe4;
}

.event-media img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
}

.event-card:hover .event-media img {
    transform: scale(1.05);
}

.event-countdown {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 5px 12px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.94);
    color: var(--secondary-color);
    font-size: 0.75rem;
    font-weight: 700;
    line-height: 1.4;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}

.event-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.25rem 1.25rem 1.1rem;
}

.event-title {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin: 0;
    font-size: 1.1875rem;
    font-weight: 700;
    line-height: 1.35;
    color: #14231a;
    transition: color 0.2s ease;
}

.event-card:hover .event-title {
    color: var(--primary-color);
}

.event-desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
    margin: 0.6rem 0 1.1rem;
    font-size: 0.9375rem;
    line-height: 1.65;
    color: #5b6b60;
}

.event-date {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: auto 0 0;
    padding-top: 0.9rem;
    border-top: 1px solid #e6efe6;
    font-size: 0.875rem;
    font-weight: 600;
    color: #1f2937;
}

.event-date i {
    color: var(--primary-color);
    font-size: 1rem;
}

.event-date-label {
    font-weight: 400;
    color: #6b7a70;
}

.event-progress {
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: #d6e4d7;
}

.event-progress-fill {
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: var(--primary-color);
    transition: transform 0.2s ease-out;
}

@media (max-width: 1023.98px) {
    .event-track {
        --event-visible: 2;
    }
}

/* HP: satu event per layar, kartu berikutnya sedikit mengintip */
@media (max-width: 639.98px) {
    .event-track {
        --event-gap: 16px;
    }

    .event-card {
        flex-basis: 88%;
    }

    .event-nav-btn {
        width: 40px;
        height: 40px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .event-card:hover,
    .news-card:hover .news-media img,
    .event-card:hover .event-media img {
        transform: none;
    }
}

/* =========================================================
   GALLERY
   ========================================================= */

.gallery-item {
    overflow: hidden;
    border-radius: 14px;
}

.gallery-item img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.06);
}

/* =========================================================
   FORM
   ========================================================= */

input,
select,
textarea {
    max-width: 100%;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
}

button:disabled {
    cursor: not-allowed;
    opacity: 0.7;
}

/* =========================================================
   SCROLLBAR
   ========================================================= */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #86a789;
    border-radius: 999px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5f8062;
}

/* =========================================================
   RESPONSIVE TABLET
   ========================================================= */

@media (max-width: 1023.98px) {
    .hero-slider {
        height: 68vh;
        min-height: 440px;
    }

    .testimonial-container {
        height: 500px;
    }

    .testimonial-card.prev {
        transform: translate(calc(-50% - 110px), -50%) scale(0.84);
    }

    .testimonial-card.next {
        transform: translate(calc(-50% + 110px), -50%) scale(0.84);
    }
}

/* =========================================================
   RESPONSIVE HP
   ========================================================= */

@media (max-width: 768px) {
    html {
        scroll-padding-top: 70px;
    }

    body {
        overflow-x: hidden;
    }

    /* ---------- HERO ---------- */

    .hero-slider {
        height: 65vh;
        min-height: 400px;
        max-height: 700px;
    }

    .hero-slider .slide img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center;
    }

    .hero-slider .slide::after {
        background:
            linear-gradient(
                180deg,
                rgba(0, 0, 0, 0.18) 0%,
                rgba(0, 0, 0, 0.48) 70%,
                rgba(0, 0, 0, 0.68) 100%
            );
    }

    .nav-dots {
        bottom: 18px;
        gap: 7px;
    }

    .nav-dot {
        width: 8px;
        height: 8px;
    }

    .nav-dot.active {
        width: 24px;
    }

    /* ---------- TESTIMONIAL ---------- */

    .testimonial-container {
        height: 480px;
    }

    .testimonial-card {
        width: 94%;
        max-width: 94%;
        padding: 28px 20px;
        border-radius: 22px;
    }

    .testimonial-card.prev {
        transform: translate(-50%, -50%) scale(0.92);
        opacity: 0;
        visibility: hidden;
    }

    .testimonial-card.next {
        transform: translate(-50%, -50%) scale(0.92);
        opacity: 0;
        visibility: hidden;
    }

    .slider-nav {
        display: flex !important;
        width: 38px;
        height: 38px;
    }

    .slider-nav.prev {
        left: 2px;
    }

    .slider-nav.next {
        right: 2px;
    }

    /* ---------- CHAT ---------- */

    .chat-widget {
        right: 15px;
        bottom: 15px;
    }

    .chat-button {
        width: 56px;
        height: 56px;
        padding: 0;
        border-radius: 50%;
    }

    .chat-button span {
        display: none;
    }

    .whatsapp-icon {
        width: 28px;
        height: 28px;
    }

    .chat-popup {
        right: 10px;
        bottom: 82px;
        width: min(380px, calc(100vw - 20px));
        max-height: 70vh;
        border-radius: 16px;
    }

    /* ---------- IMAGE ---------- */

    .program-card img,
    .facility-card img {
        max-width: 100%;
    }

    /* ---------- SECTION SPACING ---------- */

    section {
        overflow-x: hidden;
    }
}

/* =========================================================
   HP KECIL
   ========================================================= */

@media (max-width: 480px) {
    .hero-slider {
        height: 62vh;
        min-height: 380px;
    }

    .hero-slider h1,
    .hero-slider h2 {
        font-size: 2rem !important;
        line-height: 1.15 !important;
    }

    .hero-slider p {
        font-size: 0.98rem !important;
        line-height: 1.5 !important;
    }

    .hero-slider a,
    .hero-slider button {
        font-size: 0.9rem;
    }

    .testimonial-container {
        height: 450px;
    }

    .testimonial-card {
        padding: 24px 18px;
        border-radius: 20px;
    }

    .slider-nav {
        width: 34px;
        height: 34px;
    }

    .chat-popup {
        right: 10px;
        bottom: 78px;
        width: calc(100vw - 20px);
        max-height: 72vh;
    }
}

/* =========================================================
   ACCESSIBILITY
   ========================================================= */

:focus-visible {
    outline: 3px solid rgba(76, 175, 80, 0.45);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}