/* ===== RESPONSIVE FIX CSS ===== */
/* File ini memperbaiki masalah responsive di mobile dan desktop */

/* Reset box-sizing untuk semua elemen */
*, *::before, *::after {
    box-sizing: border-box;
}

/* Pastikan body dan html responsive */
html {
    overflow-x: hidden;
    width: 100%;
}

body {
    overflow-x: hidden;
    width: 100%;
    margin: 0;
    padding: 0;
}

/* Container responsive */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Images responsive */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Video responsive */
video {
    max-width: 100%;
    height: auto;
}

/* Prevent horizontal scroll */
section {
    overflow-x: hidden;
    width: 100%;
}

/* ===== MOBILE RESPONSIVE (max-width: 768px) ===== */
@media (max-width: 768px) {
    /* Container mobile */
    .container {
        padding: 0 15px;
    }
    
    /* Hero section mobile */
    .hero {
        min-height: 100vh;
        height: auto;
    }
    
    .hero-content {
        padding: 20px 15px;
        text-align: center;
    }
    
    .hero-title {
        font-size: 32px !important;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 18px !important;
    }
    
    .hero-description {
        font-size: 14px !important;
    }
    
    .hero-buttons {
        flex-direction: column;
        gap: 15px;
        width: 100%;
    }
    
    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }
    
    /* Navbar mobile */
    .navbar {
        padding: 10px 0;
    }
    
    .nav-wrapper {
        padding: 0 15px;
    }
    
    .logo-img {
        width: 40px;
        height: 40px;
    }
    
    .logo-title {
        font-size: 14px;
    }
    
    .logo-subtitle {
        font-size: 10px;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--white, #fff);
        flex-direction: column;
        padding: 20px;
        transition: left 0.3s ease;
        overflow-y: auto;
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-link {
        padding: 15px 10px;
        width: 100%;
        text-align: left;
        border-bottom: 1px solid #eee;
    }
    
    /* Mobile toggle button */
    .mobile-toggle {
        display: flex !important;
        flex-direction: column;
        gap: 5px;
        width: 30px;
        height: 25px;
        cursor: pointer;
        z-index: 1001;
    }
    
    .mobile-toggle span {
        display: block;
        width: 100%;
        height: 3px;
        background: var(--primary, #d4af37);
        transition: all 0.3s ease;
    }
    
    .mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }
    
    .mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
    
    /* Stats section mobile */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    .stat-card {
        padding: 20px;
    }
    
    /* Section titles mobile */
    .section-title {
        font-size: 28px !important;
        line-height: 1.3;
    }
    
    .section-subtitle {
        font-size: 14px !important;
    }
    
    /* Grid layouts mobile */
    .profil-features,
    .program-grid,
    .prestasi-grid,
    .fasilitas-grid,
    .blog-grid,
    .kegiatan-masonry {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    /* Cards mobile */
    .profil-card,
    .program-card,
    .prestasi-card,
    .fasilitas-card,
    .blog-card,
    .kegiatan-card,
    .kegiatan-card-modern {
        margin-bottom: 20px;
    }
    
    /* Video section mobile */
    .video-content {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }
    
    .video-wrapper {
        order: -1;
    }
    
    /* Boarding features mobile */
    .boarding-features {
        grid-template-columns: 1fr !important;
    }
    
    /* Schedule grid mobile */
    .schedule-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Footer mobile */
    .footer-content {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }
    
    .footer-col {
        text-align: center;
    }
    
    /* Buttons mobile */
    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }
    
    /* Dropdown mobile - FIX */
    .dropdown-menu {
        position: static !important;
        width: 100%;
        box-shadow: none;
        background: rgba(212, 175, 55, 0.1);
        margin-top: 0;
        padding: 10px 0;
        display: none;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        border-radius: 0;
    }
    
    .nav-item-dropdown.active .dropdown-menu {
        display: block;
        max-height: 500px;
        padding: 10px 0;
    }
    
    .dropdown-link {
        padding: 12px 20px;
        display: flex;
        align-items: center;
        gap: 10px;
        color: #333;
        text-decoration: none;
        transition: all 0.3s ease;
        border-left: 3px solid transparent;
    }
    
    .dropdown-link:hover {
        background: rgba(212, 175, 55, 0.2);
        border-left-color: #d4af37;
        padding-left: 25px;
    }
    
    .dropdown-link i {
        color: #d4af37;
        font-size: 14px;
    }
    
    /* Visi Misi mobile */
    .visi-misi-wrapper {
        grid-template-columns: 1fr !important;
    }
    
    /* Sambutan mobile */
    .sambutan-content {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }
    
    .sambutan-photo {
        text-align: center;
    }
    
    /* Persyaratan mobile */
    .persyaratan-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* TNI Training mobile */
    .tni-training-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Benefits grid mobile */
    .benefits-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Gallery mobile */
    .gallery-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Jadwal pendaftaran mobile */
    .jalur-card {
        padding: 20px;
    }
    
    .jalur-header h4 {
        font-size: 16px;
    }
    
    .jalur-periode {
        font-size: 12px;
    }
}

/* ===== SMALL MOBILE (max-width: 480px) ===== */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .hero-title {
        font-size: 24px !important;
    }
    
    .hero-subtitle {
        font-size: 16px !important;
    }
    
    .section-title {
        font-size: 24px !important;
    }
    
    .logo-title {
        font-size: 12px;
    }
    
    .logo-subtitle {
        font-size: 9px;
    }
    
    .btn {
        padding: 10px 15px;
        font-size: 13px;
    }
}

/* ===== TABLET (768px - 1024px) ===== */
@media (min-width: 769px) and (max-width: 1024px) {
    .container {
        max-width: 960px;
        padding: 0 30px;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .profil-features,
    .program-grid,
    .prestasi-grid,
    .fasilitas-grid,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .kegiatan-masonry {
        grid-template-columns: repeat(2, 1fr) !important;
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr) !important;
    }
}

/* ===== DESKTOP (min-width: 1025px) ===== */
@media (min-width: 1025px) {
    .mobile-toggle {
        display: none !important;
    }
    
    .nav-menu {
        display: flex !important;
        position: static;
        flex-direction: row;
        height: auto;
        background: transparent;
        padding: 0;
    }
    
    .nav-link {
        border-bottom: none;
    }
    
    /* Dropdown desktop */
    .dropdown-menu {
        position: absolute;
        top: 100%;
        left: 0;
        min-width: 250px;
        background: white;
        box-shadow: 0 5px 20px rgba(0,0,0,0.1);
        border-radius: 8px;
        padding: 10px 0;
        opacity: 0;
        visibility: hidden;
        transform: translateY(10px);
        transition: all 0.3s ease;
    }
    
    .nav-item-dropdown:hover .dropdown-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .hero-buttons,
    .mobile-toggle,
    .back-to-top,
    .footer-social {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
