/* ===== RESPONSIVE DESIGN ===== */

/* Extra Large Devices (1400px and up) */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-content h1 {
        font-size: 4rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* Large Devices (1200px and up) */
@media (max-width: 1199.98px) {
    .container {
        max-width: 960px;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
    }
}

/* Medium Devices (992px and up) */
@media (max-width: 991.98px) {
    .container {
        max-width: 720px;
    }
    
    /* Header Adjustments */
    .header-top-content {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }
    
    .contact-info {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    /* Navigation */
    .nav-menu {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background-color: var(--white);
        flex-direction: column;
        padding: var(--spacing-md);
        box-shadow: var(--shadow-lg);
        border-radius: 0 0 var(--radius-md) var(--radius-md);
    }
    
    .nav-menu.active {
        display: flex;
    }
    
    .mobile-menu-toggle {
        display: flex;
    }
    
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    /* Dropdown in mobile */
    .dropdown-menu {
        position: static;
        opacity: 1;
        visibility: visible;
        transform: none;
        box-shadow: none;
        background-color: var(--light-gray);
        margin-top: var(--spacing-sm);
        border-radius: var(--radius-sm);
    }
    
    /* Hero Section */
    .hero {
        height: 70vh;
        min-height: 500px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }
    
    .hero-content p {
        font-size: 1.125rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    /* Features Grid */
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Products Grid */
    .products-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Stats Grid */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    /* Newsletter */
    .newsletter-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .newsletter-form form {
        justify-content: center;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: var(--spacing-lg);
    }
    
    .footer-bottom-content {
        flex-direction: column;
        gap: var(--spacing-sm);
        text-align: center;
    }
}

/* Small Devices (768px and up) */
@media (max-width: 767.98px) {
    .container {
        padding: 0 var(--spacing-md);
    }
    
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.5rem; }
    
    /* Header */
    .header-top {
        padding: var(--spacing-xs) 0;
    }
    
    .contact-info {
        gap: var(--spacing-md);
        font-size: 0.8rem;
    }
    
    .logo img {
        width: 50px;
        height: 50px;
        border-radius: 50%;
        object-fit: cover;
        border: 2px solid var(--primary-green);
        box-shadow: 0 3px 10px rgba(44, 85, 48, 0.2);
        background: white;
        padding: 2px;
    }
    
    .logo h2 {
        font-size: 1.4rem;
        font-weight: 700;
    }
    
    /* Hero Section */
    .hero {
        margin-top: 75px;
        height: 60vh;
        min-height: 400px;
    }
    
    .hero-content {
        padding: 0 var(--spacing-sm);
    }
    
    .hero-content h1 {
        font-size: 2rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-content p {
        font-size: 1rem;
        margin-bottom: var(--spacing-lg);
    }
    
    .hero-controls {
        display: none;
    }
    
    /* Sections */
    .section {
        padding: var(--spacing-xl) 0;
    }
    
    .section-header {
        margin-bottom: var(--spacing-lg);
    }
    
    /* Features */
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .feature-card {
        padding: var(--spacing-lg);
    }
    
    .feature-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    /* Products */
    .products-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .product-image {
        height: 200px;
    }
    
    /* Stats */
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
    
    /* Newsletter */
    .newsletter-form input {
        min-width: 250px;
    }
    
    .newsletter-form form {
        flex-direction: column;
        align-items: stretch;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Extra Small Devices (576px and up) */
@media (max-width: 575.98px) {
    /* Container */
    .container {
        padding: 0 var(--spacing-sm);
    }
    
    /* Typography */
    .hero-content h1 {
        font-size: 1.75rem;
    }
    
    .hero-content p {
        font-size: 0.9rem;
    }
    
    /* Header */
    .header-top-content {
        padding: var(--spacing-xs) 0;
    }
    
    .contact-info {
        flex-direction: column;
        gap: var(--spacing-xs);
    }
    
    .navbar {
        padding: var(--spacing-xs) 0;
    }
    
    .logo h2 {
        font-size: 1.2rem;
        font-weight: 700;
    }
    
    .logo small {
        font-size: 0.75rem;
        font-weight: 600;
    }
    
    /* Hero */
    .hero {
        margin-top: 70px;
        height: 50vh;
        min-height: 350px;
    }
    
    .hero-buttons {
        gap: var(--spacing-sm);
    }
    
    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.9rem;
    }
    
    /* Sections */
    .section {
        padding: var(--spacing-lg) 0;
    }
    
    /* Feature Cards */
    .feature-card {
        padding: var(--spacing-md);
    }
    
    .feature-icon {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
        margin-bottom: var(--spacing-sm);
    }
    
    /* Products */
    .product-image {
        height: 180px;
    }
    
    .product-info {
        padding: var(--spacing-sm);
    }
    
    .product-info h3 {
        font-size: 1.125rem;
    }
    
    .product-price {
        font-size: 1.25rem;
    }
    
    /* Newsletter */
    .newsletter {
        padding: var(--spacing-lg) 0;
    }
    
    .newsletter-form input {
        min-width: 200px;
        font-size: 0.9rem;
    }
    
    /* Footer */
    .footer {
        padding: var(--spacing-lg) 0 var(--spacing-md);
    }
    
    .footer-content {
        gap: var(--spacing-lg);
    }
    
    .contact-item {
        font-size: 0.875rem;
    }
}

/* Extra Extra Small Devices (480px and down) */
@media (max-width: 479.98px) {
    /* Typography */
    html {
        font-size: 14px;
    }
    
    /* Hero */
    .hero-content h1 {
        font-size: 1.5rem;
        line-height: 1.2;
    }
    
    .hero-content p {
        font-size: 0.85rem;
    }
    
    /* Buttons */
    .btn {
        padding: var(--spacing-xs) var(--spacing-sm);
        font-size: 0.85rem;
    }
    
    /* Newsletter Form */
    .newsletter-form input {
        min-width: 180px;
        padding: var(--spacing-xs) var(--spacing-sm);
    }
    
    /* Product Cards */
    .product-info h3 {
        font-size: 1rem;
    }
    
    .product-price {
        font-size: 1.125rem;
    }
    
    .product-description {
        font-size: 0.8rem;
    }
    
    /* Stats */
    .stat-number {
        font-size: 2rem;
    }
    
    .stat-label {
        font-size: 1rem;
    }
}

/* Landscape Mobile Devices */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        height: 100vh;
        margin-top: 65px;
    }
    
    .hero-content h1 {
        font-size: 1.75rem;
        margin-bottom: var(--spacing-xs);
    }
    
    .hero-content p {
        font-size: 0.9rem;
        margin-bottom: var(--spacing-sm);
    }
    
    .hero-buttons {
        flex-direction: row;
        gap: var(--spacing-sm);
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --white: #1a1a1a;
        --light-gray: #2d2d2d;
        --dark-gray: #f5f5f5;
        --black: #ffffff;
    }
    
    .header {
        background-color: var(--white);
        border-bottom: 1px solid var(--light-gray);
    }
    
    .navbar {
        background-color: var(--white);
    }
    
    .nav-menu {
        background-color: var(--white);
    }
    
    .feature-card,
    .product-card {
        background-color: var(--light-gray);
    }
    
    .newsletter {
        background-color: var(--light-gray);
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
        border-radius: 50%;
        object-fit: cover;
    }
}

/* Touch Device Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn {
        min-height: 44px;
        min-width: 44px;
    }
    
    .nav-menu a {
        padding: var(--spacing-sm);
        min-height: 44px;
        display: flex;
        align-items: center;
    }
    
    .mobile-menu-toggle {
        padding: var(--spacing-sm);
        min-height: 44px;
        min-width: 44px;
    }
    
    .hero-prev, .hero-next {
        display: none;
    }
    
    .dropdown:hover .dropdown-menu {
        opacity: 0;
        visibility: hidden;
    }
}

/* Print Optimizations */
@media print {
    .hero {
        break-inside: avoid;
        page-break-inside: avoid;
    }
    
    .feature-card,
    .product-card {
        break-inside: avoid;
        page-break-inside: avoid;
        margin-bottom: var(--spacing-md);
    }
    
    .section {
        padding: var(--spacing-md) 0;
    }
}

/* Accessibility - Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    .hero-slide {
        transition: none;
    }
    
    .product-image img {
        transition: none;
    }
    
    .feature-card,
    .product-card {
        transition: none;
    }
    
    .feature-card:hover,
    .product-card:hover {
        transform: none;
    }
}