/* ========================================
   APEX ELECTRICAL WORKS
   Main Website Styles
   ======================================== */


/* ---------- BASIC RESET ---------- */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    line-height: 1.6;
    color: #1b1b1b;
    background: #ffffff;
}

a {
    text-decoration: none;
    color: inherit;
}

section {
    padding: 100px 8%;
}


/* ---------- NAVIGATION ---------- */

header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 15, 15, 0.95);
}

nav {
    max-width: 1400px;
    margin: auto;
    min-height: 80px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    padding: 0 30px;
}

.logo {
    color: white;
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
}

nav ul {
    display: flex;
    gap: 30px;
    list-style: none;
}

nav ul a {
    color: #ffffff;
    font-size: 14px;
    transition: 0.3s;
}

nav ul a:hover {
    color: #f5b400;
}

nav > a:last-child {
    background: #f5b400;
    color: #111;
    padding: 12px 20px;
    border-radius: 4px;
    font-weight: 700;
    transition: 0.3s;
}

nav > a:last-child:hover {
    background: #ffffff;
}


/* ---------- HERO ---------- */

#home {
    min-height: 100vh;

    display: flex;
    align-items: center;

    padding-top: 150px;

    background:
        linear-gradient(
            rgba(10, 10, 10, 0.78),
            rgba(10, 10, 10, 0.78)
        ),
        linear-gradient(135deg, #222222, #090909);

    color: white;
}

#home > div {
    max-width: 850px;
}

#home p:first-child {
    color: #f5b400;
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 14px;
    margin-bottom: 20px;
}

#home h1 {
    font-size: clamp(48px, 7vw, 86px);
    line-height: 1.05;
    margin-bottom: 25px;
    letter-spacing: -2px;
}

#home p:not(:first-child) {
    max-width: 650px;
    font-size: 19px;
    color: #d4d4d4;
    margin-bottom: 35px;
}

#home a {
    display: inline-block;
    padding: 15px 25px;
    margin-right: 12px;
    margin-bottom: 10px;
    border-radius: 4px;
    font-weight: 700;
    transition: 0.3s;
}

#home a:first-of-type {
    background: #f5b400;
    color: #111;
}

#home a:first-of-type:hover {
    background: white;
}

#home a:last-of-type {
    border: 1px solid #ffffff;
    color: white;
}

#home a:last-of-type:hover {
    background: white;
    color: #111;
}


/* ---------- GENERAL TEXT ---------- */

section > div:first-child {
    max-width: 800px;
    margin-bottom: 50px;
}

section > div:first-child > p:first-child {
    color: #d19500;
    font-weight: 800;
    letter-spacing: 2px;
    font-size: 13px;
    margin-bottom: 12px;
}

h2 {
    font-size: clamp(34px, 5vw, 58px);
    line-height: 1.1;
    margin-bottom: 20px;
}

section > div:first-child > p:last-child {
    color: #666;
    font-size: 17px;
}


/* ---------- SERVICES ---------- */

#services {
    background: #f7f7f7;
}

#services > div:last-child {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

#services article {
    background: white;
    padding: 35px;
    border: 1px solid #e7e7e7;
    transition: 0.3s;
}

#services article:hover {
    transform: translateY(-6px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

#services h3 {
    font-size: 21px;
    margin-bottom: 12px;
}

#services article p {
    color: #666;
}


/* ---------- ABOUT ---------- */

#about {
    background: #111111;
    color: white;
}

#about > div {
    max-width: 850px;
}

#about > div > p:first-child {
    color: #f5b400;
    font-weight: 800;
    letter-spacing: 2px;
}

#about p {
    color: #cccccc;
    font-size: 17px;
    margin-bottom: 18px;
}

#about h2 {
    margin-bottom: 30px;
}


/* ---------- WHY CHOOSE US ---------- */

#about + section {
    background: white;
}

#about + section > div:last-child {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
}

#about + section article {
    border-top: 3px solid #f5b400;
    padding-top: 20px;
}

#about + section h3 {
    margin-bottom: 10px;
    font-size: 20px;
}

#about + section article p {
    color: #666;
}


/* ---------- PROJECTS ---------- */

#projects {
    background: #f7f7f7;
}

#projects > div:last-child {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

