/* Mobile First Responsive Design */


@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding: 90px 0 50px;
    }
    
    .hero-content {
        order: 1;
        margin-bottom: 2rem;
        margin-top: 1rem;
    }
    
    .hero-image {
        order: 2;
        padding: 0 15px;
    }
    
    .company-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .products-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .blog-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
        gap: 1.5rem;
    }
}

@media (max-width: 768px) {
    /* REPLACE the existing .nav-menu block in @media (max-width: 768px) with this */
    /* .nav-menu {
        position: fixed;
        left: -100%;
        top: var(--header-height);            
        flex-direction: column;
        background-color: white;
        width: 100%;
        height: calc(100vh - var(--header-height)); 
        text-align: center;
        transition: left 0.28s ease, transform 0.28s ease;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
        z-index: 1001;                        
        overflow-y: auto;                     
        -webkit-overflow-scrolling: touch;
    }

    .nav-menu.active {
        left: 0;
    } */

    #nav-overlay {
      transition: background-color 0.22s ease, opacity 0.22s ease;
      background-color: rgba(0,0,0,0.35);
      opacity: 0;
      pointer-events: none; /* JS enables when menu open */
      z-index: 1000;
    }

    .header, header { z-index: 1001; }
    
    /* overlay visible state */
    #nav-overlay.visible {
      opacity: 1;
      pointer-events: auto;
    }
    
    /* nav menu container */
    #nav-menu, .nav-menu {
      position: fixed;
      top: var(--header-height);
      left: -100%;
      width: 100%;
      height: calc(100vh - var(--header-height));
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: flex-start;
      background-color: #fff;
      padding: 1.4rem 1.2rem;
      text-align: center;
      overflow-y: auto;
      -webkit-overflow-scrolling: touch;
      transition: left 0.28s cubic-bezier(.2,.8,.2,1);
      z-index: 1003; /* above header and overlay */
      pointer-events: auto; /* allow inside clicks */
    }
    
    /* visible state — JS will add 'active' and 'open' */
    #nav-menu.active,
    #nav-menu.open,
    .nav-menu.active,
    .nav-menu.open {
      left: 0;
    }
    
    /* clickable links */
    #nav-menu a, .nav-menu a {
      display: block;
      width: 100%;
      padding: 0.75rem 0.5rem;
      text-decoration: none;
      cursor: pointer;
    }
    
    /* protective rule — avoid accidental pointer-events:none from other rules */
    #nav-menu, #nav-menu * { pointer-events: auto !important; }

    .nav-toggle {
        display: flex;
    }

