/* Mobile First Base Styles (up to 480px) */
/* Your existing mobile styles are the base */

/* Extra Small Mobile Devices (up to 480px) */
@media (max-width: 480px) {
    .container {
        padding: 0 0.75rem;
    }
    
    /* Hero Section Adjustments */
    .hero h1 {
        font-size: 2.5rem;
        margin-bottom: 0.8rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .hero-content {
        padding: 1.5rem;
        max-width: 100%;
    }
    
    .hero-content img {
        width: 180px !important;
        margin-bottom: 0.8rem !important;
    }
    
    .price-showcase {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }
    
    .price-main {
        font-size: 2.8rem;
    }
    
    .price-terms {
        font-size: 1.1rem;
    }
    
    .cta-primary {
        padding: 1rem 2rem;
        font-size: 1rem;
        margin-top: 1.5rem;
    }
    
    /* Section Titles */
    .section-title {
        font-size: 1.8rem;
        margin-bottom: 2rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }
    
    /* Cards and Grid Adjustments */
    .merida-card, .feature-card {
        padding: 1.5rem;
    }
    
    .merida-card h3, .feature-card h3 {
        font-size: 1.2rem;
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    /* Stats Section */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    .stat-label {
        font-size: 0.9rem;
    }
    
    /* Contact Form */
    .contact-form {
        padding: 2rem 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .form-group input,
    .form-group textarea {
        padding: 1rem;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Professional Grid */
    .professional-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Tablet Portrait (768px to 1023px) */
@media (min-width: 768px) {
    .container {
        padding: 0 2rem;
        max-width: 750px;
    }
    
    /* Hero Section */
    .hero h1 {
        font-size: 4rem;
    }
    
    .hero-subtitle {
        font-size: 1.6rem;
    }
    
    .hero-content {
        padding: 2.5rem;
        max-width: 800px;
    }
    
    .hero-content img {
        width: 280px !important;
    }
    
    .price-main {
        font-size: 3.2rem;
    }
    
    .price-terms {
        font-size: 1.4rem;
    }
    
    /* Section Typography */
    .section-title {
        font-size: 2.5rem;
        margin-bottom: 3rem;
    }
    
    .section-subtitle {
        font-size: 1.3rem;
    }
    
    /* Grid Layouts */
    .merida-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 2rem;
    }
    
    /* Cards */
    .merida-card, .feature-card {
        padding: 2rem;
    }
    
    .feature-icon {
        width: 70px;
        height: 70px;
    }
    
    /* Professional Grid */
    .professional-grid {
        grid-template-columns: 1fr 1fr;
        gap: 2.5rem;
    }
    
    /* Contact Form */
    .contact-form {
        max-width: 650px;
        padding: 2.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr 1fr;
        gap: 1.5rem;
    }
    
    /* Section Spacing */
    .section {
        padding: 4rem 0;
    }
    
    .stats-showcase {
        padding: 3rem 0;
    }
}

/* Tablet Landscape / Small Laptop (1024px to 1199px) */
@media (min-width: 1024px) {
    .container {
        max-width: 970px;
        padding: 0 2rem;
    }
    
    /* Hero Section */
    .hero h1 {
        font-size: 4.5rem;
        letter-spacing: -2px;
    }
    
    .hero-subtitle {
        font-size: 1.7rem;
    }
    
    .hero-content {
        max-width: 850px;
        padding: 2.5rem;
    }
    
    .hero-content img {
        width: 300px !important;
    }
    
    .price-main {
        font-size: 3.8rem;
    }
    
    /* Section Typography */
    .section-title {
        font-size: 3rem;
        margin-bottom: 3.5rem;
    }
    
    /* Grid Layouts - Full 3 column layout */
    .merida-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
    
    /* Cards Enhancement */
    .merida-card, .feature-card {
        padding: 2.5rem;
    }
    
    .feature-icon {
        width: 80px;
        height: 80px;
        font-size: 2rem;
    }
    
    /* Stats Grid */
    .stats-grid {
        gap: 2.5rem;
    }
    
    .stat-number {
        font-size: 3.2rem;
    }
    
    /* Professional Grid */
    .professional-grid {
        gap: 3rem;
    }
    
    /* Contact Form */
    .contact-form {
        max-width: 700px;
        padding: 3rem;
    }
    
    /* Section Spacing */
    .section {
        padding: 5rem 0;
    }
    
    .stats-showcase {
        padding: 4rem 0;
    }
}

/* Desktop (1200px to 1599px) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
        padding: 0 2rem;
    }
    
    /* Hero Section - Full desktop experience */
    .hero h1 {
        font-size: 5rem;
        letter-spacing: -2px;
    }
    
    .hero-subtitle {
        font-size: 1.8rem;
    }
    
    .hero-content {
        max-width: 900px;
        padding: 2rem;
    }
    
    .hero-content img {
        width: 250px !important; /* Back to original size on desktop */
    }
    
    .price-main {
        font-size: 3.5rem; /* Original size */
    }
    
    /* Section Typography */
    .section-title {
        font-size: 2.8rem; /* Original size */
        margin-bottom: 4rem;
    }
    
    /* Grid Layouts - Back to original 4-column for some */
    .merida-grid {
        grid-template-columns: repeat(2, 1fr); /* Keep 2 columns for better readability */
        gap: 2.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr); /* Keep 2 columns for better layout */
        gap: 2.5rem;
    }
    
    /* Stats back to 4 columns */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 3rem;
    }
    
    .stat-number {
        font-size: 3.5rem; /* Original size */
    }
    
    /* Cards */
    .merida-card, .feature-card {
        padding: 2.5rem; /* Original padding */
    }
    
    .feature-icon {
        width: 80px; /* Original size */
        height: 80px;
        font-size: 2rem;
    }
    
    /* Professional Grid */
    .professional-grid {
        gap: 3rem;
    }
    
    /* Contact Form */
    .contact-form {
        max-width: 700px; /* Original max-width */
    }
    
    /* CTA Button */
    .cta-primary {
        padding: 1.2rem 3rem; /* Original padding */
        font-size: 1.2rem;
    }
    
    /* Section Spacing - Original */
    .section {
        padding: 5rem 0;
    }
    
    .stats-showcase {
        padding: 4rem 0;
    }
}

/* Large Desktop (1600px and up) */
@media (min-width: 1600px) {
    .container {
        max-width: 1400px;
        padding: 0 3rem;
    }
    
    /* Hero Section - Enhanced for large screens */
    .hero h1 {
        font-size: 5.5rem;
        letter-spacing: -3px;
    }
    
    .hero-subtitle {
        font-size: 2rem;
    }
    
    .hero-content {
        max-width: 1000px;
        padding: 2.5rem;
    }
    
    .price-main {
        font-size: 4rem;
    }
    
    /* Section Typography */
    .section-title {
        font-size: 3.2rem;
        margin-bottom: 4.5rem;
    }
    
    .section-subtitle {
        font-size: 1.4rem;
    }
    
    /* Grid Layouts - Can handle more columns */
    .merida-grid {
        grid-template-columns: repeat(4, 1fr); /* All 4 cards in one row */
        gap: 3rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(4, 1fr); /* All 4 features in one row */
        gap: 3rem;
    }
    
    .stats-grid {
        gap: 4rem;
    }
    
    /* Enhanced Cards */
    .merida-card, .feature-card {
        padding: 3rem;
    }
    
    .merida-card h3, .feature-card h3 {
        font-size: 1.6rem;
    }
    
    .feature-icon {
        width: 90px;
        height: 90px;
        font-size: 2.2rem;
    }
    
    /* Stats Enhancement */
    .stat-number {
        font-size: 4rem;
    }
    
    .stat-label {
        font-size: 1.2rem;
    }
    
    /* Professional Grid */
    .professional-grid {
        gap: 4rem;
    }
    
    .professional-content h4 {
        font-size: 1.6rem;
    }
    
    /* Contact Form */
    .contact-form {
        max-width: 800px;
        padding: 3.5rem;
    }
    
    /* Enhanced Spacing */
    .section {
        padding: 6rem 0;
    }
    
    .stats-showcase {
        padding: 5rem 0;
    }
    
    /* CTA Button */
    .cta-primary {
        padding: 1.4rem 3.5rem;
        font-size: 1.3rem;
    }
}

/* Landscape Orientation for Mobile/Tablet */
@media (max-width: 1023px) and (orientation: landscape) {
    .hero {
        min-height: 85vh; /* Shorter on landscape */
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.4rem;
    }
    
    .hero-content {
        padding: 1.5rem;
    }
    
    .price-showcase {
        padding: 1.5rem;
        margin: 1.5rem auto;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .stats-showcase {
        padding: 2.5rem 0;
    }
    
    /* Optimize stats for landscape */
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }
    
    .stat-item {
        padding: 1.5rem;
    }
}

/* Ultra-wide screens (21:9 aspect ratio and similar) */
@media (min-width: 1800px) {
    .container {
        max-width: 1600px;
    }
    
    .hero-content {
        max-width: 1200px;
    }
    
    .merida-grid,
    .features-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 4rem;
    }
    
    .professional-grid {
        gap: 5rem;
    }
}

