/* Responsive CSS optimizado para TRAE Valdivia */

/* TABLET RESPONSIVE */
@media (min-width: 768px) {
    :root {
        --container-max: 720px;
    }
    
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonial-card {
        margin-bottom: 0;
    }
    
    .vehicle-details {
        padding: var(--space-lg);
    }
    
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* DESKTOP RESPONSIVE */
@media (min-width: 992px) {
    :root {
        --container-max: 960px;
    }
    
    .container-large {
        max-width: 1200px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .hero p {
        font-size: 1.1rem;
    }
    
    .blog-grid {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* LARGE DESKTOP RESPONSIVE */
@media (min-width: 1200px) {
    :root {
        --container-max: 1140px;
    }
}

/* MOBILE OPTIMIZATIONS */
@media (max-width: 767px) {
    /* Optimize form layout for mobile */
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .trust-badges {
        gap: 12px;
    }
    
    .booking-card {
        padding: var(--space-md) var(--space-sm);
    }
    
    /* Improve touch target sizes for mobile */
    .btn, 
    button, 
    .vehicle-nav-item,
    .vehicle-option,
    input[type="submit"] {
        min-height: 44px; /* Minimum Apple recommends */
        font-size: 16px; /* Prevent auto-zoom on iOS */
    }
    
    /* Prevent scrolling issues with fixed elements */
    .header, 
    .floating-buttons {
        -webkit-overflow-scrolling: touch;
        will-change: transform;
    }
    
    /* Prevent tap highlight color on iOS */
    * {
        -webkit-tap-highlight-color: rgba(0,0,0,0);
    }
    
    /* Ensure all form elements have adequate size to prevent zooming */
    .form-control {
        font-size: 16px; /* Prevent zoom on iOS */
        height: 44px; /* Adequate tap target */
    }
    
    .hero h1 {
        padding: 0 var(--space-sm);
    }
    
    .hero p {
        padding: 0 var(--space-sm);
    }
    
    .tourism-features {
        gap: var(--space-sm);
    }
    
    /* Fix for iOS form elements */
    input[type="date"], 
    input[type="time"], 
    select {
        font-size: 16px;
        height: 44px;
    }
    
    .vehicles-display {
        height: 500px; /* Fixed height for mobile */
        overflow: hidden;
    }
    
    .vehicle-item {
        position: absolute;
        flex-direction: column;
        height: 100%;
        overflow-y: auto;
    }
    
    .vehicle-image {
        width: 100%;
        height: 200px;
    }
    
    .vehicle-details {
        width: 100%;
        padding: var(--space-md);
    }
    
    /* Optimize horizontal scrolling components */
    .vehicles-nav {
        padding-bottom: 16px;
        overflow-x: auto;
        display: flex;
        justify-content: flex-start;
        -webkit-overflow-scrolling: touch;
        margin-bottom: 20px;
        gap: 10px;
        scrollbar-width: none; /* For Firefox */
        -ms-overflow-style: none; /* For Internet Explorer and Edge */
    }
    
    .vehicles-nav::-webkit-scrollbar {
        display: none; /* For WebKit browsers */
    }
    
    .vehicle-nav-item {
        flex: 0 0 auto;
        min-width: 120px;
        width: auto;
        padding: 8px 12px;
    }
    
    /* Make pricing table more compact */
    .pricing-table th:nth-child(3),
    .pricing-table td:nth-child(3) {
        text-align: right;
    }
    
    .pricing-table th:last-child,
    .pricing-table td:last-child {
        text-align: center;
    }
    
    .section-subtitle {
        padding: 0 var(--space-md);
    }
    
    /* Keep vehicle options horizontal on mobile */
    .vehicle-options {
        flex-direction: row;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: var(--space-sm);
        justify-content: flex-start;
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .vehicle-options::-webkit-scrollbar {
        display: none;
    }
    
    .vehicle-option {
        flex: 0 0 auto;
        min-width: 140px;
    }
    
    /* Tourism packages in smaller screens */
    .tourism-packages {
        flex-direction: column;
        align-items: center;
    }
    
    .tourism-package {
        width: 100%;
        max-width: 320px;
    }
    
    /* Route selector on mobile */
    .route-selector {
        flex-direction: column;
        gap: var(--space-sm);
    }
    
    .route-info {
        flex-direction: column;
        gap: var(--space-sm);
        align-items: center;
    }
    
    /* Language flags on mobile - optimize interaction */
    .language-selector-container {
        position: relative;
    }
    
    .language-flags {
        position: absolute;
        top: 45px;
        right: 0;
        display: flex;
        flex-direction: column;
        gap: 8px;
        background-color: var(--card-bg);
        border-radius: var(--border-radius);
        padding: 8px;
        box-shadow: var(--shadow);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
        z-index: 1000;
    }
    
    .language-flags.active {
        opacity: 1;
        pointer-events: all;
    }
    
    /* Form map responsive */
    .form-map-container {
        margin-top: var(--space-md);
    }
    
    .map-container, 
    #form-google-map {
        height: 250px;
    }
    
    /* Blog section responsive */
    .blog-grid {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }
    
    .blog-card {
        margin-bottom: var(--space-md);
    }
    
    .blog-image-container {
        height: 160px;
    }
    
    /* Special offer on mobile */
    .special-offer {
        padding: var(--space-sm) var(--space-xs);
    }
    
    .special-offer p {
        font-size: 0.8rem;
    }
    
    .offer-badge {
        font-size: 0.7rem;
        padding: 2px 8px;
    }
    
    /* Cookie consent on mobile */
    .cookie-content {
        flex-direction: column;
        text-align: center;
        gap: var(--space-sm);
    }
    
    .cookie-buttons {
        width: 100%;
        justify-content: center;
    }
    
    /* Optimize performance for mobile animations */
    .tourism-title,
    .tourism-badge,
    .tourism-text,
    .tourism-features,
    .tourism-packages,
    .tourism-cta {
        animation: none;
        opacity: 1;
        transform: none;
    }
    
    /* Only animate critical elements */
    .hero h1,
    .hero p,
    .hero-badges {
        animation-duration: 0.4s;
    }
}

/* SMALL MOBILE OPTIMIZATIONS */
@media (max-width: 480px) {
    /* Additional adjustments for very small screens */
    .vehicles-nav {
        margin-left: -15px;
        margin-right: -15px;
        padding-left: 15px;
        padding-right: 5px;
        width: calc(100% + 30px);
    }
    
    .vehicle-options {
        margin-left: -15px;
        margin-right: -15px;
        padding-left: 15px;
        padding-right: 5px;
        width: calc(100% + 30px);
    }
    
    .testimonial-header {
        flex-wrap: wrap;
    }
    
    .testimonial-rating {
        margin-left: 0;
        margin-top: 8px;
    }
    
    .footer-social {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }
    
    .hero-badges {
        flex-direction: column;
        align-items: center;
        gap: 8px;
    }
    
    .hero-badge {
        width: 80%;
        text-align: center;
    }
    
    /* Smaller font sizes on very small screens */
    .section-title {
        font-size: 1.5rem;
    }
    
    .section-subtitle {
        font-size: 0.9rem;
    }
    
    .hero h1 {
        font-size: 1.6rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
    
    /* Adjust margins on small screens */
    .section {
        padding: var(--space-md) 0;
    }
    
    /* Make footer more compact */
    .footer-col h3 {
        margin-bottom: var(--space-sm);
    }
    
    /* Improve form on small mobile */
    .form-title {
        font-size: 1.2rem;
    }
    
    .form-subtitle {
        font-size: 0.8rem;
    }
    
    .price-value {
        font-size: 1.4rem;
    }
    
    .floating-buttons {
        right: var(--space-sm);
        bottom: var(--space-sm);
    }
    
    .floating-whatsapp, 
    .floating-reservation {
        width: 50px;
        height: 50px;
    }
    
    .floating-whatsapp img, 
    .floating-reservation svg {
        width: 24px;
        height: 24px;
    }
    
    .floating-label {
        display: none;
    }
}

/* PRINT STYLES */
@media print {
    .header,
    .main-header,
    .footer,
    .footer-simple,
    .floating-buttons,
    .cookie-consent,
    .breadcrumbs,
    .breadcrumb-nav {
        display: none !important;
    }

    .hero-booking-container {
        background: none !important;
    }

    .booking-card {
        box-shadow: none !important;
        border: 1px solid #ccc !important;
    }

    body {
        background-color: white !important;
        color: black !important;
    }
}

/* Reduce motion preference support */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
    
    .hero h1,
    .hero p,
    .hero-badges,
    .booking-card,
    .why-us-item,
    .testimonial-card,
    .blog-card,
    .vehicle-item {
        opacity: 1 !important;
        transform: none !important;
    }
}

