* {
    box-sizing: border-box;
}


body {
    font-family: 'Montserrat', sans-serif;
    background-color: #222;
    color: #d2d2d2;
    scroll-behavior: smooth;
}

div, ul, nav, header, footer, a, li, label, body {
    margin: 0;
    padding: 0;
}

/* ------------- MAIN SECTION ------------- */
.main {
    width: 100%;
    min-height: 50vh;
    background-image: linear-gradient(to right, #000, #111c, #2229);
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: start;
    container-type: inline-size;
    container-name: main;
    
}

.main__overlay {
    width: 100%;
    min-height: 50vh;
    position: relative;
}

.main__layer {
    min-height: 50%;
    width: 100%;
    background-color: #0009;
    position: absolute;
    z-index: -1;
}

.main__image-container {
    width: 55%;
    min-height: 50vh;
    background-image: url(../images/index/bg-header.jpeg);
    background-position: left;
    background-size: cover;
    background-repeat: no-repeat;
    object-fit: contain;
    -webkit-mask-image: linear-gradient(to left, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(to left, rgba(0, 0, 0, 1) 70%, rgba(0, 0, 0, 0) 100%);
    position: absolute;
    z-index: -1;
    right: 0;
}

.main__content {
    width: 45%;
    position: absolute;
    z-index: 1;
    left: 15px;
}

.main__content p {
    font-size: 0.72rem;
    text-wrap: pretty;
}

.main__content h2 {
    text-align: center;
}

/* ------------- MAIN QUERIES ------------- */
@container main (min-width: 600px) {
    .main {
        min-height: 95vh;
    }

    .main__overlay {
        width: 100%;
        min-height: 95vh;
    }

    .main__image-container {
        min-height: 95vh;
        width: 45%;
    }

    .main__content {
        
        left: 60px;
    }

    .main__content p {
        font-size: 1.2rem;
        padding: 0 40px;
        line-height: 1.5;
    }

    .main__content h2 {
        font-size: 2.1rem;
    }
}

/* ------------- MAIN ENDS ------------- */

/* ------------- COURSES SECTION ------------- */
.courses__wrapper {
    container-type: inline-size;
    container-name: courses;
}

.courses__container {
    min-height: 50vh;
    width: 100%;
    background-image: url(../images/index/bg-courses.png);
    background-position: center;
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.courses__content {
    width: 100%;
    display: flex;
    flex-direction: row;
}

.courses__text-content {
    width: 50%;
    height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    align-items: center;
}

.courses__text-content h2 {
    font-size: 0.9rem;
    text-wrap: balance;
    padding: 0 10px;
}

.courses__text-content h3 {
    font-size: 0.6rem;
    text-wrap: balance;
    line-height: 15px;
    margin: 0;
}

.courses__text-middle {
    font-weight: 500;
    font-size: 0.1rem;
}

.courses__text-decorate {
    color: transparent;
    -webkit-text-stroke: 1px #d1122e;
}

.courses__img-content {
    width: 50%;
    min-height: 50vh;
    position: relative;
}

.courses__image-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    min-height: 100%;
    background-color: rgb(255, 255, 255);
    clip-path: polygon(15% 0, 100% 0, 100% 100%, 28% 100%, 0 46%, 20% 29%, 0 17%);
    z-index: 0;
}

.courses__img-content img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    clip-path: polygon(29% 0, 100% 0, 100% 100%, 34% 100%, 0% 30%);
}

.btn {
    background-color: #d1122e;
    font-size: 0.6rem;
    font-weight: 600;
    color: #fff;
    width: 50%;
    text-decoration: none;
    border-radius: 16px;
    padding: 10px 10px;
    margin-top: 20px;
    transition: background-color 0.3s, color 0.3s;
    text-transform: uppercase;
}

.btn:hover {
    background-color: #fff;
    color: #d1122e;
}

/* ------------- COURSES QUERIES ------------- */
@container courses (min-width: 600px) {
    .courses__container {
        height: auto;
    }

    .courses__text-content {
        height: auto
    }

    .courses__img-content {
        width: 50%;
        height: 600px;
        max-height: 100%;
        position: relative;
    }

    .courses__img {
        width: 100%;
        height: 100% !important;
    }

    .courses__text-content h2 {
        font-size: 2.6rem;
        text-wrap: balance;
    }

    .courses__text-content h3 {
        font-size: 2.2rem;
        text-wrap: balance;
        line-height: 40px;
        margin: 0;
    }

    #courses__text-middle {
        font-weight: 500;
        font-size: 2rem;
    }

    .btn {
        font-size: 1.3rem;
        width: 30%;
    }
}

/* ------------- COURSES ENDS ------------- */

/* ------------- SERVICES SECTION ------------- */
.services__container {
    min-height: 90vh;
    width: 100%;
    background-color: #111111;
    background-image: url("data:image/svg+xml,%3Csvg width='76' height='18' viewBox='0 0 76 18' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M32 18c-2.43-1.824-4-4.73-4-8 0-4.418-3.582-8-8-8H0V0h20c5.523 0 10 4.477 10 10 0 4.418 3.582 8 8 8h20c4.418 0 8-3.582 8-8 0-5.523 4.477-10 10-10v2c-4.418 0-8 3.582-8 8 0 3.27-1.57 6.176-4 8H32zM64 0c-1.67 1.256-3.748 2-6 2H38c-2.252 0-4.33-.744-6-2h32z' fill='%23222222' fill-opacity='0.4' fill-rule='evenodd'/%3E%3C/svg%3E");
    text-align: center;
    container-type: inline-size;
    container-name: services;
}

