* {
    transition: all 1s ease-in-out;
}

body {
    font-family: 'Ranade-Regular', sans-serif;
    src: url('../fonts/Ranade-Regular.woff2') format('woff2'),
        url('../fonts/Ranade-Regular.woff') format('woff'),
        url('../fonts/Ranade-Regular.ttf') format('truetype');
    font-style: normal;
    font-display: swap;
    font-weight: 400;

    margin: 0;
    padding: 0;

    container: body / inline-size;

    /* titles */
    h1 {
        font-size: 68.66px;
        font-weight: bold;
        letter-spacing: -2%;
        line-height: 100%;
    }

    /* subtitles in none hero sections */
    h2 {
        font-size: 54.93px;
        font-weight: 600;
        letter-spacing: -1.5%;
        line-height: 110%;
    }

    h3 {
        font-size: 43.95px;
        font-weight: 500;
        letter-spacing: -1%;
        line-height: 120%;
    }

    h4 {
        font-size: 35.16px;
        font-weight: 400;
        letter-spacing: -0.5%;
        line-height: 130%;
    }

    h5 {
        font-size: 28.13px;
        font-weight: 400;
        letter-spacing: 0%;
        line-height: 140%;
    }

    h6 {
        font-size: 22.5px;
        font-weight: 400;
        letter-spacing: 1%;
        line-height: 150%;

        color: var(--main-text-color);
        opacity: 66%;
    }

    p {
        font-size: 18px;
        font-weight: normal;
        letter-spacing: 0%;
        line-height: normal;

        color: var(--main-text-color);
        opacity: 66%;
    }

    .small {
        font-size: 14.4px;
        font-weight: normal;
        letter-spacing: 2%;
        line-height: 160%;
    }
    
    img {
        width: 100%;
    }

    label {
        color: var(--label-text-color);
        font-weight: 500;
    }

    input, textarea {
        width: 100%;

        color: black;
        border-radius: 12px;
        background-color: var(--input-bg-color);
        border: none;
        outline: none;

        padding: 0.6rem;
        margin-top: 0.5rem;

        &::placeholder {
            color: var(--placeholder-text-color);
        }
    }

    textarea {
        overflow-y: auto;
        resize: none;
    }

    h1, h2 {
        span {
            color: var(--fourth-color);
        }
    }

    button, .see-more-btn {
        color: white;
        font-size: 17px;
        background-color: var(--third-color);
        border: none;
        border-radius: 12px;

        margin-top: 1rem;
        padding: 0.8rem;
        width: 100%;
        box-shadow: 0 4px 4px 0px var(--box-shaow-50);

        
        &:hover {
            cursor: pointer;
            background-color: var(--third-hover-color);
            box-shadow: none;
        }
    }

    a {
        text-decoration: none;
        padding: 0.5rem;
        color: var(--main-text-color);
        font-size: 18px;
        
        &:visited {
            text-decoration: none;
        }

        &:hover {
            color: var(--third-color);
            transition: 0.5s ease-in-out;
        }
    }

    li {
        list-style: none;
    }

    /* black shadow bg */
    .menu-overlay{
        display: none;

        &.open {
            background-color: var(--bg-shadow);
            position: absolute;
            z-index: 2;
            inset: 0;

            width: 100%;
            height: 100vh;
            overflow: hidden;
            display: revert;
        }
    }

    /* navigation bar */
    .nav-bar {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding-top: 2rem;

        /* full screen navigation links */
        .nav-links {
            a {
                &:last-child {
                    border: 0.5rem solid var(--third-color);
                    color: var(--third-color);
                    transition: 0.2s ease-in-out;

                    &:hover {
                        border: 0.2rem solid var(--third-color);
                        border-radius: 1rem;
                        padding: 0.5rem;
                        margin-left: 0.7rem;
                    }
                }
            }

            @media (width <= 600px) {
                display: none;
            }
        }

        .menu-btn {
            cursor: pointer;

            @media (width <= 600px) {
                display: revert;
            }
        }
    }

    .logo {
        max-height: 75px;
        max-width: 85px;
    }
    
    .menu-btn, .menu-nav {
        display: none;
    }
    
    /* Menu side bar */
    .menu-nav {
        background-color: var(--main-bg-color);
        z-index: 10;

        position: absolute;
        right: 0;
        width: 250px;
        height: 100vh;
        
        flex-direction: column;
        gap: 1rem;
        padding: 2rem;

        &.menu-open {
            display: flex;
            
            .menu-close-btn {
                cursor: pointer;
                margin-left: auto;
                margin-bottom: 2rem;
            }
        }
    }

    .menu-nav, .menu-overlay, .menu-btn {
        @media (width >= 600px) {
            display: none !important;
        }
    }

    header { 
        height: 100vh;

        nav {
            height: 10%;
        }

        .hero-section {
            .hero-text {                
                h1 {
                    @container (width <= 600px) {
                        font-size: 50px;
                    }
                    
                    @container (width <= 400px) {
                        font-size: 40px;
                    }
                }

                h6 {
                    @container (width <= 600px) {
                        font-size: 18px;
                    }
                }
            }
        }
    }

    header, .wwd-contact-us {
        padding-right: 4rem;
        padding-left: 4rem;

        @container body (width <= 600px) {
            padding-right: 2rem;
            padding-left: 2rem;
        }
    }

    main {
        container: main / inline-size;
        
        .contact-form, .card {
            border: 0.5px solid var(--border-line);
        }

        /* WWD + Contact Us */
        .wwd-contact-us {
            display: grid;
            grid-template-columns: 1fr 1fr;
            align-items: center;
            gap: 2rem;

            container: wwd / inline-size;

            @container main (width <= 800px) {
                grid-template-columns: 1fr;
            }

            .contact-form {
                width: 100%;
                max-width: 431px;
                padding: 1rem;
                margin: auto;

                border-radius: 12px;
                box-shadow: 0 16px 32px -18px var(--box-shaow-40);

                container: contact-form / inline-size;

                @container wwd (width <= 800px) {
                    order: 2;
                    padding: 0.5rem;
                }

                div {
                    text-align: center;

                    h2 {
                        font-size: 28.15px;
                        margin-bottom: 0;
                    }

                    p {
                        margin-top: 0;
                    }
                }

                form {
                    margin: 2rem 4rem;

                    @container contact-form (width <= 400px) {
                        margin: 2rem;
                    }

                    span {
                        input, textarea {
                            margin-bottom: 1rem;
                        }

                        span {
                            .lucide {
                                color: var(--third-color);
                            }
                        }
                    }
                }
            }

            .text {
                margin: 3rem;
                container: text / inline-size;

                h2 {
                    margin-bottom: 1.5rem;

                    @container text (width <= 400px) {
                        font-size: 40px;
                    }
                }

                p {
                    margin-bottom: 2rem;
                    margin-top: 0;

                    @container text (width <= 400px) {
                        font-size: 17px;
                    }
                }

                a {
                    &:hover {
                        color: var(--secondary-text-color);
                    }
                }

                @container wwd (width <= 800px) {
                    order: 1;
                    margin: 1rem;
                }
            }
        }

        /* What They Say About Us */
        .testimonials {
            padding: 5rem;

            background: var(--testimonials-bg-gradient);

            container: testimonials / inline-size;

            @container body (width <= 600px) {
                padding: 8rem 2rem;
            }

            h3 {
                text-align: center;
                font-weight: bold;

                span {
                    color: var(--fourth-color);
                }

                @container testimonials (width <= 400px) {
                    font-size: 32px;
                }
            }

            .cards {
                display: grid;
                grid-template-columns: 1fr 1fr 1fr;
                align-items: center;
                justify-content: center;
                margin-top: 5rem;

                @container testimonials (width <= 800px) {
                    grid-template-columns: 1fr;
                    gap: 2rem;
                }

                .card {
                    width: 200px;
                    height: 200px;
                    padding: 1rem 2rem;

                    display: flex;
                    flex-direction: column;
                    justify-content: space-between;

                    background-color: var(--main-bg-color);
                    border-radius: 8px;
                    box-shadow: 0 4px 4px 0px var(--box-shaow-50);

                    margin: auto;

                    .client-name, .date{
                        text-align: right;
                        margin: 0;
                    }

                    &:nth-child(2) {
                        h6 {
                            margin-bottom: 0;
                        }
                    }
                }
            }
        }

        /* Our services */
        .our-services {
            background:
                linear-gradient(white, transparent 50%),
                linear-gradient(to top, white, transparent 50%),
                url('../../public/images/what-we-do/outside-paving.jpg')
                no-repeat
                center;
            background-size: cover;
            padding: 5rem 3rem;

            container: our-services / inline-size;

            h2 {
                text-align: center;
                margin-bottom: 4rem;

                @container our-services (width <= 400px) {
                    font-size: 40px;
                }

                span {
                    color: var(--fourth-color);
                }
            }

            .services {
                display: grid;
                grid-template-columns: repeat(4, 1fr);
                row-gap: 3rem;

                @container our-services (width <= 1090px) {
                    grid-template-columns: repeat(2, 1fr);
                }
                
                @container our-services (width <= 560px) {
                    grid-template-columns: 1fr;
                    row-gap: 2rem;
                }

                .service {
                    width: 262px;
                    height: 326px;
                    background-color: var(--main-bg-color);
                    text-align: center;
                    border-radius: 12px;
                    margin: auto;
                    display: flex;
                    flex-direction: column;
                    justify-content: center;
                    align-items: center;
                    box-shadow: 0 4px 4px 0px var(--box-shaow-50);

                    container: service / inline-size;

                    img {
                        width: 234px;
                        height: 234px;
                        border-radius: 8px;

                        @container our-services (width <= 560px) {
                            width: 60px;
                            height: 60px;
                        }
                    }

                    @container our-services (width <= 560px) {
                        flex-direction: row;
                        justify-content: space-evenly;
                        width: 240px;
                        height: 80px;
                    }
                }
            }
        }
    }

    /* Footer */
    footer {
        .guide {
            display: flex;
            gap: 10rem;
            justify-content: center;
            padding: 6rem 4rem;
            border-top: 1px solid var(--border-line);

            .logo {
                max-width: 150px;
                max-height: 100px
            }

            div {
                h5 {
                    margin: 0;
                    margin-bottom: 1rem;
                }

                ul {
                    padding: 0;
                    margin: 0;

                    li {
                        padding-bottom: 1rem;
                        display: flex;
                        gap: 1rem;
                        color: var(--main-text-color);
                        opacity: 66%;

                        a {
                            padding: 0;
                        }

                        .facebook-icon {
                            width: unset;
                        }
                    }
                }

                &:first-child {
                    div {
                        margin-top: 2rem;

                        p {
                            margin: 0.5rem;
                        }
                    }
                }
            }

            @container body (width <= 860px) {
                flex-direction: column;
                gap: 5rem;
            }
        }

        .copyright {
            margin: 1rem;
            text-align: center;
            border-top: 1px solid var(--border-line);

            p {
                font-size: 16px;
            }
        }
    }
}