/* ==========================================================================
   MOBILE RESPONSIVE STYLES - Caniparc
   ========================================================================== */

/* Base Mobile Reset */
* {
    -webkit-tap-highlight-color: transparent;
}

/* Typography - Mobile Optimized */
@media (max-width: 768px) {
    html {
        font-size: 14px;
    }

    h1 {
        font-size: 1.8rem !important;
    }

    h2 {
        font-size: 1.5rem !important;
    }

    h3 {
        font-size: 1.2rem !important;
    }

    p {
        font-size: 1rem;
        line-height: 1.6;
    }
}

/* Header & Navigation - Mobile */
@media (max-width: 768px) {
    .site-header {
        padding: 0.75rem 0;
    }

    .site-header .container {
        padding: 0 15px;
    }

    .site-header .logo img {
        width: 100px !important;
        max-width: 100px;
    }

    .site-header .main-nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: #ffdb17;
        transition: right 0.3s ease;
        z-index: 9999;
        overflow-y: auto;
        padding-top: 60px;
        box-shadow: -2px 0 10px rgba(0, 0, 0, 0.1);
    }

    .site-header .main-nav.active {
        right: 0;
    }

    .site-header .main-nav ul {
        flex-direction: column !important;
        gap: 0 !important;
        padding: 20px 0;
    }

    .site-header .nav-item {
        width: 100%;
        border-bottom: 1px solid rgba(51, 51, 51, 0.1);
    }

    .site-header .nav-item a {
        display: block;
        padding: 15px 20px;
        font-size: 1.1rem;
    }

    .site-header .btn-outline,
    .site-header .btn-primary {
        margin: 10px 20px !important;
        display: block;
        text-align: center;
    }

    /* Mobile Menu Toggle */
    .mobile-menu-toggle {
        display: block;
        background: transparent;
        border: none;
        font-size: 1.8rem;
        cursor: pointer;
        padding: 5px;
        color: #333;
        z-index: 10001;
    }

    .mobile-menu-toggle.active {
        position: fixed;
        right: 15px;
        top: 15px;
    }

    /* Region Selector Mobile */
    #region-selector {
        position: relative !important;
        right: auto !important;
        margin: 10px 20px !important;
    }

    #region-dropdown {
        right: 20px !important;
    }
}

/* Desktop - Hide Mobile Toggle */
@media (min-width: 769px) {
    .mobile-menu-toggle {
        display: none;
    }
}

/* Hero Sections - Mobile */
@media (max-width: 768px) {
    .hero-section {
        padding: 80px 20px 60px !important;
        min-height: auto !important;
    }

    .hero-section h1 {
        font-size: 1.8rem !important;
        margin-bottom: 15px !important;
    }

    .hero-section p {
        font-size: 1rem !important;
        margin-bottom: 20px !important;
    }

    .hero-section .btn {
        display: block;
        width: 100%;
        max-width: 300px;
        margin: 10px auto;
    }
}

/* Grid & Layout - Mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .row {
        margin: 0 -10px;
    }

    [class*="col-"] {
        padding: 0 10px;
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    .section {
        padding: 40px 0 !important;
    }
}

/* Cards & Articles - Mobile */
@media (max-width: 768px) {

    .card-modern,
    .feature-item,
    article {
        margin-bottom: 20px;
        padding: 20px !important;
    }

    .feature-item img,
    article img {
        max-width: 100%;
        height: auto;
    }
}

/* Map - Mobile */
@media (max-width: 768px) {
    #map {
        height: 60vh !important;
        min-height: 400px;
    }

    .leaflet-control-container {
        font-size: 0.9rem;
    }

    .leaflet-popup-content {
        min-width: 180px !important;
    }
}

/* Park Detail - Mobile */
@media (max-width: 768px) {
    .park-header {
        padding: 20px !important;
    }

    .park-header h1 {
        font-size: 1.6rem !important;
    }

    .park-info {
        flex-direction: column;
        gap: 15px;
    }

    .park-info-item {
        width: 100%;
    }
}

/* Forms - Mobile */
@media (max-width: 768px) {
    .form-group {
        margin-bottom: 20px;
    }

    input[type="text"],
    input[type="email"],
    input[type="tel"],
    textarea,
    select {
        font-size: 16px !important;
        /* Prevent iOS zoom */
        padding: 12px;
    }

    .btn[type="submit"] {
        width: 100%;
        padding: 15px;
        font-size: 1.1rem;
    }
}

/* Tables - Mobile */
@media (max-width: 768px) {
    table {
        display: block;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    thead {
        display: none;
    }

    tbody,
    tr,
    td {
        display: block;
        width: 100%;
    }

    tr {
        margin-bottom: 15px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 10px;
    }

    td {
        text-align: right;
        padding: 10px 5px;
        position: relative;
        padding-left: 50%;
    }

    td:before {
        content: attr(data-label);
        position: absolute;
        left: 10px;
        font-weight: bold;
        text-align: left;
    }
}

/* Footer - Mobile */
@media (max-width: 768px) {
    .site-footer {
        padding: 30px 0 !important;
    }

    .footer-columns {
        flex-direction: column;
        gap: 30px;
    }

    .footer-columns .col {
        width: 100%;
        text-align: center;
    }
}

/* Blog/Guide List - Mobile */
@media (max-width: 768px) {

    .blog-list,
    .guide-list {
        gap: 20px;
    }

    .blog-item,
    .guide-item {
        padding: 15px;
    }

    .blog-item img,
    .guide-item img {
        width: 100%;
        height: auto;
        margin-bottom: 15px;
    }
}

/* City List - Mobile */
@media (max-width: 768px) {
    .city-grid {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
}

/* Review Section - Mobile */
@media (max-width: 768px) {
    .review-item {
        padding: 15px !important;
        margin-bottom: 15px;
    }

    .review-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .review-rating {
        margin-top: 10px;
    }
}

/* Utilities - Mobile */
@media (max-width: 768px) {
    .hide-mobile {
        display: none !important;
    }

    .show-mobile {
        display: block !important;
    }

    .text-center-mobile {
        text-align: center !important;
    }

    /* Spacing */
    .mb-mobile {
        margin-bottom: 20px;
    }

    .mt-mobile {
        margin-top: 20px;
    }

    .p-mobile {
        padding: 15px;
    }
}

/* Touch Optimizations */
@media (max-width: 768px) {

    a,
    button,
    .btn {
        min-height: 44px;
        min-width: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    /* Remove hover effects on touch */
    .feature-item:hover,
    article:hover {
        transform: none;
    }
}

/* Landscape Phone */
@media (max-width: 768px) and (orientation: landscape) {
    .hero-section {
        padding: 60px 20px 40px !important;
    }

    #map {
        height: 50vh !important;
    }
}

/* Small Phones */
@media (max-width: 480px) {
    html {
        font-size: 13px;
    }

    h1 {
        font-size: 1.6rem !important;
    }

    .btn {
        padding: 10px 20px;
        font-size: 0.95rem;
    }

    .site-header .logo img {
        width: 80px !important;
    }
}