/* ============================================================
   GLOBAL
============================================================ */
body {
    font-family: 'Inter', sans-serif;
    background-color: #FAFAF8;
}

/* ── Active nav link (merah saat halaman aktif) ── */
.nav-link.nav-active {
    color: #dc2626 !important;
    /* merah */
    font-weight: 700;
}

/* ── Mobile nav active item ── */
.mob-nav-link.nav-active {
    background-color: #fef2f2 !important;
    /* merah muda */
    color: #dc2626 !important;
    font-weight: 700;
}

/* ── Mobile Menu Panel Slide Animation ── */
.mobile-menu-panel {
    overflow: hidden;
    max-height: 0;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.25s ease;
    opacity: 0;
}

.mobile-menu-panel.is-open {
    max-height: 400px;
    opacity: 1;
}

/* ── Hamburger → X animation ── */
#menu-toggle.is-open .hamburger-bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

#menu-toggle.is-open .hamburger-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

#menu-toggle.is-open .hamburger-bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* ============================================================
   MOBILE RESPONSIVE POLISH
============================================================ */
@media (max-width: 767px) {

    /* Kurangi min-height semua section agar tidak terlalu panjang */
    section[id] {
        min-height: auto !important;
    }

    /* Hero: kurangi tinggi atas dan bawah agar sangat kompak di mobile */
    #home {
        padding-top: 120px !important;
        padding-bottom: 50px !important;
    }

    /* CNN Section: kurangi padding */
    #about-cnn {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    /* Gallery: kurangi padding */
    #motifs {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    /* Dokumenter: kurangi padding */
    #dokumenter {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    /* Detect: kurangi padding */
    #detect {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    /* About: kurangi padding, kompakkan kartu */
    #about-author {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }

    #about-author .bg-white {
        padding: 1.5rem;
    }

    /* Caption video: text lebih kecil dan wrap rapi */
    #dokumenter .flex.items-center.gap-3 {
        flex-wrap: wrap;
        font-size: 0.75rem;
        text-align: center;
        justify-content: center;
    }

    /* Footer text rapi */
    footer p {
        font-size: 0.8rem;
        line-height: 1.6;
    }
}

.gold-gradient-text {
    background: linear-gradient(to right, #D4AF37, #B8860B);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

.gold-gradient-bg {
    background: linear-gradient(135deg, #FFB800, #B8860B);
}

/* ============================================================
   ANIMATIONS
============================================================ */
.floating {
    animation: floating 3s ease-in-out infinite;
}

@keyframes floating {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-12px);
    }

    100% {
        transform: translateY(0px);
    }
}

.fade-in-up {
    animation: fadeInUp 1s ease-out forwards;
    opacity: 0;
    transform: translateY(30px);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delay-100 {
    animation-delay: 100ms;
}

.delay-200 {
    animation-delay: 200ms;
}

.delay-300 {
    animation-delay: 300ms;
}

.delay-400 {
    animation-delay: 400ms;
}

/* ============================================================
   CARD HOVER
============================================================ */
.card-hover {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-hover:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 25px -5px rgba(184, 134, 11, 0.2),
        0 10px 10px -5px rgba(184, 134, 11, 0.1);
    border-color: #D4AF37;
}

/* ============================================================
   MOTIF DETAIL MODAL — LUXURY REDESIGN
============================================================ */
#motifModal {
    display: none;
    position: fixed;
    z-index: 9999;
    inset: 0;
    background: rgba(10, 8, 5, 0.80);
    backdrop-filter: blur(10px) saturate(1.4);
    -webkit-backdrop-filter: blur(10px) saturate(1.4);
    align-items: center;
    justify-content: center;
    padding: 20px;
}

#motifModal.is-open {
    display: flex;
}

.mm-box {
    background: linear-gradient(160deg, #1c1409 0%, #12100a 50%, #1a1508 100%);
    border-radius: 24px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow:
        0 0 0 1px rgba(212, 175, 55, 0.08),
        0 30px 80px rgba(0, 0, 0, 0.7),
        0 0 60px rgba(184, 134, 11, 0.08) inset;
    width: 100%;
    max-width: 840px;
    max-height: 92vh;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    animation: mmFadeIn 0.45s cubic-bezier(0.34, 1.4, 0.64, 1) forwards;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.3) transparent;
}

.mm-box::-webkit-scrollbar {
    width: 5px;
}

.mm-box::-webkit-scrollbar-track {
    background: transparent;
}

.mm-box::-webkit-scrollbar-thumb {
    background: rgba(212, 175, 55, 0.3);
    border-radius: 10px;
}

@keyframes mmFadeIn {
    from {
        opacity: 0;
        transform: scale(0.90) translateY(32px);
    }

    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* ── Close button ── */
.mm-close {
    position: absolute;
    top: 18px;
    right: 20px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(212, 175, 55, 0.30);
    background: rgba(212, 175, 55, 0.08);
    color: rgba(212, 175, 55, 0.85);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
    z-index: 10;
    backdrop-filter: blur(4px);
}

.mm-close:hover {
    background: rgba(212, 175, 55, 0.20);
    border-color: rgba(212, 175, 55, 0.70);
    color: #D4AF37;
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.25);
    transform: rotate(90deg);
}

