/* ================= TEM Homepage Hero ================= */

.tem-hero {
    position: relative;
    min-height: calc(100vh - 86px);
    display: flex;
    align-items: center;
    overflow: hidden;
    background: #07182f;
}

.tem-hero__media {
    position: absolute;
    inset: 0;
    z-index: 1;
}

.tem-hero__media picture,
.tem-hero__media img {
    width: 100%;
    height: 100%;
    display: block;
}

.tem-hero__media img {
    object-fit: cover;
    object-position: center;
    transform: scale(1.02);
}

.tem-hero__overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        linear-gradient(90deg, rgba(3, 18, 41, 0.94) 0%, rgba(3, 18, 41, 0.78) 42%, rgba(68, 0, 103, 0.42) 100%),
        radial-gradient(circle at 18% 24%, rgba(255, 255, 255, 0.15), transparent 28%),
        linear-gradient(180deg, rgba(0, 0, 0, 0.12), rgba(0, 0, 0, 0.38));
}

.tem-hero .container {
    position: relative;
    z-index: 3;
}

.tem-hero__content {
    max-width: 820px;
    padding: 110px 0 95px;
}

.tem-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    margin-bottom: 22px;
    padding: 9px 15px;
    color: #ffffff;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.22);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    backdrop-filter: blur(10px);
}

.tem-hero__content h1 {
    max-width: 780px;
    margin: 0;
    color: #ffffff;
    font-size: clamp(44px, 6vw, 78px);
    font-weight: 900;
    line-height: 0.98;
    letter-spacing: -0.045em;
}

.tem-hero__content p {
    max-width: 660px;
    margin: 24px 0 0;
    color: rgba(255, 255, 255, 0.84);
    font-size: 18px;
    line-height: 1.75;
}

.tem-hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 34px;
}

.tem-hero__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 52px;
    padding: 14px 24px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 900;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, color 0.25s ease;
}

.tem-hero__btn--primary {
    color: #ffffff;
    background: linear-gradient(135deg, #5f068c, #7b1faf);
    box-shadow: 0 18px 42px rgba(95, 6, 140, 0.36);
}

.tem-hero__btn--primary:hover {
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 24px 54px rgba(95, 6, 140, 0.46);
}

.tem-hero__btn--secondary {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.13);
    border: 1px solid rgba(255, 255, 255, 0.26);
    backdrop-filter: blur(10px);
}

.tem-hero__btn--secondary:hover {
    color: #440067;
    background: #ffffff;
    transform: translateY(-2px);
}

.tem-hero__stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    max-width: 680px;
    margin-top: 44px;
}

.tem-hero__stats div {
    padding: 18px 18px;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 18px;
    backdrop-filter: blur(12px);
}

.tem-hero__stats strong {
    display: block;
    margin-bottom: 4px;
    color: #ffffff;
    font-size: 28px;
    font-weight: 900;
    line-height: 1;
}

.tem-hero__stats span {
    display: block;
    color: rgba(255, 255, 255, 0.76);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.35;
}

/* Tablet */
@media (max-width: 991px) {
    .tem-hero {
        min-height: auto;
    }

    .tem-hero__content {
        padding: 90px 0 80px;
    }

    .tem-hero__content h1 {
        font-size: clamp(40px, 8vw, 62px);
    }

    .tem-hero__stats {
        grid-template-columns: 1fr;
        max-width: 420px;
    }
}

/* Mobile */
@media (max-width: 767px) {
    .tem-hero {
        min-height: 590px;
        align-items: flex-end;
    }

    .tem-hero__media img {
        object-position: center;
    }

    .tem-hero__overlay {
        background:
            linear-gradient(180deg, rgba(3, 18, 41, 0.28) 0%, rgba(3, 18, 41, 0.84) 48%, rgba(3, 18, 41, 0.96) 100%),
            linear-gradient(90deg, rgba(68, 0, 103, 0.32), rgba(0, 48, 110, 0.28));
    }

    .tem-hero__content {
        padding: 170px 0 46px;
    }

    .tem-hero__eyebrow {
        margin-bottom: 16px;
        padding: 8px 12px;
        font-size: 11px;
        letter-spacing: 0.06em;
    }

    .tem-hero__content h1 {
        font-size: 38px;
        line-height: 1.04;
        letter-spacing: -0.035em;
    }

    .tem-hero__content p {
        margin-top: 18px;
        font-size: 15.5px;
        line-height: 1.65;
    }

    .tem-hero__actions {
        gap: 10px;
        margin-top: 26px;
    }

    .tem-hero__btn {
        width: 100%;
        min-height: 50px;
        padding: 13px 18px;
    }

    .tem-hero__stats {
        gap: 10px;
        margin-top: 28px;
    }

    .tem-hero__stats div {
        padding: 14px 16px;
        border-radius: 16px;
    }

    .tem-hero__stats strong {
        font-size: 24px;
    }

    .tem-hero__stats span {
        font-size: 12.5px;
    }
}


/* ================= TEM Homepage Courses ================= */