/* High-DPI/Retina Display Optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    body {
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
    
    .hero-content img {
        image-rendering: -webkit-optimize-contrast;
    }
    
    /* Enhance borders and shadows for retina */
    .merida-card,
    .feature-card,
    .contact-form,
    .price-showcase {
        border-width: 0.5px;
    }
}

/* Print Styles */
@media print {
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }
    
    .floating-elements,
    .scroll-indicator,
    .cta-primary {
        display: none;
    }
    
    .hero {
        height: auto;
        padding: 2rem 0;
        background: white !important;
    }
    
    .section {
        page-break-inside: avoid;
        padding: 1rem 0;
    }
    
    .section-title {
        page-break-after: avoid;
        font-size: 1.8rem;
    }
    
    .container {
        max-width: none;
        padding: 0;
    }
    
    .merida-grid,
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
    
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 1rem;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-shape {
        animation: none;
    }
    
    .scroll-indicator {
        animation: none;
    }
    
    /* Remove parallax for motion-sensitive users */
    .hero {
        transform: none !important;
    }
}

/* Dark Mode Support (if user prefers dark mode) */
@media (prefers-color-scheme: dark) {
    /* Your existing dark theme would work well, but you can enhance it */
    .why-merida,
    .location-advantage {
        background: linear-gradient(135deg, #1a1a1a 0%, #2a2a2a 100%);
        color: #f8f6f0;
    }
    
    .merida-card {
        background: #2c2c2c;
        border-color: #4a4a4a;
        color: #f8f6f0;
    }
    
    .image-placeholder {
        background: linear-gradient(135deg, #3a3a3a 0%, #4a4a4a 100%);
        color: #ccc;
        border-color: #555;
    }
}