/* MH Courses Widget Styles - Glassmorphism Design */

/* === GRID LAYOUT === */
.mh-courses-grid {
    display: grid;
    gap: 16px;
    width: 100%;
}

.mh-courses-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

.mh-courses-grid.cols-3 {
    grid-template-columns: repeat(3, 1fr);
}

.mh-courses-grid.cols-4 {
    grid-template-columns: repeat(4, 1fr);
}

/* === CAROUSEL LAYOUT === */
.mh-courses-carousel-wrapper {
    width: 100%;
    position: relative;
    overflow: visible;
    padding-top: 56px;
    padding-left: 8px;
    padding-right: 8px;
    background: transparent;
}

.mh-courses-carousel-wrapper .swiper {
    width: 100%;
    overflow: hidden;
    padding: 8px 0 24px;
}

.mh-courses-carousel-wrapper .swiper-slide {
    height: auto;
    box-sizing: border-box;
}

.mh-courses-carousel-wrapper .swiper-wrapper,
.mh-courses-carousel-wrapper .swiper-slide {
    min-width: 0;
}

/* Navigation arrows - matches Elementor teal style */
.mh-courses-carousel-wrapper .swiper-button-prev,
.mh-courses-carousel-wrapper .swiper-button-next {
    position: absolute;
    top: 0;
    z-index: 5;
    color: #1DBBC4;
    background: rgba(255, 255, 255, 0.95);
    width: 56px;
    height: 56px;
    border-radius: 12px;
    box-shadow: none;
    transition: all 0.3s ease;
    border: 0;
}

.mh-courses-carousel-wrapper .swiper-button-prev:hover,
.mh-courses-carousel-wrapper .swiper-button-next:hover {
    background: #1DBBC4;
    color: #fff;
    box-shadow: 0 3px 8px rgba(29, 187, 196, 0.25);
    border-color: #1DBBC4;
}

.mh-courses-carousel-wrapper .swiper-button-prev::after,
.mh-courses-carousel-wrapper .swiper-button-next::after {
    font-size: 24px;
    font-weight: bold;
}

.mh-courses-carousel-wrapper .swiper-button-prev {
    left: auto;
    right: 72px;
    transform: none;
}

.mh-courses-carousel-wrapper .swiper-button-next {
    right: 0;
    transform: none;
}

/* === COURSE CARD - Glassmorphism Design === */
.mh-course-card {
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    
    /* The card color and its glow are supplied dynamically by ACF. */
    border: 2px solid rgba(255, 255, 255, 0.85);
    
    /* Soft external teal glow, without changing the dynamic ACF color. */
    box-shadow: 0 12px 30px var(--mh-course-glow, rgba(29, 187, 196, 0.42));
    
    /* Glassmorphism effect */
    backdrop-filter: blur(4px) saturate(110%);
    -webkit-backdrop-filter: blur(4px) saturate(110%);
    
    /* Transition */
    transition: all 0.35s ease-out;
    
    /* Cursor */
    cursor: pointer;
    aspect-ratio: 1.68 / 1;
    min-height: 0;
    container-type: inline-size;
}

/* Top accent line */
.mh-course-card::before {
    display: none;
}

/* The supplied logo is the only decorative element on the card. */
.mh-course-card::after {
    display: none;
}

/* Hover effect */
.mh-course-card:hover {
    transform: translateY(-4px);
    box-shadow: 
        0 16px 34px var(--mh-course-glow, rgba(29, 187, 196, 0.48)),
        0 4px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    border-color: rgba(29, 187, 196, 0.8);
}

/* === CARD CONTENT === */
.mh-course-card-content {
    position: relative;
    z-index: 2;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.mh-course-card-title {
    margin: 0 0 34px 0;
    line-height: 1.08;
    font-weight: 700;
}

.mh-course-card-title a {
    color: #ffffff;
    text-decoration: none;
    transition: opacity 0.2s ease;
    text-shadow: none;
}

.mh-course-card-title a:hover {
    opacity: 0.9;
}

.mh-course-card-instructor {
    margin: 0;
    font-size: 8px;
    opacity: 0.9;
    font-style: normal;
    color: rgba(255, 255, 255, 0.9);
    text-shadow: none;
}

/* === LOGO === */
.mh-course-card-logo {
    position: absolute;
    bottom: 8px;
    right: 8px;
    z-index: 2;
    opacity: 0.42;
    transition: opacity 0.3s ease;
}

.mh-course-card-logo img {
    width: 92px;
    height: auto;
    display: block;
}

.mh-course-card:hover .mh-course-card-logo {
    opacity: 0.62;
}

@container (min-width: 260px) {
    .mh-course-card-title {
        margin-bottom: 42px;
    }

    .mh-course-card-title a {
        font-size: 18px !important;
    }

    .mh-course-card-instructor {
        font-size: 9px;
        font-style: normal;
        font-weight: 600;
    }

    .mh-course-card-logo {
        bottom: 12px;
        right: 14px;
    }

    .mh-course-card-logo img {
        width: 64px;
    }
}

@container (min-width: 400px) {
    .mh-course-card-title a {
        font-size: 28px !important;
    }

    .mh-course-card-instructor {
        font-size: 15px;
    }

    .mh-course-card-logo img {
        width: 96px;
    }
}

@container (min-width: 700px) {
    .mh-course-card-title a {
        font-size: 48px !important;
    }

    .mh-course-card-title {
        margin-bottom: 72px;
    }

    .mh-course-card-instructor {
        font-size: 30px;
    }

    .mh-course-card-logo img {
        width: 170px;
    }
}

/* === RESPONSIVE === */
@media (max-width: 1280px) {
    .mh-courses-grid.cols-4 {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 1024px) {
    .mh-courses-grid.cols-4,
    .mh-courses-grid.cols-3 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .mh-courses-grid.cols-4,
    .mh-courses-grid.cols-3,
    .mh-courses-grid.cols-2 {
        grid-template-columns: 1fr;
    }

    .mh-course-card {
        min-height: 0;
    }
    
    .mh-courses-carousel-wrapper .swiper-button-prev,
    .mh-courses-carousel-wrapper .swiper-button-next {
        width: 44px;
        height: 44px;
    }
}