.tem-courses {
    position: relative;
    padding: 110px 0 120px;
    background:
        radial-gradient(circle at top left, rgba(95, 6, 140, 0.08), transparent 30%),
        linear-gradient(180deg, #ffffff 0%, #f5f7fb 100%);
    overflow: hidden;
}

.tem-courses::before {
    content: "";
    position: absolute;
    top: 80px;
    right: -160px;
    width: 360px;
    height: 360px;
    background: rgba(95, 6, 140, 0.07);
    border-radius: 50%;
}

.tem-courses .container {
    position: relative;
    z-index: 2;
}

.tem-courses__head {
    max-width: 780px;
    margin: 0 auto 34px;
    text-align: center;
}

.tem-courses__eyebrow {
    display: inline-flex;
    margin-bottom: 14px;
    padding: 8px 14px;
    color: #440067;
    background: rgba(68, 0, 103, 0.08);
    border: 1px solid rgba(68, 0, 103, 0.12);
    border-radius: 999px;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.tem-courses__head h2 {
    margin: 0;
    color: #061c38;
    font-size: clamp(36px, 4.5vw, 58px);
    font-weight: 950;
    line-height: 1.05;
    letter-spacing: -0.035em;
}

.tem-courses__head p {
    max-width: 680px;
    margin: 18px auto 0;
    color: #5d6978;
    font-size: 17px;
    line-height: 1.75;
}

.tem-courses__filters {
    max-width: 1040px;
    margin: 0 auto 54px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.tem-courses__filters button {
    min-height: 46px;
    padding: 12px 18px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 999px;
    color: #243449;
    background: rgba(255, 255, 255, 0.88);
    font-size: 14px;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease, color 0.22s ease, border-color 0.22s ease;
}

.tem-courses__filters button:hover,
.tem-courses__filters button.active {
    color: #ffffff;
    background: linear-gradient(135deg, #440067, #7516a8);
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 16px 34px rgba(68, 0, 103, 0.22);
}

.tem-courses__grid {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 28px !important;
    align-items: stretch;
    height: auto !important;
    position: static !important;
}

.tem-courses__grid::before,
.tem-courses__grid::after {
    display: none !important;
    content: none !important;
}

.tem-courses__grid .single-studies {
    width: auto !important;
    max-width: none !important;
    min-width: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    float: none !important;
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;
    display: block !important;
}

.tem-courses__grid .single-studies.is-hidden {
    display: none !important;
}

.tem-course-card {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 26px;
    box-shadow: 0 18px 45px rgba(15, 23, 42, 0.08);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.tem-course-card:hover {
    transform: translateY(-7px);
    border-color: rgba(68, 0, 103, 0.18);
    box-shadow: 0 30px 80px rgba(15, 23, 42, 0.14);
}

.tem-course-card__image {
    position: relative;
    height: 230px;
    display: block;
    overflow: hidden;
    background: #e8ecf4;
}

.tem-course-card__image::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(0, 0, 0, 0.05), rgba(3, 18, 41, 0.42)),
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.2), transparent 30%);
    z-index: 1;
}

.tem-course-card__image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transform: scale(1.02);
    transition: transform 0.45s ease, filter 0.45s ease;
}

.tem-course-card:hover .tem-course-card__image img {
    transform: scale(1.08);
    filter: saturate(1.05);
}

.tem-course-card__image span {
    position: absolute;
    top: 16px;
    right: 16px;
    z-index: 2;
    display: inline-flex;
    padding: 8px 12px;
    color: #ffffff;
    background: rgba(68, 0, 103, 0.9);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 900;
    line-height: 1;
    box-shadow: 0 12px 26px rgba(0, 0, 0, 0.18);
}

.tem-course-card__body {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding: 26px;
}

.tem-course-card__body h3 {
    margin: 0 0 12px;
    color: #061c38;
    font-size: 21px;
    font-weight: 900;
    line-height: 1.25;
}

.tem-course-card__body h3 a {
    color: inherit;
}

.tem-course-card__body h3 a:hover {
    color: #440067;
}

.tem-course-card__body p {
    margin: 0 0 22px;
    color: #5f6b7a;
    font-size: 15px;
    line-height: 1.65;
}

.tem-course-card__link {
    margin-top: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #440067;
    font-size: 15px;
    font-weight: 900;
}

.tem-course-card__link span {
    transition: transform 0.22s ease;
}

.tem-course-card__link:hover span {
    transform: translateX(4px);
}

@media (max-width: 1199px) {
    .tem-courses__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 767px) {
    .tem-courses__grid {
        grid-template-columns: 1fr !important;
        gap: 22px !important;
    }
}

@media (max-width: 767px) {
    .tem-courses {
        padding: 76px 0 86px;
    }

    .tem-courses__head {
        margin-bottom: 28px;
        text-align: left;
    }

    .tem-courses__head h2 {
        font-size: 38px;
        line-height: 1.05;
    }

    .tem-courses__head p {
        margin-top: 14px;
        font-size: 15.5px;
    }

    .tem-courses__filters {
        justify-content: flex-start;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 10px;
        margin: 0 -15px 36px;
        padding: 0 15px 8px;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .tem-courses__filters::-webkit-scrollbar {
        height: 0;
    }

    .tem-courses__filters button {
        flex: 0 0 auto;
        min-height: 42px;
        padding: 11px 15px;
        font-size: 13.5px;
        scroll-snap-align: start;
    }

    .tem-courses__grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }

    .tem-course-card {
        border-radius: 22px;
    }

    .tem-course-card__image {
        height: 220px;
    }

    .tem-course-card__body {
        padding: 22px;
    }

    .tem-course-card__body h3 {
        font-size: 20px;
    }
}