/* * Project: PT Bus Pariwisata Lombok
 * Theme: Responsive Breakpoints
 * Author: Pejuang di Balik Layar
 * Description: Media queries for mobile, tablet, and wide screens.
 */

/* =========================================
   1. TABLET & SMALL DESKTOP (Max 1024px)
   ========================================= */
@media screen and (max-width: 1024px) {
    :root {
        --container-width: 95%; /* Gunakan lebar lebih fleksibel */
    }

    .hero-title {
        font-size: 2.8rem; /* Kecilkan font hero sedikit */
    }

    .booking-form {
        gap: 15px;
    }

    /* Grid adjustments */
    .grid-3 {
        grid-template-columns: repeat(2, 1fr); /* 2 Kolom di tablet */
    }
    
    .grid-2 {
        gap: 30px;
    }
}

/* =========================================
   2. MOBILE DEVICES (Max 768px)
   ========================================= */
@media screen and (max-width: 768px) {
    
    /* --- HEADER & NAV --- */
    .header {
        height: 70px;
    }

    /* Sembunyikan menu desktop standar */
    .main-nav {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 20px 0;
        box-shadow: 0 10px 20px rgba(0,0,0,0.1);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0); /* Hidden state */
        transition: all 0.4s ease-in-out;
        border-bottom: 1px solid var(--border-color);
    }

    /* Class ini akan ditoggle oleh JS nanti */
    .main-nav.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); /* Visible state */
    }

    .nav-list {
        flex-direction: column;
        gap: 0;
        text-align: center;
    }

    .nav-list li {
        width: 100%;
    }

    .nav-link {
        display: block;
        padding: 15px 0;
        font-size: 1.1rem;
        border-bottom: 1px solid #f0f0f0;
    }

    .nav-link:hover::after {
        width: 0; /* Matikan underline di mobile */
    }

    .header-cta .btn {
        display: none; /* Sembunyikan tombol WA di header mobile agar tidak sempit */
    }

    .mobile-toggle {
        display: flex; /* Munculkan hamburger menu */
        z-index: 1001;
    }

    /* Animasi Hamburger menjadi X saat aktif */
    .mobile-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    .mobile-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    .mobile-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }

    /* --- HERO SECTION (MOBILE FIX) --- */
    .hero-section {
        height: auto;
        min-height: 80vh; /* Kurangi tinggi minimum agar tidak scroll terlalu jauh */
        padding-top: 120px; /* Beri ruang dari header */
        padding-bottom: 50px;
        text-align: center;
        
        /* FIX BG MOBILE: Posisi diatur agar objek utama (bus) terlihat */
        background-attachment: scroll; 
        background-position: center top; /* Fokus ke tengah atas gambar */
        background-size: cover;
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .hero-desc {
        font-size: 1rem;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        flex-direction: column;
        width: 100%;
        gap: 15px;
    }

    .hero-actions .btn {
        width: 100%;
    }

    .hero-stats {
        flex-direction: column;
        gap: 20px;
        border-top: none;
        padding-top: 20px;
    }

    /* --- BOOKING BAR --- */
    .booking-bar-section {
        margin-top: 0;
        padding: 0 15px;
    }

    .glass-panel {
        flex-direction: column;
        gap: 15px;
        padding: 20px;
    }

    .form-group {
        width: 100%;
    }

    /* --- SECTIONS GENERIC --- */
    .section {
        padding: 50px 0;
    }

    .section-title {
        font-size: 2rem;
    }

    /* --- GRIDS --- */
    .grid-3, .grid-2 {
        grid-template-columns: 1fr; /* Stack 1 kolom */
        gap: 40px;
    }

    /* Feature card image height */
    .card-img-wrapper {
        height: 200px;
    }

    /* --- FOOTER --- */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

    .footer-logo {
        margin: 0 auto 15px auto;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    /* Pindahkan Back to top sedikit agar tidak menutupi konten penting */
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 40px;
        height: 40px;
    }
}

/* =========================================
   3. SMALL MOBILE (Max 480px)
   ========================================= */
@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
    }

    .btn-lg {
        padding: 14px 24px;
        font-size: 1rem;
    }
    
    /* Pastikan form input font size min 16px untuk mencegah zoom otomatis di iOS */
    input, select, textarea {
        font-size: 16px !important;
    }
}