/* New hamburger styles (modern, accessible) */
.nav-toggle.hamburger {
    background: transparent;
    border: 0;
    padding: 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.hamburger-box {
    width: 28px;
    height: 18px;
    display: inline-block;
    position: relative;
}

.hamburger-inner,
.hamburger-inner::before,
.hamburger-inner::after {
    width: 28px;
    height: 2.5px;
    background-color: #333;
    border-radius: 2px;
    position: absolute;
    left: 0;
    transition: transform 0.28s ease, opacity 0.2s ease;
}

.hamburger-inner { top: 50%; transform: translateY(-50%); }
.hamburger-inner::before { content: ''; top: -8px; }
.hamburger-inner::after { content: ''; top: 8px; }

.nav-toggle.hamburger:focus { outline: 3px solid rgba(46,125,50,0.18); outline-offset: 3px; }

.nav-toggle.hamburger[aria-expanded="true"] .hamburger-inner {
    transform: rotate(45deg);
}
.nav-toggle.hamburger[aria-expanded="true"] .hamburger-inner::before {
    transform: rotate(90deg) translateX(0);
    top: 0;
    opacity: 0;
}
.nav-toggle.hamburger[aria-expanded="true"] .hamburger-inner::after {
    transform: rotate(-90deg);
    top: 0;
}

    .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 {
        padding: 80px 0 40px;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 1rem;
        margin-bottom: 1.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        max-width: 280px;
        padding: 16px 24px;
    }

    .section-header h2 {
        font-size: 2rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    .stats {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .product-card {
        margin: 0 2%;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }

    .social-links {
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .nav-container {
        padding: 0 25px;
    }
    
    .nav-logo img {
        height: 50px;
        width: 157px;
    }

    .hero {
        padding: 70px 0 30px;
    }

    .hero-title {
        font-size: 1.8rem;
        line-height: 1.3;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        line-height: 1.5;
    }

    .section-header h2 {
        font-size: 1.8rem;
    }

    .section-header p {
        font-size: 0.95rem;
    }

    .btn {
        width: 100%;
        max-width: 260px;
        padding: 14px 20px;
        font-size: 0.95rem;
    }

    .stats {
        flex-direction: column;
        gap: 1rem;
    }

    .stat h4 {
        font-size: 1.5rem;
    }

    .product-card {
        margin: 0 5px;
    }

    .product-content {
        padding: 1.25rem;
    }

    .product-content h3 {
        font-size: 1.2rem;
    }

    .form-container {
        padding: 1.5rem;
    }

    .contact-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.5rem;
    }

    .contact-item i {
        margin-top: 0;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

/* Loading states */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Form validation styles */
.form-group input:invalid,
.form-group textarea:invalid {
    border-color: #f44336;
}

.form-group input:valid,
.form-group textarea:valid {
    border-color: #4CAF50;
}

/* Mobile-specific improvements */
@media (max-width: 768px) {
    /* Improve touch targets */
    .nav-link {
        padding: 12px 16px;
        display: block;
        font-size: 1.1rem;
    }
    
    /* Better mobile spacing */
    .container {
        padding: 0 15px;
    }
    
    /* Improve mobile forms */
    .form-container {
        margin: 0 10px;
    }
    
    /* Better mobile product cards */
    .product-card {
        margin-bottom: 1rem;
    }
    
    /* Mobile-friendly contact info */
    .contact-item {
        margin-bottom: 1.5rem;
    }
    
    /* Mobile job cards */
    .job-card {
        margin-bottom: 1rem;
    }
    
    /* Mobile blog cards */
    .blog-card {
        margin-bottom: 1rem;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: #2E7D32;
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: 4px;
    z-index: 10000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

/* Field error styling */
.field-error {
    color: #f44336;
    font-size: 0.8rem;
    margin-top: 0.25rem;
    display: block;
}

/* Form validation styles */
.form-group input.error,
.form-group textarea.error {
    border-color: #f44336;
    box-shadow: 0 0 0 2px rgba(244, 67, 54, 0.2);
}

.form-group input:valid:not(:placeholder-shown),
.form-group textarea:valid:not(:placeholder-shown) {
    border-color: #4CAF50;
}

/* Focus styles for better accessibility */
button:focus,
input:focus,
textarea:focus,
select:focus,
a:focus {
    outline: 2px solid #2E7D32;
    outline-offset: 2px;
}

button:focus,
input:focus,
textarea:focus {
    outline: 3px solid #2E7D32;
    outline-offset: 2px;
    box-shadow: 0 0 0 4px rgba(46, 125, 50, 0.2);
}

@media (prefers-contrast: high) {
    button:focus,
    input:focus {
        outline: 3px solid #000;
        outline-offset: 1px;
    }
}

/* Mobile touch improvements */
@media (hover: none) and (pointer: coarse) {
    .btn:hover {
        transform: none;
    }
    
    .product-card:hover {
        transform: none;
    }
    
    .nav-link:hover::after {
        width: 0;
    }
    
    .nav-link:active::after {
        width: 100%;
    }
    
    /* Better touch targets for mobile */
    .nav-toggle {
        min-height: 44px;
        min-width: 44px;
        padding: 10px;
    }
    
    .nav-link {
        min-height: 44px;
        padding: 12px 16px;
        display: flex;
        align-items: center;
    }
    
    .btn {
        min-height: 44px;
        min-width: 44px;
        padding: 12px 24px;
    }
    
    /* Improve form inputs for mobile */
    .form-group input,
    .form-group textarea {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
    
    /* Better mobile spacing */
    .hero {
        padding: 100px 0 60px;
    }
    
    .section-header {
        margin-bottom: 3rem;
    }
    
    .products-grid {
        gap: 1.5rem;
    }
    
    .product-card {
        margin-bottom: 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-image img,
    .product-image img,
    .blog-image img {
        transform: none !important;
    }
}






