/* Responsive Design - Mobile First Approach */

/* Large Desktop */
@media (min-width: 1400px) {
    .container {
        max-width: 1320px;
    }
    
    .hero-title {
        font-size: 4rem;
    }
    
    .hero-graphic {
        width: 500px;
        height: 500px;
    }
    
    .smart-home-icon {
        font-size: 10rem;
    }
    
    .element {
        width: 70px;
        height: 70px;
        font-size: 1.8rem;
    }
}

/* Desktop */
@media (max-width: 1199px) {
    .hero-container {
        gap: 3rem;
    }
    
    .hero-title {
        font-size: 3rem;
    }
    
    .hero-graphic {
        width: 350px;
        height: 350px;
    }
    
    .smart-home-icon {
        font-size: 6rem;
    }
    
    .element {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* Tablet */
@media (max-width: 991px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 70px;
        flex-direction: column;
        background-color: white;
        width: 100%;
        text-align: center;
        transition: 0.3s;
        box-shadow: 0 10px 27px rgba(0, 0, 0, 0.05);
        padding: 2rem 0;
    }
    
    .nav-menu.active {
        left: 0;
    }
    
    .nav-toggle {
        display: flex;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-buttons {
        justify-content: center;
    }
    
    .hero-graphic {
        width: 300px;
        height: 300px;
    }
    
    .smart-home-icon {
        font-size: 5rem;
    }
    
    .element {
        width: 45px;
        height: 45px;
        font-size: 1rem;
    }
    
    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .about-stats {
        justify-content: center;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }
    
    .solutions-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    }
    
    .footer-content {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

/* Mobile Large */
@media (max-width: 767px) {
    .container {
        padding: 0 15px;
    }
    
    .hero {
        padding: 100px 0 60px;
    }
    
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .btn {
        width: 100%;
        max-width: 250px;
        text-align: center;
    }
    
    .hero-graphic {
        width: 250px;
        height: 250px;
    }
    
    .smart-home-icon {
        font-size: 4rem;
    }
    
    .element {
        width: 35px;
        height: 35px;
        font-size: 0.8rem;
    }
    
    .section-header h2 {
        font-size: 2rem;
    }
    
    .section-header p {
        font-size: 1rem;
    }
    
    .services {
        padding: 60px 0;
    }
    
    .solutions {
        padding: 60px 0;
    }
    
    .about {
        padding: 60px 0;
    }
    
    .contact {
        padding: 60px 0;
    }
    
    .service-card,
    .solution-card {
        padding: 1.5rem;
    }
    
    .about-stats {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .about-features {
        align-items: center;
    }
    
    .contact-form {
        padding: 1.5rem;
    }
    
    .footer {
        padding: 40px 0 20px;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .social-links {
        justify-content: center;
    }
}

/* Mobile Small */
@media (max-width: 575px) {
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-graphic {
        width: 200px;
        height: 200px;
    }
    
    .smart-home-icon {
        font-size: 3rem;
    }
    
    .element {
        width: 30px;
        height: 30px;
        font-size: 0.7rem;
    }
    
    .nav-container {
        padding: 0 15px;
    }
    
    .nav-logo a {
        font-size: 1.2rem;
    }
    
    .nav-logo i {
        font-size: 1.5rem;
    }
    
    .service-card,
    .solution-card {
        padding: 1rem;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }
    
    .price {
        font-size: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .contact-icon {
        width: 40px;
        height: 40px;
        font-size: 1rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 0.8rem;
    }
}

/* Extra Small Mobile */
@media (max-width: 375px) {
    .hero-title {
        font-size: 1.5rem;
    }
    
    .hero-graphic {
        width: 180px;
        height: 180px;
    }
    
    .smart-home-icon {
        font-size: 2.5rem;
    }
    
    .element {
        width: 25px;
        height: 25px;
        font-size: 0.6rem;
    }
    
    .section-header h2 {
        font-size: 1.8rem;
    }
    
    .service-card h3,
    .solution-card h3 {
        font-size: 1.5rem;
    }
    
    .about-stats {
        gap: 0.5rem;
    }
    
    .stat-number {
        font-size: 1.8rem;
    }
}

/* Landscape Mobile */
@media (max-height: 500px) and (orientation: landscape) {
    .hero {
        padding: 80px 0 40px;
        min-height: auto;
    }
    
    .hero-container {
        gap: 2rem;
    }
    
    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }
    
    .hero-description {
        margin-bottom: 1rem;
    }
    
    .hero-graphic {
        width: 200px;
        height: 200px;
    }
    
    .smart-home-icon {
        font-size: 3rem;
    }
    
    .element {
        width: 25px;
        height: 25px;
        font-size: 0.6rem;
    }
}

/* High DPI Displays */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-graphic,
    .about-graphic {
        transform: scale(1.1);
    }
}

/* Print Styles */
@media print {
    .header,
    .nav-toggle,
    .hero-buttons,
    .btn,
    .contact-form,
    .footer {
        display: none;
    }
    
    .hero {
        padding: 20px 0;
        background: white;
    }
    
    .hero-container {
        grid-template-columns: 1fr;
        text-align: left;
    }
    
    .hero-title {
        color: black;
        font-size: 2rem;
    }
    
    .hero-description {
        color: black;
    }
    
    .section-header h2 {
        color: black;
    }
    
    .service-card,
    .solution-card {
        box-shadow: none;
        border: 1px solid #ccc;
        break-inside: avoid;
    }
    
    .about-stats {
        display: flex;
        justify-content: space-around;
    }
    
    .contact-content {
        grid-template-columns: 1fr;
    }
    
    .contact-info {
        order: 2;
    }
    
    .contact-form {
        order: 1;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}

/* Accessibility Improvements */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .hero-graphic,
    .about-graphic {
        animation: none;
    }
    
    .element {
        animation: none;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1a1a1a;
        --bg-secondary: #2d2d2d;
        --text-primary: #ffffff;
        --text-secondary: #cccccc;
        --accent: #667eea;
    }
    
    body {
        background-color: var(--bg-primary);
        color: var(--text-primary);
    }
    
    .header {
        background: rgba(26, 26, 26, 0.95);
    }
    
    .nav-link {
        color: var(--text-primary);
    }
    
    .hero {
        background: linear-gradient(135deg, #2d2d2d 0%, #1a1a1a 100%);
    }
    
    .hero-title {
        color: var(--text-primary);
    }
    
    .hero-description {
        color: var(--text-secondary);
    }
    
    .services {
        background: var(--bg-secondary);
    }
    
    .service-card {
        background: var(--bg-primary);
        border-color: #444;
    }
    
    .service-card h3 {
        color: var(--text-primary);
    }
    
    .service-card p,
    .service-card li {
        color: var(--text-secondary);
    }
    
    .solutions {
        background: var(--bg-primary);
    }
    
    .solution-card {
        background: var(--bg-secondary);
        border-color: #444;
    }
    
    .solution-card h3 {
        color: var(--text-primary);
    }
    
    .solution-features li {
        color: var(--text-secondary);
    }
    
    .about {
        background: var(--bg-secondary);
    }
    
    .about h2 {
        color: var(--text-primary);
    }
    
    .about-description {
        color: var(--text-secondary);
    }
    
    .contact {
        background: var(--bg-primary);
    }
    
    .contact-form {
        background: var(--bg-secondary);
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        background: var(--bg-primary);
        border-color: #444;
        color: var(--text-primary);
    }
    
    .footer {
        background: #000000;
    }
}
