/* =================== MOBILE FIX - GUIDE TOUR INDONESIA =================== */
/* File ini memperbaiki tampilan mobile agar rapi dan responsive */

/* =================== GENERAL MOBILE FIXES =================== */
@media (max-width: 768px) {

    /* Prevent horizontal scroll */
    html,
    body {
        overflow-x: hidden;
        width: 100%;
        max-width: 100vw;
    }

    /* Fix container padding */
    .container {
        padding: 30px 1rem !important;
        max-width: 100%;
    }

    /* Fix navbar height */
    .navbar {
        padding: 0.5rem 0 !important;
    }

    .navbar-container {
        padding: 0 1rem !important;
    }

    .navbar-logo {
        width: 60px !important;
        height: 60px !important;
    }

    .navbar-logo img {
        width: 80px !important;
        height: 80px !important;
    }

    /* Fix hero section */
    .hero-section {
        margin-top: 60px !important;
        min-height: 500px !important;
        height: auto !important;
        padding: 40px 0 !important;
    }

    .hero-content {
        padding: 20px 15px !important;
    }

    .hero-content h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
        margin: 10px 0 !important;
    }

    .hero-content>p {
        font-size: 0.95rem !important;
        margin: 10px 0 20px 0 !important;
    }

    .hero-badge {
        font-size: 10px !important;
        padding: 6px 12px !important;
        margin-bottom: 15px !important;
    }

    /* Fix Destinasi Provinsi Pilihan */
    .search-favorite-provinsi {
        padding: 0 10px !important;
        margin-bottom: 15px !important;
        gap: 8px !important;
    }

    .search-favorite-provinsi h3 {
        font-size: 11px !important;
        margin-bottom: 8px !important;
        letter-spacing: 0.3px !important;
    }

    .favorite-provinsi-btn {
        padding: 8px 12px !important;
        min-width: 85px !important;
        font-size: 10px !important;
        gap: 4px !important;
    }

    .provinsi-name {
        font-size: 10px !important;
        font-weight: 600 !important;
    }

    .provinsi-star {
        font-size: 12px !important;
    }

    /* Fix Search Bar */
    .search-bar-wrapper {
        margin-top: 15px !important;
        padding: 10px 12px !important;
        border-radius: 10px !important;
        flex-direction: column !important;
        gap: 0 !important;
    }

    .search-input-group {
        width: 100% !important;
        flex: 1 1 100% !important;
        min-width: 100% !important;
        padding: 10px 12px !important;
        border-right: none !important;
        border-bottom: 1px solid #e5e7eb !important;
        min-height: 40px !important;
    }

    .search-input-group:last-of-type {
        border-bottom: none !important;
    }

    .search-input-group.full {
        border-bottom: 1px solid #e5e7eb !important;
    }

    .search-input-group i {
        font-size: 14px !important;
    }

    .search-input-group input,
    .search-input-group select {
        font-size: 12px !important;
    }

    .search-btn {
        width: 100% !important;
        margin: 10px 0 0 0 !important;
        padding: 10px 16px !important;
        font-size: 13px !important;
    }

    /* Fix Section Headers */
    .section-header {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 15px !important;
        margin-bottom: 30px !important;
    }

    .section-header h2 {
        font-size: 1.6rem !important;
        margin-bottom: 8px !important;
    }

    .section-subtitle {
        font-size: 13px !important;
    }

    .view-all-btn {
        padding: 8px 16px !important;
        font-size: 12px !important;
    }

    /* Fix Wisata Cards */
    .featured-wisata-grid {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
        margin-bottom: 50px !important;
    }

    .wisata-featured-card .image-wrapper {
        height: 200px !important;
    }

    .wisata-featured-card .card-content {
        padding: 16px !important;
    }

    .wisata-featured-card h3 {
        font-size: 1.1rem !important;
        margin: 8px 0 !important;
    }

    .wisata-featured-card p {
        font-size: 13px !important;
        margin: 8px 0 !important;
    }

    .wisata-featured-card .location {
        font-size: 12px !important;
    }

    .wisata-featured-card .ticket-price {
        font-size: 13px !important;
    }

    .wisata-featured-card .new-badge {
        padding: 6px 12px !important;
        font-size: 11px !important;
        top: 12px !important;
        left: 12px !important;
    }

    /* Fix Cities Section */
    .cities-section {
        margin-bottom: 50px !important;
    }

    .cities-carousel {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .city-card {
        height: 240px !important;
    }

    .city-card h3 {
        font-size: 1.3rem !important;
    }

    .city-card .location {
        font-size: 12px !important;
        margin-bottom: 10px !important;
    }

    .city-card .explore-link {
        font-size: 13px !important;
    }

    .city-card-overlay {
        padding: 20px !important;
    }

    /* Fix Blog Section */
    .blog-section {
        margin-bottom: 40px !important;
    }

    .blog-content {
        grid-template-columns: 1fr !important;
        gap: 25px !important;
    }

    .blog-featured {
        height: 300px !important;
    }

    .blog-featured-overlay {
        padding: 20px !important;
    }

    .blog-featured h3 {
        font-size: 1.4rem !important;
    }

    .blog-featured p {
        font-size: 13px !important;
    }

    .blog-featured-badge {
        padding: 6px 12px !important;
        font-size: 11px !important;
    }

    .blog-list {
        gap: 20px !important;
    }

    .blog-item {
        grid-template-columns: 100px 1fr !important;
        gap: 12px !important;
    }

    .blog-item img {
        width: 100px !important;
        height: 80px !important;
    }

    .blog-item-content h4 {
        font-size: 0.95rem !important;
        margin-bottom: 6px !important;
    }

    .blog-item-badge {
        font-size: 10px !important;
        margin-bottom: 6px !important;
    }

    .blog-item-date {
        font-size: 11px !important;
    }

    /* Fix Booking Section */
    .booking-section {
        padding: 30px 1rem !important;
        margin: 40px 0 !important;
    }

    .booking-header h2 {
        font-size: 1.6rem !important;
    }

    .booking-header p {
        font-size: 13px !important;
    }

    .booking-tabs-wrapper {
        gap: 8px !important;
        margin-bottom: 25px !important;
    }

    .booking-tab {
        padding: 10px 16px !important;
        font-size: 12px !important;
        flex: 1 1 calc(50% - 8px) !important;
        justify-content: center !important;
    }

    .booking-tab i {
        font-size: 14px !important;
    }

    .accommodation-booking,
    .guide-booking {
        padding: 20px !important;
    }

    .booking-form,
    .form-grid {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .form-group label {
        font-size: 13px !important;
    }

    .form-group input,
    .form-group select {
        padding: 10px 12px !important;
        font-size: 13px !important;
    }

    .form-actions {
        flex-direction: column !important;
        gap: 10px !important;
    }

    .btn-search,
    .btn-whatsapp {
        width: 100% !important;
        padding: 12px 24px !important;
        font-size: 14px !important;
    }

    .guide-info {
        grid-template-columns: 1fr !important;
        gap: 16px !important;
    }

    .guide-card {
        padding: 20px !important;
    }

    .guide-card i {
        font-size: 40px !important;
    }

    .guide-card h3 {
        font-size: 1rem !important;
    }

    .guide-card p {
        font-size: 13px !important;
    }
}

/* =================== EXTRA SMALL MOBILE (< 400px) =================== */
@media (max-width: 400px) {
    .hero-content h1 {
        font-size: 1.75rem !important;
    }

    .search-favorite-provinsi h3 {
        font-size: 10px !important;
    }

    .favorite-provinsi-btn {
        padding: 7px 10px !important;
        min-width: 75px !important;
        font-size: 9px !important;
    }

    .provinsi-name {
        font-size: 9px !important;
    }

    .provinsi-star {
        font-size: 11px !important;
    }

    .section-header h2 {
        font-size: 1.4rem !important;
    }

    .wisata-featured-card h3 {
        font-size: 1rem !important;
    }

    .city-card {
        height: 220px !important;
    }

    .city-card h3 {
        font-size: 1.2rem !important;
    }

    .blog-featured h3 {
        font-size: 1.3rem !important;
    }

    .blog-item {
        grid-template-columns: 90px 1fr !important;
    }

    .blog-item img {
        width: 90px !important;
        height: 70px !important;
    }
}

/* =================== LANDSCAPE MODE =================== */
@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: 100vh !important;
        height: 100vh !important;
    }

    .hero-content h1 {
        font-size: 1.8rem !important;
    }

    .hero-content>p {
        font-size: 0.9rem !important;
        margin: 8px 0 15px 0 !important;
    }

    .search-favorite-provinsi {
        margin-bottom: 10px !important;
    }

    .search-bar-wrapper {
        margin-top: 10px !important;
    }
}

/* =================== FIX OVERFLOW ISSUES =================== */
* {
    box-sizing: border-box;
}

img {
    max-width: 100%;
    height: auto;
}

.container,
.search-bar-wrapper,
.booking-container,
.hero-content,
.section-header {
    max-width: 100%;
}

/* Prevent text overflow */
h1,
h2,
h3,
h4,
h5,
h6,
p {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* =================== SMOOTH SCROLLING =================== */
html {
    scroll-behavior: smooth;
}

/* =================== TOUCH IMPROVEMENTS =================== */
@media (hover: none) and (pointer: coarse) {

    /* Increase tap targets for mobile */
    .booking-tab,
    .favorite-provinsi-btn,
    .search-btn,
    .btn-login,
    .btn-daftar,
    .view-all-btn {
        min-height: 44px !important;
        min-width: 44px !important;
    }

    /* Remove hover effects on touch devices */
    .wisata-featured-card:hover,
    .city-card:hover,
    .blog-item:hover {
        transform: none !important;
    }
}