body {
    color: white;
    background-color: black;
}

p {
    font-family: "Rockwell", sans-serif;
    font-weight: 600;
    font-size: 24px;
}

.ems-container {
    display: flex;
    justify-content: center;
}

.ems-heading {
    font-size: 78px;
    font-family: "Rockwell", serif;
    font-weight: bold;
    font-style: italic;
    margin: 0;
    word-spacing: 2px;
    letter-spacing: 1px;
}

.ems-heading1 {
    font-size: 80px;
    font-family: "Rockwell", serif;
    font-weight: bold;
    font-style: italic;
    margin: 0;
    word-spacing: 2px;
    letter-spacing: 1px;
}

.ems-logo-container {
    display: flex;
    justify-content: center;
    margin-top: 15px;
    margin-left: 15px;
}

.ems-heading-container {
    text-align: center;
}

.ems-text-container {
    margin-top: 82px;
    margin-left: 15px;
    letter-spacing: 2px;
}

.energy-container {
    display: flex;
    margin-top: 50px;
    justify-content: center;
    margin-left: 2px;
}

.energy-icon {
    background-color: white;
    clip-path: polygon(0 0, 100% 0, 90% 100%, 0 100%);
    width: 410px;
    height: 132px;
    display: flex;
    flex-direction: row;
    margin-right: 117px;
}

.ems-half-sun {
    margin-left: 45px;
    margin-top: 26px;
}

.energy-box-text {
    display: flex;
    flex-direction: column;
    padding: 27px;
    margin-top: 2px;
}

.energy-box-heading {
    color: #E32021;
    font-size: 30px;
    font-family: "Rockwell", serif;
    font-weight: 600;
    position: relative;
    bottom: 3px;
}

