/* Mobile First Responsive Design */

/* Small devices (landscape phones, 576px and up) */
@media (max-width: 640px) {
    .container {
        padding: 0 1rem;
    }

    /* Navigation */
    .nav-menu {
        display: none;
    }

    .nav-toggle {
        display: flex;
    }

    .mobile-nav {
        display: block;
    }

    .nav-container {
        height: 4rem;
    }

    .nav-brand-text {
        font-size: 1.25rem;
    }

    .nav-logo {
        height: 2rem;
    }

    /* Hero */
    .hero {
        min-height: 100vh;
        padding: 6rem 0 4rem;
    }

    .hero-content {
        max-width: 100%;
    }

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

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

    .hero-description {
        font-size: 1rem;
        margin-bottom: 2rem;
    }

    .hero-buttons {
        flex-direction: column;
        gap: 0.75rem;
    }

    .hero-buttons .btn {
        width: 100%;
        justify-content: center;
        padding: 1rem 2rem;
    }

    .hero-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
        margin-top: 2rem;
    }

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

    /* Sections */
    .section-header h2 {
        font-size: 2rem;
    }

    .section-header p {
        font-size: 1rem;
    }

    /* About */
    .about-features {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .feature-card {
        padding: 1.5rem 1rem;
    }

    .feature-icon {
        width: 3rem;
        height: 3rem;
        margin-bottom: 1rem;
    }

    .feature-icon i {
        font-size: 1.25rem;
    }

    /* Systems */
    .systems-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .system-card {
        padding: 1.5rem;
    }

    .system-card h3 {
        font-size: 1.25rem;
    }

    .system-icon {
        width: 3rem;
        height: 3rem;
    }

    .system-icon i {
        font-size: 1.25rem;
    }

    /* Contact */
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .contact-form-container {
        padding: 1.5rem;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .contact-items {
        gap: 1rem;
    }

    .contact-item {
        padding: 1rem;
    }

    .contact-icon {
        width: 2.5rem;
        height: 2.5rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .footer-bottom {
        flex-direction: column;
        text-align: center;
        gap: 1rem;
    }

    /* Product Slider */
    .slider-container {
        margin: 0 -1rem;
    }

    .slide-content {
        padding: 2rem 1rem;
    }

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

    .slide-subtitle {
        font-size: 0.875rem;
    }

    .slide-description {
        font-size: 1rem;
    }

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

    .slider-nav {
        width: 2.5rem;
        height: 2.5rem;
    }

    .slider-nav i {
        font-size: 0.875rem;
    }
}

/* Medium devices (tablets, 768px and up) */
@media (min-width: 641px) and (max-width: 1024px) {
    .container {
        padding: 0 2rem;
    }

    /* Hero */
    .hero-title {
        font-size: 3.5rem;
    }

    .hero-subtitle {
        font-size: 3rem;
    }

    .hero-buttons {
        flex-direction: row;
        gap: 1rem;
    }

    .hero-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    /* About */
    .about-features {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Systems */
    .systems-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Contact */
    .contact-content {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
    }

    .form-row {
        grid-template-columns: 1fr 1fr;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr;
        gap: 2rem;
    }

    /* Product Slider */
    .slide-content {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }
}

/* Large devices (desktops, 1024px and up) */
@media (min-width: 1025px) {
    /* Navigation */
    .nav-container {
        height: 5rem;
    }

    .nav-menu {
        display: flex;
    }

    .nav-toggle {
        display: none;
    }

    .mobile-nav {
        display: none;
    }

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

    .hero-subtitle {
        font-size: 3.5rem;
    }

    .hero-buttons {
        flex-direction: row;
    }

    /* About */
    .about-features {
        grid-template-columns: repeat(4, 1fr);
    }

    /* Systems */
    .systems-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    /* Contact */
    .contact-content {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }

    /* Footer */
    .footer-content {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }

    /* Product Slider */
    .slide-content {
        grid-template-columns: 1fr 1fr;
        gap: 3rem;
        align-items: center;
    }
}

/* Extra large devices (large desktops, 1200px and up) */
@media (min-width: 1200px) {
    .container {
        max-width: 1200px;
    }

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

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

    .section-header h2 {
        font-size: 3rem;
    }

    .systems-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 2.5rem;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .hover-scale:hover,
    .hover-lift:hover,
    .hover-glow:hover {
        transform: none;
        box-shadow: none;
    }

    .btn:hover {
        transform: none;
    }

    .feature-card:hover,
    .system-card:hover {
        transform: none;
    }

    /* Increase touch targets */
    .btn {
        min-height: 44px;
        padding: 0.875rem 2rem;
    }

    .nav-item {
        min-height: 44px;
        padding: 0.75rem 1rem;
    }

    .mobile-nav-item {
        min-height: 44px;
        padding: 1rem;
    }

    input, textarea, select {
        min-height: 44px;
        padding: 1rem;
    }
}

/* High DPI displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .nav-logo,
    .footer-logo img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* 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-behavior: auto !important;
    }

    .animate-pulse,
    .animate-bounce,
    .animate-float,
    .animate-rotate {
        animation: none;
    }
}

/* Print styles */
@media print {
    .navbar,
    .admin-panel,
    .admin-toggle,
    .slider-nav,
    .slider-play,
    .contact-form {
        display: none !important;
    }

    body {
        font-size: 12pt;
        line-height: 1.4;
        color: black;
        background: white;
    }

    .hero,
    .about,
    .systems,
    .contact {
        page-break-inside: avoid;
        padding: 1rem 0;
    }

    .section-header h2 {
        font-size: 18pt;
        margin-bottom: 0.5rem;
    }

    .btn {
        border: 1px solid black;
        background: white;
        color: black;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --background-color: var(--background-color);
        --text-color: var(--text-color);
        --gray-50: #1f2937;
        --gray-100: #374151;
        --gray-200: #4b5563;
        --gray-300: #6b7280;
        --gray-400: #9ca3af;
        --gray-500: #d1d5db;
        --gray-600: #e5e7eb;
        --gray-700: #f3f4f6;
        --gray-800: #f9fafb;
        --gray-900: #ffffff;
    }

    .navbar {
        background: #ffffff;
        border-bottom-color: var(--gray-100);
    }

    /* Keep navbar text/icons dark in dark mode */
    .navbar .nav-item,
    .navbar.scrolled .nav-item,
    .mobile-nav-item,
    .mobile-nav-dropdown-item {
        color: var(--text-color);
    }
    .nav-brand-text {
        color: var(--text-color);
        -webkit-text-fill-color: var(--text-color);
        background: none;
    }
    .hamburger,
    .hamburger::before,
    .hamburger::after {
        background: #111827;
    }

    /* Products dropdown text stays black in dark mode */
    .nav-dropdown-content,
    .nav-dropdown-item,
    .nav-dropdown-item-title,
    .nav-dropdown-item-desc {
        color: var(--text-color);
    }

    .hero {
        background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    }

    .hero-background {
        background: linear-gradient(135deg, rgba(14, 165, 233, 0.1) 0%, rgba(16, 185, 129, 0.1) 100%);
    }

    .about {
        background: var(--gray-50);
    }

    .systems {
        background: linear-gradient(135deg, var(--background-color) 0%, rgba(31, 41, 55, 0.5) 100%);
    }

    .feature-card,
    .system-card,
    .contact-form-container {
        background: var(--gray-100);
        border-color: var(--gray-200);
    }

    input, textarea, select {
        background: var(--gray-100);
        border-color: var(--gray-200);
        color: var(--text-color);
    }

    input:focus, textarea:focus, select:focus {
        border-color: var(--primary-color);
        background: var(--gray-50);
    }
}