/* Responsive Styles */

/* Large Desktop */
@media (max-width: 1400px) {
    .hero h1 {
        font-size: 2.75rem;
    }
}

/* Hide hero stats on screens smaller than 1200px */
@media (max-width: 1200px) {
    .hero-stats {
        display: none;
    }
}

/* Laptop */
@media (max-width: 1200px) {
    :root {
        --container-padding: 2rem;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: var(--space-2xl);
    }

    .features-grid {
        gap: var(--space-xl);
    }
}

/* Tablet Landscape */
@media (max-width: 1024px) {
    h1 {
        font-size: 2.25rem;
    }

    h2 {
        font-size: 1.75rem;
    }

    .hero {
        min-height: 70vh;
    }

    .hero h1 {
        font-size: 2.25rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .features-image {
        order: -1;
    }
}

/* Tablet Portrait */
@media (max-width: 768px) {
    :root {
        --container-padding: 1.25rem;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.5rem;
    }

    h3 {
        font-size: 1.25rem;
    }

    .section {
        padding: var(--space-3xl) 0;
    }

    /* Navigation */
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        align-items: flex-start;
        padding: 80px var(--space-xl) var(--space-xl);
        box-shadow: var(--shadow-xl);
        transition: right var(--transition-base);
        gap: 0;
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu a {
        width: 100%;
        padding: var(--space-md) 0;
        border-bottom: 1px solid var(--gray-100);
    }

    .nav-toggle {
        display: flex;
    }

    .nav-toggle.active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-toggle.active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .nav-cta {
        margin-top: var(--space-md);
    }

    /* Hero */
    .hero {
        min-height: auto;
        padding: 120px 0 60px;
    }

    .hero h1 {
        font-size: 1.875rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .hero-buttons {
        flex-direction: column;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
    }

    .footer-bottom {
        flex-direction: column;
        gap: var(--space-md);
        text-align: center;
    }

    /* Services */
    .services-grid {
        grid-template-columns: 1fr;
    }

    /* Fix for inline grid override on about page */
    .services-grid[style*="grid-template-columns"] {
        grid-template-columns: 1fr !important;
    }

    /* Prevent text overflow */
    .service-card,
    .value-card,
    .capability-card,
    .product-card,
    .cert-card {
        overflow-wrap: break-word;
        word-wrap: break-word;
        hyphens: auto;
    }

    .service-card ul li,
    .service-card p {
        font-size: 0.95rem;
        line-height: 1.6;
    }

    /* Stats */
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-lg);
    }

    .stat-number {
        font-size: 2.25rem;
    }

    /* Products */
    .products-grid {
        grid-template-columns: 1fr;
    }

    /* Form */
    .form-row {
        grid-template-columns: 1fr;
    }

    /* Page Header */
    .page-header {
        padding: 120px 0 60px;
    }

    /* Contact */
    .contact-info {
        order: 2;
    }

    .contact-form-wrapper {
        order: 1;
    }
}

/* Mobile */
@media (max-width: 480px) {
    :root {
        --container-padding: 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    h2 {
        font-size: 1.375rem;
    }

    .section {
        padding: var(--space-2xl) 0;
    }

    .hero h1 {
        font-size: 1.625rem;
    }

    .btn {
        padding: var(--space-sm) var(--space-lg);
        font-size: 0.9rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-item {
        padding: var(--space-lg) 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .stat-item:last-child {
        border-bottom: none;
    }

    .service-card,
    .value-card,
    .capability-card {
        padding: var(--space-xl);
    }

    .contact-form-wrapper {
        padding: var(--space-lg);
    }

    .nav-logo-text .company-name {
        font-size: 0.95rem;
    }

    .nav-logo-text .tagline {
        display: none;
    }

    .nav-logo img {
        height: 40px;
    }

    .values-grid {
        grid-template-columns: 1fr;
    }

    .cert-card {
        flex-direction: column;
        text-align: center;
    }

    .cert-icon {
        margin: 0 auto;
    }
}

/* Mobile Navigation Overlay */
.nav-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    visibility: hidden;
    transition: opacity var(--transition-base), visibility var(--transition-base);
    z-index: 998;
}

.nav-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Print Styles */
@media print {

    .header,
    .footer,
    .nav-toggle,
    .btn {
        display: none !important;
    }

    .hero {
        min-height: auto;
        padding: 20px 0;
        background: none !important;
    }

    .hero h1,
    .hero p {
        color: #000 !important;
    }

    .section {
        padding: 20px 0;
    }
}