/* ========================================
   RESPONSIVE STYLES - Gulf Euro Drive
   Grid-based responsive with component breakpoints
   ======================================== */

/* ======== LARGE SCREENS (1440px+) ======== */
@media (min-width: 90rem) { /* 1440px - Navigation split layout */
    /* Edge to edge - no container padding */
    
    /* Navigation: Logo left, everything else right */
    .header__container,
    .top-header {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }
    
    .header__logo,
    .logo {
        flex-shrink: 0;
    }
    
    .header__right {
        display: flex;
        align-items: center;
        gap: 3rem;
        margin-left: auto;
    }
    
    .menubar {
        margin-left: auto;
        margin-right: 2rem;
    }
    
    /* Larger text for better readability */
    body {
        font-size: 1.125rem;
    }
    
    .hero-text {
        font-size: 2.5rem;
        line-height: 2.75rem;
    }
}

/* ======== DESKTOP (1200px) ======== */
@media (max-width: 75rem) { /* 1200px */
    /* Edge to edge - no container padding */
    
    .top-header {
        padding: 0 3rem;
    }
    
    .Hero {
        /* Inherit padding from main definition */
    }
    
    /* 3-column grid for vehicles */
    .vehicles-grid,
    .vehicle-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ======== TABLET (1024px) ======== */
@media (max-width: 64rem) { /* 1024px */
    /* Edge to edge - no container padding */
    
    .Hero {
        background-position: center bottom;
        text-align: center;
        padding: 5rem 2rem 2rem; /* Top padding for header clearance */
        align-items: center;
        /* Different hero image for tablet */
        background-image: url('../images/Front Page-tablet.jpg');
    }
    
    .form-container {
        width: 100%;
        max-width: 25rem; /* Fixed max width for forms */
        margin: 0 auto;
    }
    
    /* 2-column grid for vehicles */
    .vehicles-grid,
    .vehicle-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .benefits {
        grid-template-columns: repeat(3, 1fr);
        gap: 1.5rem;
    }
}

/* ======== MOBILE (768px) ======== */
@media (max-width: 48rem) { /* 768px */
    /* Edge to edge - no container padding */
    
    .top-header {
        padding: 0 1rem;
        width: 100%;
    }
    
    /* Mobile navigation - prepare for hamburger */
    .menubar {
        gap: var(--spacing-xs);
    }
    
    .nav-link {
        padding: 0.25rem 0.5rem;
        font-size: 0.75rem;
    }
    
    /* Hero with mobile-specific image */
    .Hero {
        min-height: 25rem;
        max-height: 100vh;
        padding: 4rem 1rem 2rem; /* Adjusted top padding for mobile header */
        background-image: url('../images/Front Page-mobile.jpg');
        background-position: center center;
    }
    
    .hero-text {
        font-size: 1.75rem;
        line-height: 1.8rem;
        margin-bottom: 1.5rem;
    }
    
    /* Transit section responsive */
    .transit-section {
        height: auto;
        min-height: auto;
        padding: 3rem 1rem;
    }
    
    /* 2-column grid for benefits */
    .benefits {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .benefit {
        width: 100%;
        max-width: none;
    }
    
    /* Orange section */
    .orange-section {
        height: auto;
        min-height: auto;
        padding: 2rem 1rem;
        background-position: top center;
    }
    
    /* 2-column grid for vehicles on mobile */
    .vehicles-grid,
    .vehicle-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        padding: 1rem;
    }
    
    /* Vehicle cards maintain minimum width */
    .vehicle-card {
        min-width: unset;
        width: 100%;
    }
}

/* ======== SMALL MOBILE (480px) ======== */
@media (max-width: 30rem) { /* 480px */
    /* Very small navigation */
    .nav-link {
        font-size: 0.6875rem;
        padding: 0.125rem 0.25rem;
    }
    
    /* Smaller hero text */
    .hero-text {
        font-size: 1.5rem;
        line-height: 1.6rem;
    }
    
    /* Full width form */
    .form-container {
        max-width: none;
        width: 100%;
    }
    
    /* Single column for benefits */
    .benefits {
        grid-template-columns: 1fr;
        justify-items: center;
    }
    
    .benefit {
        max-width: 12rem;
    }
    
    /* Single column for vehicles */
    .vehicles-grid,
    .vehicle-grid {
        grid-template-columns: 1fr;
    }
    
    /* Team section */
    .team-content {
        flex-direction: column;
        padding: 1rem;
    }
    
    .team-photo {
        min-width: auto;
        width: 100%;
    }
    
    .team-photo__image {
        width: 100%;
        height: auto;
        max-width: 25rem;
        margin: 0 auto;
        display: block;
    }
}

/* ======== GRID SYSTEM ======== */
/* Auto-fit grid system for vehicles */
.vehicles-grid,
.vehicle-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 2rem;
    width: 100%;
}

/* Benefits grid system */
.benefits {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
    gap: 2rem;
    width: 100%;
    justify-items: center;
}

/* ======== IMAGES ======== */
/* Ensure images are responsive */
img {
    max-width: 100%;
    height: auto;
}

/* Hero background images for different breakpoints */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .Hero {
        background-image: url('../images/Front Page@2x.jpg');
    }
    
    @media (max-width: 64rem) {
        .Hero {
            background-image: url('../images/Front Page-tablet@2x.jpg');
        }
    }
    
    @media (max-width: 48rem) {
        .Hero {
            background-image: url('../images/Front Page-mobile@2x.jpg');
        }
    }
}

/* ======== TABLES ======== */
@media (max-width: 48rem) {
    .comparison-table {
        font-size: 0.875rem;
    }
    
    .comparison-table th,
    .comparison-table td {
        padding: 0.5rem;
    }
}

/* ======== FORMS ======== */
/* Forms maintain fixed sizes with breakpoints only */
@media (max-width: 48rem) {
    .booking-form {
        flex-direction: column;
        gap: 1rem;
    }
    
    .form-sidebar {
        width: 100%;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .search-form__row {
        grid-template-columns: 1fr;
    }
}

/* ======== TESTIMONIAL ======== */
@media (max-width: 48rem) {
    .testimonial {
        height: auto;
        min-height: auto;
        padding: 2rem 1rem;
        gap: 1rem;
    }
    
    .quote {
        font-size: 4rem;
    }
    
    .testimonial-text--main {
        font-size: 1.5rem;
    }
    
    .testimonial-text--sub {
        font-size: 1.125rem;
    }
}

/* ======== SECTIONS HEIGHT CONSTRAINT ======== */
/* Ensure major sections don't exceed viewport */
.orange-section,
.transit-section,
.testimonial {
    max-height: 100vh;
    overflow: hidden;
}