.energy-box-info {
    color: black;
    font-size: 42px;
    font-family: "Rockwell", serif;
    font-weight: 600;
    position: relative;
    top: -41px;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

.energy-text {
    margin-right: 24px;
    position: relative;
    right: 95px;
    width: 615px;
    display: flex;
    flex-direction: column;
}

.energy-line {
    width: 39rem;
    height: 3px;
    background-color: #1a1a1a;
    margin-top: 50px;
    position: relative;
    right: 15px;
}

.energy-subheading {
    position: relative;
    top: 52px;
    font: 500 25px "Sarabun", sans-serif;
    margin-bottom: 3px;
}

.ems-icons {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    margin-top: 58px;
}

.ems-icon {
    background: #E32021;
    width: 275px;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 205px;
    margin-left: -25px;
    margin-right: -29px;
    clip-path: polygon(22% 0, 100% 0, 78% 100%, 0 100%);
}

.ems-icon-factory {
    background: #E32021;
    width: 275px;
    display: flex;
    align-items: center;
    height: 205px;
    margin-left: -5px;
    margin-right: -20px;
    clip-path: polygon(22% 0, 100% 0, 78% 100%, 0 100%);
}

.ems-block-red {
    background-color: #C9C9C9;
    height: 16px;
    width: 21px;
    clip-path: polygon(25% 0, 100% 0, 75% 100%, 0 100%);
    margin: 0 7px;
    animation: stepglow 2s steps(4) infinite;
}

.ems-blocks .ems-block-red:nth-child(1) { animation-delay: 0s; }
.ems-blocks .ems-block-red:nth-child(2) { animation-delay: 0.5s; }
.ems-blocks .ems-block-red:nth-child(3) { animation-delay: 1s; }
.ems-blocks .ems-block-red:nth-child(4) { animation-delay: 1.5s; }

.ems-block-wrapper.reverse .ems-block-red:nth-child(1) { animation-delay: 1.5s; }
.ems-block-wrapper.reverse .ems-block-red:nth-child(2) { animation-delay: 1s; }
.ems-block-wrapper.reverse .ems-block-red:nth-child(3) { animation-delay: 0.5s; }
.ems-block-wrapper.reverse .ems-block-red:nth-child(4) { animation-delay: 0s; }

@keyframes stepglow {
    0%, 24.99% { background-color: #E32021; }
    25%, 100% { background-color: #C9C9C9; }
}

.ems-block-gray {
    background-color: #C9C9C9;
    height: 16px;
    width: 21px;
    clip-path: polygon(25% 0, 100% 0, 75% 100%, 0 100%);
    margin: 0 7px 0 7px;
}

.ems-block-wrapper {
    display: flex;
    flex-direction: column;
    margin-top: 55px;
}

.ems-blocks {
    display: flex;
    flex-direction: row;
    margin-top: 9px;
}

.blocks-text-wrapper {
    justify-content: center;
    position: relative;
    top: 25px;
    left: 10px;
}

.ems-blocks-text {
    font-size: 21px;
    position: relative;
    bottom: 9px;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.b {
    margin: 15px 55% 0 45%;
    width: 200px;
    font-size: 26px;
    animation: fadeIn 1s ease forwards;
    animation-delay: 0.6s;
    opacity: 0;
}

@media (max-width: 1340px) {
    .energy-container {
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }
    .energy-text {
        margin-right: 0;
        position: unset;
    }
    .energy-icon {
        margin-right: 0;
        width: 50%;
        justify-content: center;
        padding-right: 40px;
    }
}

@media (max-width: 1100px) {

    .factory-icon {
        position: relative;
        right: 18px;
    }
    .energy-text {
        margin-bottom: 40px;
    }
    .ems-blocks {
        margin-right: 7px;
        margin-left: 7px;
    }
    .ems-icons {
        margin-top: 0;
    }

    .ems-block-wrapper {
        margin: 55px 0 0 0;
    }
}

@media (max-width: 950px) {
    .ems-icons {
        flex-direction: column;
    }
    .ems-icon, .ems-icon-factory {
        width: 330px;
        height: 222px;
        margin-left: 0;
        margin-right: 0;
        clip-path: polygon(15% 0, 100% 0, 85% 100%, 0 100%);
    }
    .ems-block-wrapper {
        flex-direction: row;
        margin: 10px 0 10px 0;
    }
    .ems-blocks-text {
        top: 7px;
    }
    .ems-icon-factory {
        display: flex;
        justify-content: center;
    }
    .ems-block-gray, .ems-block-red {
        width: 19px;
        height: 14px;
    }
    .ems-heading {
        font-size: 70px;
        margin-right: 15px;
    }
    .ems-blocks {
        gap: 12px;
        flex-direction: column;
        margin-left: 40px;
        margin-top: 0;
    }
}

@media (max-width: 850px) {
    .energy-line {
        width: 600px;
    }
}

@media (max-width: 750px) {
    .energy-icon {
        width: 70%;
    }
}

@media (max-width: 610px) {
    .ems-text-container {
        margin-top: 50px;
    }
    .ems-heading {
        font-size: 35px;
        margin-right: 0;
    }
    .energy-text {
        width: 90%;
        font: 500 22px "Sarabun", sans-serif;
        margin-left: 25px;
    }
    .ems-icon, .ems-icon-factory {
        width: 176px;
        height: 131px;
    }
    .energy-line {
        width: 90%;
        margin-left: 18px;
    }
    .b {
        margin: 0 0 0 33%;
    }
    .ems-icon-svg, .factory-icon {
        transform: scale(0.7);
        margin-right: 20px;
    }
}

@media (max-width: 550px) {
    .energy-icon {
        width: 85%;
    }
}

@media (max-width: 450px) {
    .energy-icon {
        width: 85%;
        height: 100px;
    }

    .ems-half-sun {
        margin-left: 10px;
        padding-bottom: 20px;
    }

    .energy-box-heading {
        font-size: 25px;
        margin-top: 10px;
    }

    .energy-box-info {
        font-size: 37px;
    }

    .energy-box-text {
        padding: 8px 20px 20px 20px;
    }

    .energy-container {
        margin-top: 40px;
    }

    .energy-subheading {
        font-size: 20px;
    }
}