#projects article {
    min-height: 260px;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    padding: 30px;

    background:
        linear-gradient(
            rgba(0, 0, 0, 0.2),
            rgba(0, 0, 0, 0.85)
        ),
        #333333;

    color: white;
}

#projects h3 {
    font-size: 24px;
    margin-bottom: 8px;
}

#projects article p {
    color: #dddddd;
}


/* ---------- SERVICE AREAS ---------- */

#projects + section {
    background: #111111;
    color: white;
    text-align: center;
}

#projects + section > div {
    max-width: 800px;
    margin: auto;
}

#projects + section > div > p:first-child {
    color: #f5b400;
    font-weight: 800;
    letter-spacing: 2px;
}

#projects + section > div > p:last-child {
    color: #cccccc;
}


/* ---------- TESTIMONIALS ---------- */

#projects + section + section {
    background: white;
}

#projects + section + section > div:last-child {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
}

#projects + section + section article {
    padding: 35px;
    background: #f7f7f7;
    border-left: 4px solid #f5b400;
}

#projects + section + section article p {
    font-size: 18px;
    font-style: italic;
    margin-bottom: 15px;
}

#projects + section + section strong {
    color: #555;
}


/* ---------- CONTACT ---------- */

#contact {
    background: #f5b400;
    color: #111;
}

#contact > div {
    max-width: 900px;
}

#contact > div > p:first-child {
    font-weight: 800;
    letter-spacing: 2px;
}

#contact > div > p:nth-of-type(2) {
    max-width: 650px;
    margin-bottom: 30px;
}

#contact a {
    display: inline-block;
    background: #111;
    color: white;
    padding: 15px 25px;
    margin-right: 10px;
    border-radius: 4px;
    font-weight: 700;
    transition: 0.3s;
}

#contact a:hover {
    background: white;
    color: #111;
}


/* ---------- FOOTER ---------- */

footer {
    background: #090909;
    color: #999;
    text-align: center;
    padding: 30px;
    font-size: 14px;
}


/* ========================================
   MOBILE RESPONSIVENESS
   ======================================== */

@media (max-width: 900px) {

    nav ul {
        display: none;
    }

    #services > div:last-child {
        grid-template-columns: repeat(2, 1fr);
    }

    #about + section > div:last-child {
        grid-template-columns: repeat(2, 1fr);
    }

    #projects > div:last-child {
        grid-template-columns: repeat(2, 1fr);
    }

}


@media (max-width: 600px) {

    section {
        padding: 75px 6%;
    }

    nav {
        min-height: 70px;
        padding: 0 20px;
    }

    .logo {
        font-size: 16px;
    }

    nav > a:last-child {
        padding: 10px 14px;
        font-size: 13px;
    }

    #home {
        min-height: 90vh;
        padding-top: 120px;
    }

    #home h1 {
        font-size: 48px;
    }

    #home p:not(:first-child) {
        font-size: 16px;
    }

    #services > div:last-child,
    #about + section > div:last-child,
    #projects > div:last-child,
    #projects + section + section > div:last-child {
        grid-template-columns: 1fr;
    }

    #home a {
        width: 100%;
        text-align: center;
        margin-right: 0;
    }

    #contact a {
        display: block;
        text-align: center;
        margin-bottom: 12px;
        margin-right: 0;
    }

}
* ---------- SCROLL ANIMATIONS ---------- */

section.hidden {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

section.visible {
    opacity: 1;
    transform: translateY(0);
}
/* ========================================
   MOBILE NAVIGATION
   ======================================== */

.menu-button {
    display: none;

    background: none;
    border: none;
    color: white;

    font-size: 30px;
    cursor: pointer;
}


/* ---------- MOBILE ---------- */

@media (max-width: 900px) {

    nav {
        position: relative;
    }

    .menu-button {
        display: block;
    }

    .nav-links {
        position: absolute;

        top: 80px;
        left: 0;

        width: 100%;

        display: none;
        flex-direction: column;

        gap: 0;

        background: #111111;

        padding: 10px 0;

        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    }

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

    .nav-links li {
        width: 100%;
        text-align: center;
    }

    .nav-links a {
        display: block;
        padding: 15px;
        width: 100%;
    }

    .nav-links a:hover {
        background: #222222;
    }

    .quote-button {
        display: none;
    }

}