*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    width: 100%;
}

article li {
    margin: 5px 0;
}

.hero {
    z-index: 900;
    align-content: center;
    height: 100vh;
    background-image: url("images/homepage_1.png");
    background-repeat: no-repeat;
    background-position: center;
    background-size: cover;
    border-bottom-right-radius: 7px;
    border-bottom-left-radius: 7px;
    animation: Hero-Img 20s infinite ease-in-out;
}

.hero-container {
    width: 60%;
    height: 40%;
    padding-left: 5rem;
}

.hero-container h2 {
    color: antiquewhite;
    font-size: 4.5rem;
    margin-bottom: 15px;
    animation: fadeUp 1.6s ease;
}

.hero-container h2 span {
    text-decoration: underline;
}

.hero-quote-link {
    width: 160px;
    height: 50px;
    background-color: rgba(240, 248, 255, 0);
    border: antiquewhite 2px solid;
    border-radius: 5px;
    animation: fadeUp 1.6s ease;
}

.hero-quote-link:hover {
    background-color: rgb(247, 148, 29);
    transform: translateY(-2px);
}

.hero-container a {
    color: antiquewhite;
    font-size: 1.5rem;
    font-weight: bold;
    padding: 5px 10px;
}

.hero-container a:hover {
    background-color: rgb(247, 148, 29);
    text-decoration: underline;
    border: none;
}

.services,
.about {
    width: 99.5%;
    margin-top: 40px;
    border-top: rgba(128, 128, 128, 0.4) 2px solid;
    border-radius: 15px;
    justify-self: center;
    justify-items: center;
    animation: fadeUp 1s ease;
}

.services-container,
.about-container {
    width: 95%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 15px 0;
    justify-self: center;
}

h3 {
    text-align: center;
    font-size: 2.5rem;
    color: rgb(46, 93, 159);
    margin-bottom: 15px;
}

.services-paragraph,
.about-paragraph {
    text-align: center;
    font-size: 1.5rem;
    color: rgb(46, 93, 159);
    line-height: 1.6;
    padding: 20px;
    transition: all 0.3s ease;
}

.services-container-elements {
    width: 97%;
    display: flex;
    justify-content: space-between;
    justify-self: center;
}

.electrical,
.solarsystems,
.civilengineering,
.mechanical {
    width: 23%;
    background-color: white;
    border: rgba(128, 128, 128, 0.4) 2px solid;
    border-radius: 10px;
    padding: 10px 30px;
    min-height: 300px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.electrical:hover,
.solarsystems:hover,
.civilengineering:hover,
.mechanical:hover {
    transform: scale(1.05);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
}

.services-icon {
    display: block;
    margin: 0 auto;
}

h4 {
    font-size: 1.5rem;
    text-align: center;
    margin-bottom: 5px;
}

.about-paragraph {
    font-size: 1rem !important;
}

.about-container-elements {
    display: flex;
    width: 95%;
    height: 350px;
    justify-self: center;
    align-self: center;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    border-radius: 10px;
    background-image: url("images/about_us_1.png");
    background-size: cover;
    background-position: center;
    border: seagreen 2px solid;
    color: white;
    animation: AboutBgFade 12s ease-in-out infinite;
}

.about-list {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.6rem;
    list-style-position: inside;
    width: 100%;
    max-width: 700px;
}

.about-list li {
    color: white;
    font-size: 1.1rem;
    line-height: 1.6;
}

@keyframes AboutBgFade {
    0%, 24% {
        background-image: url("images/about_us_1.png");
    }
    25%, 49% {
        background-image: url("images/about_us_2.png");
    }
    50%, 74% {
        background-image: url("images/about_us_3.png");
    }
    75%, 100% {
        background-image: url("images/about_us_4.png");
    }
}

@keyframes Hero-Img {
    0%,
    25% {
        background-image: url("images/homepage_1.png");
    }
    26%,
    50% {
        background-image: url("images/homepage_2.png");
    }
    51%,
    75% {
        background-image: url("images/homepage_3.png");
    }
    76%,
    100% {
        background-image: url("images/homepage_4.png");
    }
}

@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Tablets */

@media (max-width: 1024px) {
    .hero-container {
        width: 80%;
        padding-left: 2rem;
    }
    .hero-container h2 {
        font-size: 3rem;
    }
    .services-container-elements {
        flex-wrap: wrap;
        gap: 20px;
    }
    .electrical,
    .solarsystems,
    .civilengineering,
    .mechanical {
        width: 45%;
    }
    .about-container-elements {
        flex-direction: column;
        width: 100%;
        text-align: center;
    }
}


/* Mobile */

@media (max-width: 768px) {
    .hero {
        height: auto;
        padding: 100px 0 60px;
    }
    .hero-container {
        width: 95%;
        padding-left: 1rem;
    }
    .hero-container h2 {
        font-size: 2rem;
        margin-bottom: 30px;
    }
    .services-container-elements {
        flex-direction: column;
    }
    .electrical,
    .solarsystems,
    .civilengineering,
    .mechanical {
        width: 90%;
        margin: 0 auto;
    }
    h3 {
        font-size: 2rem;
    }
    .about-container-elements {
        flex-direction: column;
    }
    .about-images {
        width: 100%;
        height: 150px;
        margin-bottom: 10px;
    }
}