/* ===== MOBILE FIRST RESPONSIVE DESIGN ===== */

/* Extra Small Devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Navigation */
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: var(--background-darker);
        width: 100%;
        text-align: center;
        transition: var(--transition-medium);
        box-shadow: var(--shadow-lg);
        border-top: 1px solid var(--border-color);
        padding: var(--spacing-md) 0;
        gap: var(--spacing-md);
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-item {
        margin: var(--spacing-sm) 0;
    }
    
    .hamburger {
        display: flex;
    }
    
    .hamburger.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .hamburger.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .hamburger.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Hero Section */
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Page Headers */
    .page-header {
        padding: 100px 0 var(--spacing-lg);
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
    
    .page-header p {
        font-size: 1rem;
    }
    
    /* Sections */
    .section-title {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
    }
    
    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .about-text h2 {
        font-size: 2rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
    }
    
    /* Forms */
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    
    .filter-group {
        min-width: auto;
    }
    
    /* Vehicle Grid */
    .grid-header {
        flex-direction: column;
        gap: var(--spacing-md);
        align-items: stretch;
    }
    
    .grid-header h2 {
        font-size: 1.5rem;
    }
    
    .vehicles-container {
        grid-template-columns: 1fr;
    }
    
    /* Vehicle Detail Modal */
    .vehicle-detail {
        grid-template-columns: 1fr;
    }
    
    .vehicle-actions {
        flex-direction: column;
    }
    
    /* Calendar */
    .calendar-legend {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    /* Reservation */
    .reservation-container {
        grid-template-columns: 1fr;
    }
    
    .booking-summary-card {
        position: static;
        order: 2;
    }
    
    .selected-car {
        flex-direction: column;
        text-align: center;
    }
    
    .selected-car img {
        width: 100%;
        height: 200px;
    }
    
    /* Contact */
    .contact-container {
        grid-template-columns: 1fr;
    }
    
    .contact-item {
        flex-direction: column;
        text-align: center;
    }
    
    .contact-icon {
        align-self: center;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .footer-social {
        justify-content: center;
    }
    
    /* CTA Buttons */
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .cta-buttons .btn {
        width: 100%;
        max-width: 300px;
    }
    
    /* Modal */
    .modal-content {
        width: 95%;
        margin: 10% auto;
    }
    
    .calendar-modal {
        max-width: 95%;
    }
    
    /* Service Detail Cards */
    .service-detail-card {
        text-align: center;
    }
    
    .service-price {
        text-align: center;
    }
    
    /* Process Steps */
    .process-steps {
        grid-template-columns: 1fr;
    }
}

/* Small Devices (portrait tablets and large phones, 600px and up) */
@media only screen and (min-width: 600px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .vehicles-container {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rental-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .process-steps {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filters-row {
        flex-wrap: wrap;
    }
}

/* Medium Devices (landscape tablets, 768px and up) */
@media only screen and (min-width: 768px) {
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }
    
    .btn {
        width: auto;
    }
    
    .about-content {
        grid-template-columns: 1fr 1fr;
    }
    
    .about-stats {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .form-row {
        grid-template-columns: 1fr 1fr;
    }
    
    .contact-container {
        grid-template-columns: 1fr 1fr;
    }
    
    .contact-item {
        flex-direction: row;
        text-align: left;
    }
    
    .reservation-container {
        grid-template-columns: 1fr 2fr;
    }
    
    .booking-summary-card {
        position: sticky;
        top: 100px;
        order: 1;
    }
    
    .selected-car {
        flex-direction: row;
        text-align: left;
    }
    
    .selected-car img {
        width: 100px;
        height: 80px;
    }
    
    .vehicle-detail {
        grid-template-columns: 1fr 1fr;
    }
    
    .vehicle-actions {
        flex-direction: row;
    }
    
    .filters-row {
        flex-direction: row;
        align-items: end;
    }
    
    .calendar-legend {
        flex-direction: row;
        justify-content: center;
    }
}

/* Large Devices (laptops/desktops, 992px and up) */
@media only screen and (min-width: 992px) {
    .hamburger {
        display: none;
    }
    
    .nav-menu {
        position: static;
        flex-direction: row;
        background-color: transparent;
        width: auto;
        box-shadow: none;
        border: none;
        padding: 0;
        gap: var(--spacing-lg);
    }
    
    .hero-title {
        font-size: 3.5rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .vehicles-container {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .rental-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-content {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .process-steps {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .grid-header {
        flex-direction: row;
        align-items: center;
    }
    
    .service-detail-card {
        text-align: left;
    }
    
    .service-price {
        text-align: right;
    }
}

/* Extra Large Devices (large laptops and desktops, 1200px and up) */
@media only screen and (min-width: 1200px) {
    .container {
        max-width: 1200px;
        padding: 0 var(--spacing-md);
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.75rem;
    }
    
    .section-title {
        font-size: 3rem;
    }
    
    .page-header h1 {
        font-size: 3.5rem;
    }
    
    .about-text h2 {
        font-size: 3rem;
    }
    
    .cta-content h2 {
        font-size: 3rem;
    }
}

/* ===== LANDSCAPE ORIENTATION ===== */
@media screen and (orientation: landscape) and (max-height: 500px) {
    .hero {
        height: 100vh;
        min-height: 500px;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.25rem;
    }
    
    .hero-description {
        font-size: 1rem;
        margin-bottom: var(--spacing-md);
    }
    
    .hero-buttons {
        gap: var(--spacing-sm);
    }
    
    .btn {
        padding: var(--spacing-xs) var(--spacing-md);
        font-size: 0.9rem;
    }
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    /* Already using dark theme as default */
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-indicator {
        animation: none;
    }
    
    .hero-content {
        animation: none;
    }
    
    .btn::before {
        transition: none;
    }
    
    .modal-content {
        animation: none;
    }
}

/* ===== HIGH CONTRAST MODE ===== */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #ffff00;
        --background-dark: #000000;
        --background-darker: #000000;
        --background-card: #111111;
        --text-primary: #ffffff;
        --text-secondary: #ffffff;
        --border-color: #ffffff;
    }
    
    .btn {
        border: 2px solid;
    }
    
    .card,
    .service-card,
    .vehicle-card,
    .rental-card {
        border: 2px solid var(--border-color);
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .navbar,
    .footer,
    .hamburger,
    .scroll-indicator,
    .btn,
    .modal {
        display: none !important;
    }
    
    .hero {
        height: auto;
        padding: 2rem 0;
    }
    
    .hero-background,
    .hero-overlay {
        display: none;
    }
    
    .container {
        max-width: 100%;
        padding: 0;
    }
    
    .page-header {
        padding: 1rem 0;
    }
    
    .section-title::after {
        display: none;
    }
    
    .card,
    .service-card,
    .vehicle-card {
        border: 1px solid #ccc;
        break-inside: avoid;
    }
    
    .service-icon,
    .contact-icon {
        background: #ccc;
        color: black;
    }
    
    .vehicle-image img,
    .rental-image img,
    .about-image img {
        max-width: 100%;
        height: auto;
    }
    
    .calendar-grid {
        display: none;
    }
    
    .map-container iframe {
        display: none;
    }
    
    .footer-social {
        display: none;
    }
    
    a {
        text-decoration: underline;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .page-header h1 {
        font-size: 2rem;
    }
}

/* ===== TOUCH DEVICES ===== */
@media (hover: none) and (pointer: coarse) {
    .btn:hover,
    .nav-link:hover,
    .service-card:hover,
    .vehicle-card:hover,
    .rental-card:hover,
    .process-step:hover,
    .service-detail-card:hover {
        transform: none;
    }
    
    .btn:active,
    .calendar-nav:active {
        transform: scale(0.95);
    }
    
    .calendar-day {
        min-height: 44px;
        min-width: 44px;
    }
    
    .hamburger {
        min-height: 44px;
        min-width: 44px;
        justify-content: center;
        align-items: center;
    }
    
    .modal-close {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* ===== ACCESSIBILITY IMPROVEMENTS ===== */
@media (prefers-reduced-motion: no-preference) {
    .fade-in {
        animation: fadeInUp 0.8s ease-out forwards;
    }
    
    .slide-in-left {
        animation: slideInLeft 0.8s ease-out forwards;
    }
    
    .slide-in-right {
        animation: slideInRight 0.8s ease-out forwards;
    }
}

/* Focus styles for keyboard navigation */
.btn:focus,
.nav-link:focus,
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus,
.calendar-day:focus,
.calendar-nav:focus,
.modal-close:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Skip to main content link */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-color);
    color: var(--background-dark);
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 9999;
    font-weight: bold;
}

.skip-link:focus {
    top: 6px;
}

/* Screen reader only text */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* High contrast focus indicators */
@media (prefers-contrast: high) {
    .btn:focus,
    .nav-link:focus,
    .form-group input:focus,
    .form-group select:focus,
    .form-group textarea:focus {
        outline: 3px solid var(--primary-color);
        outline-offset: 3px;
    }
}