/* 
   CSS UNTUK MI AL-JAMHURIYAH 
   Fitur: Glassmorphism, Morphing Image, & Responsive Dropdown
*/

/* 1. Base Configuration & Fonts */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@300;400;500;600;700;800&family=Playfair+Display:ital,wght@0,700;1,700&display=swap');

:root {
    --primary: #014d00;
    --secondary: #ffcc00;
    --accent: #059212;
    --dark: #0a1a0a;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: #fcfcfc;
    overflow-x: hidden;
}

h1, h2, h3, .font-serif {
    font-family: 'Playfair Display', serif;
}

/* 2. Glassmorphism Navigation */
.glass-nav {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    z-index: 50;
}

/* 3. Marquee (Running Text) Animation */
.marquee-container {
    background: var(--primary);
    overflow: hidden;
    white-space: nowrap;
    padding: 8px 0;
}

.marquee-content {
    display: inline-block;
    animation: marquee 30s linear infinite;
}

@keyframes marquee {
    0% { transform: translate(0, 0); }
    100% { transform: translate(-50%, 0); }
}

/* 4. Image Morphing Animation */
.morph-img {
    border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%;
    animation: morphing 10s infinite alternate cubic-bezier(0.445, 0.05, 0.55, 0.95);
}

@keyframes morphing {
    0% { border-radius: 30% 70% 70% 30% / 30% 30% 70% 70%; }
    100% { border-radius: 50% 50% 33% 67% / 55% 27% 73% 45%; }
}

/* 5. Dropdown Menu (Desktop & Mobile) */
.dropdown-menu {
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: none; /* Sembunyikan default agar tidak mengganggu layout mobile */
}

/* Desktop Hover Logic */
@media (min-width: 1024px) {
    .dropdown-menu {
        display: block; /* Aktifkan kembali untuk desktop */
        position: absolute;
        top: 100%;
        left: 0;
        transform: translateY(15px);
    }
    
    .nav-item:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* Mobile Click Logic */
@media (max-width: 1023px) {
    .dropdown-menu.show {
        display: block !important;
        opacity: 1 !important;
        visibility: visible !important;
        transform: translateY(0) !important;
        position: relative; /* Mendorong konten di bawahnya */
        width: 100%;
        padding-left: 1.5rem;
        background: rgba(0, 0, 0, 0.03);
        border-radius: 8px;
        margin-top: 0.5rem;
    }

    /* Animasi Panah saat Dropdown Aktif */
    .nav-item.open .icon-chevron {
        transform: rotate(180deg);
    }
}

/* 6. Mobile Menu Sidebar (Drawer) */
#mobile-menu {
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(100%);
    box-shadow: -10px 0 30px rgba(0,0,0,0.1);
    z-index: 100;
}

#mobile-menu.active {
    transform: translateX(0);
}

/* 7. Video Container (Responsive 16:9) */
.video-container {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 ratio */
    height: 0;
    overflow: hidden;
    border-radius: 24px;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* 8. Custom Components */
.btn-primary {
    background-color: var(--primary);
    color: white;
    transition: all 0.3s ease;
}

.btn-primary:hover {
    background-color: var(--dark);
    transform: translateY(-2px);
}

/* Utilitas Tambahan */
.icon-chevron {
    transition: transform 0.3s ease;
}