/* Responsive Management for Windows Desktop and Mobile Views */

/* CSS Variables for Responsive Design */
:root {
    --mobile-breakpoint: 768px;
    --tablet-breakpoint: 1024px;
    --desktop-breakpoint: 1200px;
    
    /* Spacing Variables */
    --mobile-padding: 15px;
    --desktop-padding: 20px;
    --section-padding-mobile: 40px 0;
    --section-padding-desktop: 80px 0;
}

/* Base Responsive Container */
.container {
    width: 100%;
    padding: 0 var(--mobile-padding);
    margin: 0 auto;
}

/* Mobile First Approach */
@media (max-width: 767px) {
    /* Mobile Specific Styles */
    body {
        font-size: 14px;
        line-height: 1.5;
    }
    
    .hero {
        height: 60vh;
        padding: 0 var(--mobile-padding);
    }
    
    .hero h1 {
        font-size: 1.8rem;
        line-height: 1.2;
    }
    
    .hero p {
        font-size: 1rem;
    }
    
    .btn {
        padding: 12px 25px;
        font-size: 14px;
        min-height: 44px;
        min-width: 44px;
    }
    
    .section-title h2 {
        font-size: 1.8rem;
    }
    
    .features,
    .tractor-grid,
    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .feature-card,
    .tractor-card,
    .blog-card {
        margin-bottom: 20px;
    }
    
    
    /* Mobile Form Optimization */
    .contact-form {
        padding: 20px;
    }
    
    .form-group input,
    .form-group textarea,
    .form-group select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 15px;
    }
    
    /* Mobile Footer */
    .footer-container {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    /* Hide desktop elements on mobile */
    .desktop-only {
        display: none !important;
    }
}

/* Tablet View */
@media (min-width: 768px) and (max-width: 1023px) {
    .container {
        max-width: 750px;
    }
    
    .hero {
        height: 70vh;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tractor-grid,
    .blog-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Desktop View - Windows Optimization */
@media (min-width: 1024px) {
    .container {
        max-width: 970px;
        padding: 0 var(--desktop-padding);
    }
    
    .hero {
        height: 85vh;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
    
    .hero p {
        font-size: 1.3rem;
    }
    
    .features {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .tractor-grid,
    .blog-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    /* Desktop Navigation */
    nav {
        position: static;
        width: auto;
        height: auto;
        background-color: transparent;
    }
    
    nav ul {
        flex-direction: row;
    }
    
    nav ul li {
        margin: 0 15px;
    }
    
    /* Hide mobile elements on desktop */
    .mobile-only {
        display: none !important;
    }
}

/* Large Desktop View */
@media (min-width: 1200px) {
    .container {
        max-width: 1170px;
    }
    
    .hero {
        height: 90vh;
    }
    
    .hero h1 {
        font-size: 4rem;
    }
}

/* Touch-Friendly Elements for Mobile */
@media (max-width: 767px) {
    .nav-link,
    .btn,
    .feature-card,
    .tractor-card,
    .blog-card {
        -webkit-tap-highlight-color: transparent;
        -webkit-touch-callout: none;
        -webkit-user-select: none;
        user-select: none;
    }
    
    /* Improve touch targets */
    .nav-link {
        padding: 15px;
        display: block;
    }
    
    .social-links a {
        width: 50px;
        height: 50px;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero {
        background-image: linear-gradient(rgba(0, 0, 0, 0.7), rgba(0, 0, 0, 0.7)), 
                          url('kissan-auto-sales@2x.jpg');
    }
}

/* Windows Specific Optimizations */
@media screen and (-ms-high-contrast: active), (-ms-high-contrast: none) {
    /* IE/Edge specific styles */
    .hero {
        background-attachment: scroll;
    }
    
    .feature-card,
    .tractor-card,
    .blog-card {
        display: block;
    }
}

/* Print Styles */
@media print {
    .hero,
    .social-icons,
    nav {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.4;
    }
    
    .container {
        width: 100%;
        max-width: none;
    }
}

/* Landscape Orientation */
@media (max-width: 767px) and (orientation: landscape) {
    .hero {
        height: 100vh;
        padding: 20px 0;
    }
    
    .hero h1 {
        font-size: 1.5rem;
    }
    
    .hero p {
        font-size: 0.9rem;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}
