/* ================================================
   MOBILE ENHANCEMENTS
   Comprehensive mobile optimization
   ================================================ */

/* Hamburger Menu Fix */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    background: transparent;
    border: none;
}

.hamburger .bar {
    width: 28px;
    height: 3px;
    background-color: var(--text-primary);
    transition: all 0.3s ease;
    border-radius: 3px;
}

.hamburger.active .bar:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Touch-friendly elements */
@media (max-width: 992px) {
    /* Show hamburger on mobile */
    .hamburger {
        display: flex !important;
    }
    
    /* Mobile menu styling */
    .nav-menu {
        position: fixed !important;
        top: 80px !important;
        left: -100% !important;
        width: 100% !important;
        height: calc(100vh - 80px) !important;
        background: rgba(255, 255, 255, 0.98) !important;
        backdrop-filter: blur(10px) !important;
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: center !important;
        padding: 50px 0 !important;
        transition: left 0.3s ease !important;
        z-index: 999 !important;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }
    
    .nav-menu.active {
        left: 0 !important;
    }
    
    .nav-link {
        padding: 15px 30px !important;
        font-size: 1.1rem !important;
        width: 100% !important;
        text-align: center !important;
        border-bottom: 1px solid #e2e8f0 !important;
    }
    
    .nav-link.booking-btn {
        margin-top: 20px !important;
        width: 200px !important;
        text-align: center !important;
    }
    
    /* Increase touch targets */
    button, .btn, .nav-link, a {
        min-height: 44px;
        min-width: 44px;
    }
    
    /* Better spacing for mobile */
    .container {
        padding: 0 15px;
    }
    
    /* Logo adjustment for mobile */
    .logo-image {
        height: 60px !important;
        width: auto !important;
    }
    
    /* Navbar mobile fix */
    .navbar {
        padding: 8px 0 !important;
    }
    
    .nav-container {
        padding: 0 15px;
        position: relative;
    }
    
    /* Prevent body scroll when menu is open */
    body.menu-open {
        overflow: hidden;
    }
}

/* Tablet adjustments */
@media (max-width: 768px) {
    /* Typography scaling */
    html {
        font-size: 14px;
    }
    
    h1, .hero-title {
        font-size: 2rem !important;
        line-height: 1.2;
    }
    
    h2 {
        font-size: 1.75rem !important;
    }
    
    h3 {
        font-size: 1.5rem !important;
    }
    
    /* Package cards mobile */
    .packages-selector {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    .package-option {
        margin: 0 auto;
        max-width: 100%;
    }
    
    /* Forms mobile */
    .form-row {
        grid-template-columns: 1fr !important;
    }
    
    input, select, textarea, button {
        font-size: 16px !important; /* Prevents zoom on iOS */
    }
    
    /* Hero sections */
    .hero-content {
        padding: 60px 20px 40px !important;
    }
    
    .page-hero {
        min-height: 400px !important;
    }
    
    /* Stats and features */
    .hero-stats {
        flex-direction: column;
        gap: 15px;
    }
    
    .stat-item {
        width: 100%;
        text-align: center;
    }
    
    /* Grid layouts */
    .features-grid,
    .services-grid,
    .team-grid,
    .ponies-grid {
        grid-template-columns: 1fr !important;
        gap: 20px;
    }
    
    /* Map container */
    .map-container {
        grid-template-columns: 1fr !important;
        gap: 30px;
    }
    
    .map-embed iframe {
        height: 300px !important;
    }
    
    /* Contact cards */
    .contact-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr !important;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
    
    /* Comparison table */
    .comparison-table {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    .comparison-header,
    .comparison-row {
        min-width: 600px;
    }
    
    /* Package details */
    .package-detailed {
        margin-bottom: 30px;
    }
    
    .package-info {
        padding: 20px;
    }
}

/* Mobile phone specific */
@media (max-width: 480px) {
    /* Even smaller typography */
    html {
        font-size: 13px;
    }
    
    h1, .hero-title {
        font-size: 1.75rem !important;
    }
    
    h2 {
        font-size: 1.5rem !important;
    }
    
    /* Logo smaller on small phones */
    .logo-image {
        height: 50px !important;
    }
    
    /* Buttons full width */
    .btn, .package-book-btn, .submit-btn {
        width: 100% !important;
        padding: 15px !important;
    }
    
    /* Package pricing */
    .package-price .amount {
        font-size: 2rem !important;
    }
    
    /* Modal adjustments */
    .modal-content {
        width: 95% !important;
        margin: 20px auto !important;
        padding: 20px !important;
    }
    
    /* Gallery */
    .gallery-masonry {
        grid-template-columns: 1fr !important;
        gap: 15px;
    }
    
    /* Booking steps */
    .booking-container {
        padding: 20px 10px !important;
    }
    
    .step-badge {
        font-size: 0.9rem !important;
        padding: 5px 12px !important;
    }
    
    /* Add-ons grid */
    .addons-grid {
        grid-template-columns: 1fr !important;
    }
    
    /* Package highlights */
    .package-highlights li {
        font-size: 0.9rem;
        padding: 8px 0;
    }
    
    /* Comparison table scroll hint */
    .comparison-table::after {
        content: '← Scroll to see more →';
        display: block;
        text-align: center;
        padding: 10px;
        color: #667eea;
        font-size: 0.85rem;
        font-weight: 500;
    }
}

/* Landscape mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .page-hero {
        min-height: 300px !important;
    }
    
    .hero-content {
        padding: 40px 20px !important;
    }
    
    .nav-menu {
        height: calc(100vh - 60px) !important;
        padding: 30px 0 !important;
    }
}

/* iOS specific fixes */
@supports (-webkit-touch-callout: none) {
    /* Fix iOS input zoom */
    input, select, textarea {
        font-size: 16px !important;
    }
    
    /* Fix iOS sticky hover states */
    .package-option:hover,
    .btn:hover {
        transform: none !important;
    }
}

/* Prevent horizontal scroll */
body {
    overflow-x: hidden;
}

* {
    max-width: 100%;
}

/* Improve touch scrolling */
.nav-menu,
.modal-content,
.comparison-table {
    -webkit-overflow-scrolling: touch;
}

/* Loading states for mobile */
@media (max-width: 768px) {
    .loading {
        font-size: 0.9rem;
    }
    
    .spinner {
        width: 30px !important;
        height: 30px !important;
    }
}

/* Accessibility improvements */
@media (max-width: 768px) {
    /* Larger tap targets */
    .faq-question {
        padding: 20px !important;
        min-height: 60px;
    }
    
    /* Better spacing */
    .section {
        padding: 40px 0 !important;
    }
    
    /* Readable text */
    p {
        line-height: 1.6;
    }
}
