* {
    box-sizing: border-box;
}


body {
    font-family: 'Montserrat', sans-serif;
    background-color: #111;
    color: #d2d2d2;
    scroll-behavior: smooth;
}

div, ul, nav, header, footer, a, li, label, body {
    margin: 0;
    padding: 0;
}

/* ------------- HEADER SECTION ------------- */
.header__wrapper {
    container-type: inline-size;
    container-name: header;
}

header {
    background-image: linear-gradient(to right, rgba(0, 0, 0, 0.8), rgba(0, 0, 0, 0.8)) ,url(../images/courses/bg-courses-header.jpeg);
    background-size: cover;
    width: 100%;
    min-height: 25vh;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
}

header h2 {
    margin: 0;
    padding: 0;
    text-align: center;
}

/* ------------- HEADER QUERIES ------------- */
@container header (min-width: 600px) {
    header {
        min-height: 34vh;
    }
}
/* ------------- HEADER ENDS ------------- */

/* ------------- COURSES SECTION ------------- */
.courses__container {
    container-type: inline-size;
    container-name: courses;
}

.courses__content-grid {
    width: 100%;
    height: auto;
    gap: 10px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto 1fr;
    justify-content: center;
    align-items: top;
    padding: 30px 30px;
}

.courses__content-item img {
    display: block;
    width: 100%;
    min-height: auto;
}

.courses__content-item h3 {
    font-size: 0.8rem;
    margin: 0;
    padding: 0;
    color: #b39e9e;
}

.courses__content-item h2 {
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0;
    margin: 0;
    margin-top: 5px;
    text-wrap: balance;
}

.courses__content-grid hr {
    width: 80%;
    align-items: start;
    justify-content: start;
    border: 1px solid #b39e9e;
    margin: 20px;
}

.courses__content-grid p {
    font-size: 0.8rem;
    font-weight: 500;
    text-wrap: balance;
    line-height: 24px;
}

.courses__content-grid p:last-child {
    font-size: 0.7rem;
}

/* ------------- COURSES QUERIES ------------- */
@container courses (min-width: 600px) {
    .courses__content-grid {
        grid-template-columns: 1fr 1fr;
        grid-template-rows: 1fr;
        min-height: 80vh;
        gap: 20px;
        padding: 60px;
    }
    

    .courses__content-item img {
        width: 74%;
        justify-self: end;
        align-self: end;
    }

    .courses__content-item h3 {
        font-size: 1.2rem;
        margin: 0;
        padding: 0;
        color: #b39e9e;
    }
    
    .courses__content-item h2 {
        font-size: 1.8rem;
        font-weight: 500;
        padding: 0;
        margin: 0;
        margin-top: 5px;
        text-wrap: balance;
    }
    
    .courses__content-grid hr {
        margin: 20px;
    }
    
    .courses__content-grid p {
        font-size: 1.2rem;
        font-weight: 500;
        text-wrap: balance;
        line-height: 32px;
    }

    .courses__content-grid p:last-child {
        font-size: 1rem;
        text-wrap: balance;
        line-height: 32px;
    }
    
}
/* ------------- COURSES ENDS ------------- */

/* ------------- COURSES SECTION 2 ------------- */
.courses__container-2 {
    container-type: inline-size;
    container-name: courses-2;
}

.courses__content {
    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");
    width: 100%;
    min-height: 285vh;
    margin: 0;
    padding: 20px;
}

.courses__grid-2 {
    padding: 5px 20px;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto;
}

.courses__content h3 {
    font-size: 0.9rem;
    text-align: center;
    padding: 0;
    margin: 0;
}

.courses__content h2 {
    font-size: 1.4rem;
    text-align: center;
    padding: 0;
    margin: 0;
    letter-spacing: 5px;
    margin-top: 7px;
}

.courses__grid-item-2 {
    padding: 22px 18px;
    margin-top: 15px;
    background-color: rgba(65, 65, 65, 0.2);
    border-radius: 16px;
    transition: background-color 0.5s;
}

.courses__grid-item-2 a {
    text-align: center;
    justify-content: center;
    align-items: center;
    display: flex;
    flex-grow: 1;
}

.courses__grid-item-2:hover {
    background-color: #d1122e;
}

.btn--grid {
    justify-self: center;
    align-self: center;
    width: 40%;
    border-radius: 16px;
    background-color: #d1122e;
    color: #fff;
    font-size: 0.9rem;
    text-decoration: none;
    padding: 8px 15px;
}

.btn--grid:hover {
    opacity: 0.90;
}

/* ------------- COURSES 2 QUERIES ------------- */
@container courses-2 (min-width: 600px) {
    .courses__content {
        width: 100%;
        min-height: 160vh;
        margin: 0;
        padding: 50px;
    }

    .courses__content h3 {
        font-size: 1.1rem;
        text-align: center;
        padding: 0;
        margin: 0;
    }
    
    .courses__content h2 {
        font-size: 2.4rem;
        text-align: center;
        padding: 0;
        margin: 0;
        letter-spacing: 5px;
        margin-top: 7px;
    }

    .courses__grid-subtitle {
        font-size: 1.6rem;
    }

    .courses__grid-2 {
        padding: 20px 120px;
        grid-template-columns: 0.7fr 0.7fr;
        gap: 50px;
        grid-template-rows: auto;
    }

    .courses__grid-item-2:hover a{
        color: #d1122e;
        background-color: #fff;
    }

    .courses__grid-item-2 h4 {
        font-size: 1.2rem;
        margin: 0;
        margin-bottom: 20px;
        text-align: center;
    }

    .courses__grid-item-2 p {
        font-size: 1rem;
        margin-bottom: 0;
        padding: 0 10px;
    }

    .btn--grid {
        font-weight: bold;
        text-transform: uppercase;
        font-size: 0.9rem;
        padding: 12px 20px;
        width: 50%;
    }    

}
/* ------------- COURSES 2 ENDS ------------- */

/* ------------- SLIDE SECTION ------------- */
.swiper-wrapper {
    container-type: inline-size;
    container-name: slider;
}

.swiper {
    margin: 20px auto 0;
    margin-bottom: 18px;
    width: 235px;
    height: auto;
    border-radius: 16px;
}

.swiper-slide {
    width: 235px !important;
    height: 460px !important; /* altura fija */
    border-radius: 16px !important;
}

.swiper__img {
    height: 100%;
    width: 100%;
    object-fit: fill !important;
}

.swiper-button-next, .swiper-button-prev {
    color: #d1122e !important;
}

.swiper-pagination-bullet-active {
    background-color: #d1122e !important;
}

/* ------------- SLIDE QUERIES ------------- */
@container courses-2 (min-width: 600px) {
    .swiper-slide {
        width: 100% !important;
        height: auto !important; /* altura fija */
        border-radius: 16px !important;
    }

    .swiper {
        width: 75%;
        height: 55vh;
    }
}