/* ========================================
   RESPONSIVE DESIGN
   Diseño adaptativo para todos los dispositivos
======================================== */

/* ========================================
   LARGE DESKTOP (1400px+)
======================================== */

@media (min-width: 1400px) {
    :root {
        --spacing-xs: 0.75rem;
        --spacing-sm: 1.25rem;
        --spacing-md: 2rem;
        --spacing-lg: 2.5rem;
        --spacing-xl: 3.5rem;
        --spacing-xxl: 5rem;
    }
    
    .container {
        max-width: 1400px;
    }
    
    .hero-content {
        grid-template-columns: 2fr 1fr;
        gap: 5rem;
    }
    
    .hero-title {
        font-size: clamp(3rem, 6vw, 5rem);
    }
    
    .section-title {
        font-size: clamp(2.5rem, 5vw, 4rem);
    }
}

/* ========================================
   DESKTOP (1024px - 1399px)
======================================== */

@media (max-width: 1399px) and (min-width: 1024px) {
    .hero-content {
        gap: 3rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .fleet-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ========================================
   TABLET LANDSCAPE (768px - 1023px)
======================================== */

@media (max-width: 1023px) and (min-width: 768px) {
    .nav-container {
        padding: 0 var(--spacing-lg);
    }
    
    .nav-phone span {
        display: none;
    }
    
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }
    
    .hero-booking-card {
        order: -1;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    
    .about-main-info {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        text-align: center;
    }
    
    .about-hero-image {
        order: -1;
    }
    
    .about-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Facturación */
    .city-options {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .city-card {
        min-height: auto;
        padding: var(--spacing-lg);
    }
    
    .info-card {
        flex-direction: column;
        text-align: center;
    }
    
    .fleet-tabs {
        flex-wrap: wrap;
        gap: var(--spacing-sm);
    }
    
    .fleet-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ========================================
   TABLET PORTRAIT (600px - 767px)
======================================== */

@media (max-width: 767px) and (min-width: 600px) {
    .hero-title {
        font-size: clamp(2rem, 6vw, 3rem);
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-md);
    }
    
    .hero-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .feature-card {
        max-width: 500px;
        margin: 0 auto;
    }
    
    .fleet-grid {
        grid-template-columns: 1fr;
    }
    
    .fleet-card {
        max-width: 500px;
        margin: 0 auto;
    }
}

/* ========================================
   MOBILE (320px - 599px)
======================================== */

@media (max-width: 599px) {
    :root {
        --spacing-xs: 0.25rem;
        --spacing-sm: 0.5rem;
        --spacing-md: 1rem;
        --spacing-lg: 1.5rem;
        --spacing-xl: 2rem;
        --spacing-xxl: 2.5rem;
    }
    
    /* Navigation */
    .nav-container {
        height: 70px;
        padding: 0 var(--spacing-md);
    }
    
    .logo-img {
        height: 40px;
    }
    
    .nav-menu {
        position: fixed;
        top: 70px;
        left: 0;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--primary-dark);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: var(--spacing-xl);
        transform: translateX(-100%);
        transition: transform var(--transition-normal);
        z-index: 999;
    }
    
    .nav-menu.mobile-active {
        transform: translateX(0);
    }
    
    .nav-link {
        font-size: 1.2rem;
        padding: var(--spacing-md);
    }
    
    .nav-phone {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.9rem;
    }
    
    .nav-phone span {
        display: none;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(6px, 6px);
    }
    
    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(6px, -6px);
    }
    
    /* Hero Section */
    .hero-section {
        min-height: 100vh;
        padding-top: 70px;
    }
    
    .hero-content {
        padding: var(--spacing-lg) var(--spacing-md);
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
        text-align: center;
    }
    
    .hero-title {
        font-size: clamp(1.8rem, 8vw, 2.5rem);
        line-height: 1.2;
    }
    
    .hero-description {
        font-size: 1rem;
        max-width: 100%;
    }
    
    .hero-actions {
        flex-direction: column;
        gap: var(--spacing-md);
    }
    
    .hero-btn {
        width: 100%;
        justify-content: center;
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: 1rem;
    }
    
    .hero-booking-card {
        margin: 0 auto;
        padding: var(--spacing-lg);
        width: 100%;
        max-width: none;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .hero-scroll-indicator {
        bottom: 20px;
    }
    
    /* Sections */
    .container {
        padding: 0 var(--spacing-md);
    }
    
    section {
        padding: var(--spacing-xxl) 0;
    }
    
    .section-header {
        margin-bottom: var(--spacing-xl);
    }
    
    .section-title {
        font-size: clamp(1.5rem, 6vw, 2.5rem);
        line-height: 1.3;
    }
    
    .section-subtitle {
        font-size: 0.8rem;
        margin-bottom: var(--spacing-xs);
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .feature-card {
        padding: var(--spacing-lg);
        text-align: center;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: var(--spacing-md);
    }
    
    .feature-card h3 {
        font-size: 1.2rem;
        margin-bottom: var(--spacing-sm);
    }
    
    /* About Section */
    .about-main-info {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        padding: var(--spacing-lg);
        text-align: center;
    }
    
    .about-hero-image {
        order: -1;
    }
    
    .about-hero-image img {
        height: 250px;
    }
    
    .about-description h3 {
        font-size: 1.5rem;
        margin-bottom: var(--spacing-md);
    }
    
    .about-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
    

    
    /* Fleet */
    .fleet-tabs {
        flex-direction: column;
        gap: var(--spacing-sm);
        margin-bottom: var(--spacing-lg);
    }
    
    .fleet-tab {
        width: 100%;
        text-align: center;
        padding: var(--spacing-md);
        font-size: 0.9rem;
    }
    
    .fleet-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .contact-info h2 {
        font-size: 2rem;
        margin-bottom: var(--spacing-md);
    }
    
    .contact-info p {
        font-size: 1rem;
        margin-bottom: var(--spacing-lg);
    }
    
    .contact-methods {
        gap: var(--spacing-md);
    }
    
    .contact-method {
        padding: var(--spacing-md);
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: var(--spacing-sm);
    }
    
    .contact-method:hover {
        transform: translateY(-3px);
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .contact-form-container {
        padding: var(--spacing-lg);
    }
    
    .contact-form h3 {
        font-size: 1.3rem;
        margin-bottom: var(--spacing-md);
    }
    
    /* Footer */
    .main-footer {
        padding: var(--spacing-xl) 0 var(--spacing-md);
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        text-align: center;
    }
    
    .footer-logo {
        height: 50px;
        margin: 0 auto var(--spacing-md);
    }
    
    .social-links {
        justify-content: center;
    }
    
    .footer-contact p {
        justify-content: center;
    }
    
    .footer-bottom {
        padding-top: var(--spacing-md);
        font-size: 0.9rem;
    }
}

/* ========================================
   MODAL RESPONSIVE STYLES
======================================== */

@media (max-width: 768px) {
    .booking-modal .modal-content {
        width: 95%;
        max-width: none;
        margin: 2rem auto;
        max-height: calc(100vh - 4rem);
        overflow-y: auto;
    }
    
    .modal-header h2 {
        font-size: 1.3rem;
    }
    
    .step-indicator {
        gap: 0.5rem;
        flex-wrap: wrap;
    }
    
    .step-indicator .step {
        min-width: auto;
        padding: 0.5rem;
    }
    
    .step-indicator .step span {
        font-size: 0.7rem;
        display: none;
    }
    
    .modal-actions {
        flex-direction: column;
        gap: var(--spacing-sm);
    }
    
    .modal-actions button {
        width: 100%;
        justify-content: center;
    }
    
    .route-input-group {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .btn-swap {
        order: 2;
        justify-self: center;
        transform: rotate(90deg);
        margin: var(--spacing-sm) 0;
    }
    
    .route-options {
        grid-template-columns: 1fr;
        gap: var(--spacing-sm);
    }
    
    .option-card label {
        padding: var(--spacing-md);
        font-size: 0.9rem;
    }
    
    .datetime-selection {
        gap: var(--spacing-lg);
    }
    
    .quick-dates, .quick-times {
        justify-content: center;
    }
    
    .quick-date-btn, .quick-time-btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.8rem;
    }
}

/* ========================================
   SMALL MOBILE (320px - 479px)
======================================== */

@media (max-width: 479px) {
    .hero-title {
        font-size: 1.8rem;
        line-height: 1.1;
    }
    
    .hero-description {
        font-size: 0.95rem;
        line-height: 1.6;
    }
    
    .hero-booking-card {
        padding: var(--spacing-md);
    }
    
    .booking-card-header h3 {
        font-size: 1.2rem;
    }
    
    .feature-card {
        padding: var(--spacing-md);
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
    
    .about-main-info {
        padding: var(--spacing-md);
    }
    
    .about-description h3 {
        font-size: 1.3rem;
    }
    
    .about-hero-image img {
        height: 200px;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .about-card {
        padding: var(--spacing-md);
    }
    
    /* Facturación Mobile */
    .facturacion-hero {
        min-height: 50vh;
        padding: var(--spacing-xl) 0;
    }
    
    .hero-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    .city-options {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }
    
    .city-card {
        padding: var(--spacing-md);
        min-height: 250px;
    }
    
    .contact-options {
        flex-direction: column;
        align-items: center;
    }
    
    .contact-btn {
        width: 100%;
        max-width: 300px;
        justify-content: center;
    }
    
    .contact-info h2 {
        font-size: 1.5rem;
    }
    
    .contact-form-container {
        padding: var(--spacing-md);
    }
    
    .booking-modal .modal-content {
        width: 98%;
        margin: 1rem auto;
        max-height: calc(100vh - 2rem);
    }
    
    .modal-header {
        padding: var(--spacing-md);
    }
    
    .modal-body {
        padding: var(--spacing-md);
    }
}

/* ========================================
   LANDSCAPE ORIENTATION ADJUSTMENTS
======================================== */

@media (max-height: 500px) and (orientation: landscape) {
    .hero-section {
        min-height: auto;
        padding: var(--spacing-xl) 0;
    }
    
    .hero-content {
        gap: var(--spacing-lg);
    }
    
    .hero-scroll-indicator {
        display: none;
    }
    
    .booking-modal .modal-content {
        max-height: 90vh;
        overflow-y: auto;
    }
}

/* ========================================
   HIGH DPI DISPLAYS
======================================== */

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-background,
    .services-background,
    .contact-background {
        background-size: cover;
        background-position: center;
    }
    
    .logo-img,
    .footer-logo {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ========================================
   PRINT STYLES
======================================== */

@media print {
    .loading-screen,
    .main-nav,
    .hero-particles,
    .hero-scroll-indicator,
    .carousel-controls,
    .booking-modal,
    .notification,
    .custom-cursor,
    .floating-shape,
    .morphing-bg {
        display: none !important;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
        color: #f5f5f5;
        background: white;
    }
    
    .hero-section,
    .services-section,
    .contact-section {
        background: white !important;
        color: #f5f5f5 !important;
    }
    
    .section-title,
    .hero-title {
        color: #f5f5f5 !important;
        font-size: 18pt;
        margin-bottom: 10pt;
    }
    
    .contact-method a {
        color: #f5f5f5;
        text-decoration: underline;
    }
    
    .btn-primary,
    .btn-secondary {
        border: 2px solid black;
        background: white;
        color: #f5f5f5;
        padding: 5pt 10pt;
    }
    
    @page {
        margin: 1cm;
    }
}

/* ========================================
   ACCESSIBILITY IMPROVEMENTS
======================================== */

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .parallax-element {
        transform: none !important;
    }
    
    .particles,
    .floating-shape,
    .morphing-bg {
        display: none;
    }
}

@media (prefers-contrast: high) {
    :root {
        --primary-color: #000000;
        --accent-cyan: #0066cc;
        --accent-gold: #cc6600;
    }
    
    .glass-card,
    .glass-card-dark {
        background: rgba(255, 255, 255, 0.9);
        border: 2px solid var(--primary-color);
    }
    
    .hero-overlay,
    .services-overlay,
    .contact-overlay {
        background: rgba(0, 0, 0, 0.8);
    }
}

/* ========================================
   DARK MODE SUPPORT
======================================== */

@media (prefers-color-scheme: dark) {
    :root {
        --white: #1a1a1a;
        --black: #ffffff;
        --light-grey: #2a2a2a;
        --dark-grey: #e0e0e0;
        --tertiary-color: #2a2a2a;
    }
    
    body {
        background-color: #1a1a1a;
        color: #e0e0e0;
    }
    
    .features-section {
        background: #2a2a2a;
    }
    
    .feature-card {
        background: #1a1a1a;
        border: 1px solid #3a3a3a;
    }
    
    .fleet-section {
        background: #1a1a1a;
    }
    
    .form-input {
        background: #2a2a2a;
        border-color: #3a3a3a;
        color: #e0e0e0;
    }
    
    .form-input::placeholder {
        color: #888;
    }
}