.services__content {
    width: 100%;
    min-height: 80vh;
}

.grid {
    display: grid;
    min-height: 50vh;
    width: 100%;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(2, 1fr);
    justify-content: center;
    text-align: center;
    padding: 0px 10px;
    gap: 0;
}

.grid-item {
    background-color: #d1122e;
    border-radius: 16px;
    margin: 10px;
    font-size: 30px;
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.grid-item h3 {
    font-size: 0.8rem;
    margin: 0;
    padding: 0;
    padding: 8px 4px;
    text-wrap: balance;
}

.grid-item p {
    font-size: 0.7rem;
    margin: 0;
    padding: 0;
    padding: 0px 7px;
    text-wrap: pretty;
}

.btn--grid {
    background-color: #fff;
    color: #d1122e;
    font-size: 0.7rem;
    margin-bottom: 20px;
}

.btn--grid:hover {
    opacity: 0.9;
}

.services__overlay {
    width: 100%;
    height: 10vh;
    background-color: #d1122e;
}

.services__content-title {
    font-size: 1.2rem;
}

/* ------------- SERVICES QUERIES ------------- */
@container services (min-width: 600px) {
    .services__content {
        width: 100%;
        min-height: 110vh;
    }
    .services__content-title {
        letter-spacing: 4px;
        font-size: 2rem;
        margin: 0;
        padding: 10px;
        margin-top: 20px;
        margin-bottom: 40px;
    }
    .grid {
        grid-template-columns: repeat(2, auto);
        grid-template-rows: repeat(2, auto);
        width: 100%;
        min-height: 77vh;
        padding: 0px 160px;
        gap: 20px 50px;
    }
    .grid-item h3 {
        font-size: 1.4rem;
        margin-top: 8px;
        margin-bottom: 5px;
    }
    
    .grid-item p {
        font-size: 1rem;
        margin: 0;
        padding: 0 50px;
        text-wrap: pretty;
    }
    .btn--grid {
        font-size: 1rem;
    }
    .services__overlay {
        width: 100%;
        height: 10vh;
        background-color: #d1122e;
    }
}

/* ------------- SERVICES ENDS ------------- */

/* ------------- CATALOG SECTION ------------- */
.catalog__wrapper {
    container-type: inline-size;
    container-name: catalog;
}

.catalog__container {
    width: 100%;
    min-height: 100vh;
    background-image: linear-gradient(to right, rgba(0,0,0,0.8), rgba(0,0,0,0.90)), url(../images/index/bg-catalog.jpeg);
    background-size: cover;
    display: flex;
    flex-direction: column;
    justify-content: top;
    align-items: center;
}

.catalog__img-container {
    padding: 0;
    margin: 0;
    background-image: url(../images/index/catalog-overlay.jpeg);
    background-size: cover;
    background-position: center;
    width: 30%;
    height: 30vh;
    clip-path: circle(30% at 50% 50%);
}

.catalog__content-container {
    width: 90%;
    min-height: 60vh;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: 40px repeat(2, 130px);
    gap: 5px 30px;
    grid-template-areas: 
    "title title"
    "li li2"
    "li3 li4";
}

.catalog__grid-item {
    border-radius: 16px;
}

.catalog__content-title {
    grid-area: title;
    padding: 0;
    margin: 0;
    text-align: center;
    font-size: 1.2rem;
}

.catalog__grid-item:first-child  {
    grid-area: li;
}

.catalog__grid-item:nth-child(2) {
    grid-area: li2;
}

.catalog__grid-item:nth-child(3) {
    grid-area: li3;
}

.catalog__grid-item:last-child {
    grid-area: li4;
}

.catalog__grid-item p {
    margin: 0;
    padding: 2px;
    margin-top: 7px;
    font-size: 0.6rem;
    text-wrap: pretty;
}

.catalog__grid-icon {
    background-color: #d1122e;
    border-radius: 8px;
    background-size: cover;
    width: 28%;
    min-height: 6vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.catalog__grid-icon img {
    width: 90%;
    min-height: 5vh;
}

/* ------------- CATALOG QUERIES ------------- */
@container catalog (min-width: 600px) {
    .catalog__container {
        flex-direction: row;
    }

    .catalog__content-container {
        gap: 50px;
        padding: 10px;
    }

    .catalog__img-container {
        width: 100%;
        height: 100vh;
        clip-path: circle(30% at 50% 50%);
    }

    .catalog__content-title {
        text-align: center;
        font-size: 2rem;
    }

    .catalog__grid-icon {
        width: 19%;
        min-height: 7vh;
    }

    .catalog__grid-icon img {
        width: 75%;
        min-height: 1vh;
    }

    .catalog__grid-item p {
        padding: 2px;
        margin-top: 7px;
        font-size: 1.1rem;
    }
}
/* ------------- CATALOG ENDS ------------- */