/* ========================================
   Responsive Design - Mobile First
======================================== */

/* Large screens and up (1200px+) */
@media (min-width: 1200px) {
    .hero-title {
        font-size: 4.5rem;
    }
    
    .container {
        padding: 0 2rem;
    }
}

/* Desktop and up (1024px+) */
@media (min-width: 1024px) {
    .hero-title {
        font-size: 4rem;
    }
    
    .section-header h2 {
        font-size: 3rem;
    }
}

/* Tablet landscape (768px to 1023px) */
@media (max-width: 1023px) {
    .about-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .about-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        text-align: center;
    }
    
    .stat-item {
        margin-bottom: 0;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* Tablet portrait (768px to 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .commodity-categories {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .testimonial-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile landscape and tablet portrait (480px to 767px) */
@media (max-width: 767px) {
    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 80px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 80px);
        background-color: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: center;
        padding-top: 2rem;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        z-index: 999;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-menu a {
        padding: 1rem 0;
        font-size: 1.125rem;
        width: 100%;
        text-align: center;
        border-bottom: 1px solid var(--gray-200);
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .nav-toggle.active .bar:nth-child(2) {
        opacity: 0;
    }
    
    .nav-toggle.active .bar:nth-child(1) {
        transform: translateY(8px) rotate(45deg);
    }
    
    .nav-toggle.active .bar:nth-child(3) {
        transform: translateY(-8px) rotate(-45deg);
    }
    
    /* Hero Section */
    .hero {
        height: 80vh;
        min-height: 500px;
    }
    
    .hero-title {
        font-size: 2.5rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 1rem;
    }
    
    .hero-buttons .btn {
        width: 100%;
        max-width: 280px;
    }
    
    /* Typography */
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    h3 { font-size: 1.5rem; }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    /* Sections */
    section {
        padding: 3rem 0;
    }
    
    .section-header {
        margin-bottom: 2rem;
    }
    
    /* About Section */
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .about-stats {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .stat-item h3 {
        font-size: 2rem;
    }
    
    .feature-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .feature-icon {
        align-self: center;
    }
    
    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .service-card {
        padding: 2rem 1.5rem;
    }
    
    /* Commodities */
    .commodity-categories {
        grid-template-columns: 1fr;
    }
    
    /* Process */
    .step-item {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
        padding: 1.5rem;
    }
    
    .step-item:not(:last-child)::after {
        left: 50%;
        transform: translateX(-50%);
    }
    
    /* Testimonials */
    .testimonial-grid {
        grid-template-columns: 1fr;
    }
    
    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .form {
        padding: 1.5rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }
    
    .footer-links {
        justify-content: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Small mobile (320px to 479px) */
@media (max-width: 479px) {
    .container {
        padding: 0 0.75rem;
    }
    
    /* Navigation */
    .nav-container {
        padding: 0 0.75rem;
    }
    
    .nav-logo h2 {
        font-size: 1.5rem;
    }
    
    /* Hero */
    .hero-content {
        padding: 0 1rem;
    }
    
    .hero-title {
        font-size: 2rem;
        line-height: 1.1;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    /* Typography */
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    h3 { font-size: 1.25rem; }
    
    .section-header h2 {
        font-size: 1.75rem;
    }
    
    .section-subtitle {
        font-size: 1rem;
    }
    
    /* Buttons */
    .btn {
        padding: 0.625rem 1.5rem;
        font-size: 0.875rem;
    }
    
    /* About Stats */
    .about-stats {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .stat-item {
        margin-bottom: 1.5rem;
    }
    
    .stat-item:last-child {
        margin-bottom: 0;
    }
    
    /* Service Cards */
    .service-card {
        padding: 1.5rem 1rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    /* Category Cards */
    .category-card {
        padding: 1.5rem;
    }
    
    .category-header {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .category-header i {
        font-size: 1.5rem;
    }
    
    /* Testimonials */
    .testimonial-card {
        padding: 1.5rem;
    }
    
    .testimonial-card::before {
        font-size: 3rem;
        top: -5px;
        left: 15px;
    }
    
    /* Contact */
    .contact-item {
        flex-direction: column;
        text-align: center;
        gap: 0.5rem;
    }
    
    .form {
        padding: 1rem;
    }
    
    /* Process */
    .step-number {
        width: 50px;
        height: 50px;
        font-size: 1.25rem;
    }
}

/* Extra small screens (landscape phones) */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.75rem;
    }
    
    .nav-logo h2 {
        font-size: 1.25rem;
    }
    
    .section-header h2 {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.5rem 1rem;
        font-size: 0.875rem;
    }
}

/* Print styles */
@media print {
    .nav-toggle,
    .hero-scroll,
    .btn,
    .social-links {
        display: none !important;
    }
    
    .navbar {
        position: static;
        background-color: transparent;
        box-shadow: none;
        border-bottom: 1px solid var(--gray-300);
    }
    
    .hero {
        height: auto;
        min-height: auto;
        background: var(--gray-100);
        color: var(--gray-900);
        padding: 2rem 0;
    }
    
    .hero-title,
    .hero-subtitle {
        color: var(--gray-900);
    }
    
    section {
        padding: 2rem 0;
        page-break-inside: avoid;
    }
    
    .footer {
        background-color: transparent;
        color: var(--gray-900);
        border-top: 1px solid var(--gray-300);
    }
    
    .footer-section h3,
    .footer-section h4 {
        color: var(--gray-900);
    }
    
    .footer-section p,
    .footer-section ul li a {
        color: var(--gray-700);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    :root {
        --primary-color: #000080;
        --primary-dark: #000060;
        --gray-600: #000000;
        --gray-700: #000000;
        --gray-800: #000000;
        --gray-900: #000000;
    }
    
    .btn-outline {
        border-width: 3px;
    }
    
    .nav-link::after {
        height: 3px;
    }
}

/* Reduced motion preferences */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .scroll-indicator {
        animation: none;
    }
    
    .hero::before {
        animation: none;
    }
}