/* ===================================
   Hi-Tech Enterprises - Responsive Styles
   Mobile-First Approach
   =================================== */

/* === Large Tablets & Small Desktops (max-width: 1024px) === */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--spacing-lg);
    }

    .hero-text {
        order: 2;
        grid-column: 1 / -1;
        /* Reset grid placement for mobile */
    }

    .hero-image {
        order: 1;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-buttons {
        justify-content: center;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
    }

    .about-image {
        order: 1;
    }

    .about-text {
        order: 2;
        text-align: center;
    }

    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-lg);
    }
}

/* === Tablets (max-width: 768px) === */
@media (max-width: 768px) {
    :root {
        font-size: 15px;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        max-width: 300px;
        height: 100vh;
        height: 100dvh;
        background: var(--white);
        flex-direction: column;
        justify-content: flex-start;
        align-items: flex-start;
        gap: var(--spacing-xs);
        padding: 80px var(--spacing-lg) var(--spacing-lg);
        box-shadow: -5px 0 30px rgba(0, 0, 0, 0.15);
        transition: right 0.3s ease-in-out;
        z-index: 1000;
        overflow-y: auto;
    }

    .nav-links.active {
        right: 0;
    }

    .nav-links li {
        width: 100%;
        border-bottom: 1px solid var(--medium-gray);
    }

    .nav-links li:last-child {
        border-bottom: none;
    }

    .nav-links a {
        font-size: 1rem;
        padding: var(--spacing-sm) 0;
        display: block;
        width: 100%;
        color: var(--primary-dark);
    }

    .nav-links a.active {
        color: var(--secondary-orange);
        border-bottom: none;
    }

    .nav-links a::after {
        display: none;
    }

    .nav-cta {
        margin-top: var(--spacing-md);
    }

    .menu-toggle {
        display: flex;
        z-index: 1001;
    }

    .menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -6px);
    }

    .nav-overlay {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        height: 100dvh;
        background: rgba(0, 0, 0, 0.6);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        z-index: 999;
    }

    .nav-overlay.active {
        opacity: 1;
        visibility: visible;
    }

    .hero {
        min-height: auto;
        padding-top: 100px;
        padding-bottom: var(--spacing-lg);
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-badge {
        font-size: 0.75rem;
        padding: 0.5rem 0.75rem;
        white-space: nowrap;
    }

    .hero-image img {
        max-width: 80%;
        margin: 0 auto;
    }

    .section {
        padding: var(--spacing-lg) 0;
    }

    .section-title {
        font-size: 1.75rem;
    }

    .products-grid {
        grid-template-columns: 1fr;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .about-stats {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--spacing-sm);
    }

    .stat-number {
        font-size: 1.75rem;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-brand {
        max-width: 100%;
    }

    .footer-social {
        justify-content: center;
    }

    .page-header h1 {
        font-size: 2rem;
    }

    .industries-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .cta h2 {
        font-size: 1.75rem;
    }
}

/* === Mobile Phones (max-width: 480px) === */
@media (max-width: 480px) {
    :root {
        font-size: 14px;
    }

    .container {
        padding: 0 var(--spacing-sm);
    }

    .logo img {
        height: 50px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
    }

    .hero-title {
        font-size: 1.75rem;
    }

    .product-image {
        height: 220px;
    }

    .industries-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--spacing-sm);
    }

    .industry-item {
        padding: var(--spacing-md);
    }

    .industry-icon {
        font-size: 2rem;
    }

    .about-stats {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .stat-item {
        padding: var(--spacing-sm);
        background: var(--light-gray);
        border-radius: var(--radius-md);
    }

    .feature-card {
        padding: var(--spacing-md);
    }

    .contact-form {
        padding: var(--spacing-md);
    }

    .btn {
        padding: var(--spacing-sm) var(--spacing-md);
        font-size: 0.9rem;
    }
}

/* === Desktop & Large Screens (min-width: 1200px) === */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }

    .hero-title {
        font-size: 4rem;
    }

    .section-title {
        font-size: 3rem;
    }
}

/* === Ultra-wide Screens (min-width: 1600px) === */
@media (min-width: 1600px) {
    .container {
        max-width: 1400px;
    }
}

/* === Print Styles === */
@media print {

    .header,
    .footer,
    .nav,
    .hero-buttons,
    .cta {
        display: none !important;
    }

    body {
        font-size: 12pt;
        color: #000;
        background: #fff;
    }

    .section {
        page-break-inside: avoid;
    }
}

/* === Reduced Motion === */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    html {
        scroll-behavior: auto;
    }

    .hero-image img {
        animation: none;
    }
}

/* === Dark Mode Support === */
@media (prefers-color-scheme: dark) {
    /* Optional dark mode styles can be added here */
}

/* === High Contrast Mode === */
@media (prefers-contrast: high) {
    :root {
        --primary-blue: #0a2a4a;
        --secondary-orange: #ff6b35;
        --dark-gray: #000000;
    }

    .btn {
        border: 2px solid currentColor;
    }
}