/* ── Header ── */
.mm-header {
    background: linear-gradient(135deg, #0e0b05 0%, #1f1608 40%, #2a1e09 100%);
    border-bottom: 1px solid rgba(212, 175, 55, 0.20);
    padding: 28px 60px 24px 32px;
    border-radius: 24px 24px 0 0;
    position: relative;
    overflow: hidden;
}

.mm-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, #D4AF37, #FFD700, #D4AF37, transparent);
}

.mm-header::after {
    content: '';
    position: absolute;
    bottom: -40px;
    right: -40px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.08) 0%, transparent 70%);
    pointer-events: none;
}

.mm-header h2 {
    font-size: 1.65rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    margin: 0 0 6px;
    color: #fff;
    text-shadow: 0 2px 12px rgba(212, 175, 55, 0.20);
}

.mm-header span {
    font-size: 0.70rem;
    font-weight: 600;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: rgba(212, 175, 55, 0.80);
}

/* ── Two-column body ── */
.mm-body {
    display: flex;
    gap: 0;
}

/* ── Left: Image column ── */
.mm-img-col {
    flex: 0 0 260px;
    background: rgba(0, 0, 0, 0.30);
    border-right: 1px solid rgba(212, 175, 55, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px 22px;
    position: relative;
}

.mm-img-col::before {
    content: '';
    position: absolute;
    inset: 20px;
    border-radius: 18px;
    background: radial-gradient(ellipse at center, rgba(212, 175, 55, 0.04), transparent 70%);
    pointer-events: none;
}

.mm-img-col img {
    width: 100%;
    max-height: 260px;
    object-fit: cover;
    border-radius: 16px;
    border: 2px solid rgba(212, 175, 55, 0.35);
    box-shadow:
        0 0 0 4px rgba(212, 175, 55, 0.06),
        0 12px 40px rgba(0, 0, 0, 0.60),
        0 0 20px rgba(212, 175, 55, 0.10) inset;
    transition: transform 0.4s ease, box-shadow 0.4s ease;
}

.mm-img-col img:hover {
    transform: scale(1.03);
    box-shadow:
        0 0 0 4px rgba(212, 175, 55, 0.12),
        0 16px 50px rgba(0, 0, 0, 0.70),
        0 0 30px rgba(212, 175, 55, 0.15) inset;
}

/* ── Right: Info column ── */
.mm-info-col {
    flex: 1;
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.mm-row {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 14px 0;
}

.mm-label {
    font-size: 0.62rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: #C8971C;
    display: flex;
    align-items: center;
    gap: 6px;
}

.mm-label::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 1.5px;
    background: linear-gradient(90deg, #D4AF37, transparent);
    border-radius: 2px;
}

.mm-value {
    font-size: 0.90rem;
    color: rgba(240, 230, 210, 0.88);
    line-height: 1.65;
    padding-left: 22px;
}

.mm-divider {
    border: none;
    border-top: 1px solid rgba(212, 175, 55, 0.10);
    margin: 0;
}

/* ── Footer ── */
.mm-footer {
    padding: 18px 32px;
    border-top: 1px solid rgba(212, 175, 55, 0.12);
    background: rgba(0, 0, 0, 0.25);
    border-radius: 0 0 24px 24px;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;
}

.mm-footer::before {
    content: 'SABBEKU AI';
    font-size: 0.60rem;
    font-weight: 700;
    letter-spacing: 0.20em;
    color: rgba(212, 175, 55, 0.25);
    margin-right: auto;
}

.mm-btn-close {
    padding: 11px 28px;
    border-radius: 50px;
    border: none;
    background: linear-gradient(135deg, #C8971C 0%, #D4AF37 50%, #E8C84A 100%);
    color: #0e0b05;
    font-weight: 800;
    font-size: 0.82rem;
    cursor: pointer;
    letter-spacing: 0.04em;
    transition: all 0.3s ease;
    box-shadow:
        0 4px 15px rgba(184, 134, 11, 0.30),
        0 1px 0 rgba(255, 255, 255, 0.15) inset;
    position: relative;
    overflow: hidden;
}

.mm-btn-close::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.20), transparent);
    transition: left 0.5s ease;
}

.mm-btn-close:hover::before {
    left: 100%;
}

.mm-btn-close:hover {
    transform: translateY(-2px);
    box-shadow:
        0 8px 25px rgba(184, 134, 11, 0.45),
        0 1px 0 rgba(255, 255, 255, 0.15) inset;
}

.mm-btn-close:active {
    transform: translateY(0);
}

/* ── Responsive: mobile stacked ── */
@media (max-width: 640px) {
    .mm-box {
        border-radius: 20px;
    }

    .mm-header {
        padding: 22px 50px 20px 22px;
        border-radius: 20px 20px 0 0;
    }

    .mm-header h2 {
        font-size: 1.35rem;
    }

    .mm-body {
        flex-direction: column;
    }

    .mm-img-col {
        flex: none;
        border-right: none;
        border-bottom: 1px solid rgba(212, 175, 55, 0.12);
        padding: 22px;
    }

    .mm-img-col img {
        max-height: 200px;
    }

    .mm-info-col {
        padding: 18px 20px;
    }

    .mm-footer {
        padding: 14px 20px;
        border-radius: 0 0 20px 20px;
    }
}