/* 
 * Responsive styles for Independent Electric
 * Mobile-first approach with breakpoints
 */

/* ---------- Mobile Menu (For all screen sizes initially) ---------- */
.mobile-menu-btn {
    display: block;
    z-index: 100;
}

nav .nav-menu {
    display: none;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--white);
    padding: 5rem var(--spacing-lg) var(--spacing-lg);
    z-index: 90;
}

nav .nav-menu.active {
    display: flex;
}

nav .nav-menu li {
    margin: var(--spacing-md) 0;
    text-align: center;
}

/* Animation for hamburger to X */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

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

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

/* ---------- Small devices (576px and up) ---------- */
@media (min-width: 576px) {
    .hero-buttons {
        flex-direction: row;
    }
}

/* ---------- Medium devices (768px and up) ---------- */
@media (min-width: 768px) {
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.5rem;
    }
    
    h3 {
        font-size: 1.75rem;
    }
    
    .hero {
        padding: 6rem 0;
    }
    
    /* Adjust footer layout */
    .footer-content {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---------- Large devices (992px and up) ---------- */
@media (min-width: 992px) {
    /* Switch to desktop navigation */
    .mobile-menu-btn {
        display: none;
    }
    
    nav .nav-menu {
        display: flex;
        flex-direction: row;
        position: static;
        height: auto;
        padding: 0;
        background-color: transparent;
    }
    
    nav .nav-menu li {
        margin: 0 0 0 var(--spacing-lg);
        text-align: left;
    }
    
    /* Hero section improvements */
    .hero {
        padding: 7rem 0;
    }
    
    .hero h1 {
        font-size: 3.5rem;
    }
    
    /* Services grid */
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ---------- Extra large devices (1200px and up) ---------- */
@media (min-width: 1200px) {
    .container {
        padding: 0;
    }
    
    .hero {
        padding: 8rem 0;
    }
    
    .hero h1 {
        font-size: 4rem;
    }
}

/* ---------- Utility Classes ---------- */
@media (max-width: 767px) {
    .mobile-hidden {
        display: none !important;
    }
}

@media (min-width: 768px) {
    .desktop-hidden {
        display: none !important;
    }
}

/* ---------- Print Styles ---------- */
@media print {
    header, footer, .cta-section, .hero-buttons {
        display: none;
    }
    
    body {
        font-size: 12pt;
        line-height: 1.5;
    }
    
    h1 {
        font-size: 24pt;
    }
    
    h2 {
        font-size: 20pt;
    }
    
    h3 {
        font-size: 16pt;
    }
    
    img {
        max-width: 100% !important;
    }
    
    a:after {
        content: " (" attr(href) ")";
        font-size: 10pt;
        font-style: italic;
    }
    
    a[href^="http"]:after {
        content: " (" attr(href) ")";
    }
    
    a[href^="#"]:after {
        content: "";
    }
    
    a:link, a:visited {
        color: #000;
        text-decoration: underline;
    }
    
    .container {
        width: 100%;
        max-width: 100%;
    }
}