/* =========================================================
   Home — Latest courses modern slider
   ========================================================= */

.hc-slider {
    --hc-accent-rgb: var(--c-accent-rgb, 0, 156, 204);
    --hc-text: #0f172a;
    --hc-muted: #64748b;
    --hc-border: rgba(15, 23, 42, 0.08);
    --hc-card: #ffffff;
    --hc-ease: cubic-bezier(0.22, 1, 0.36, 1);
    position: relative;
    overflow: hidden;
    padding: 2.75rem 0 3rem;
    background:
        radial-gradient(900px 380px at 0% 0%, rgba(var(--hc-accent-rgb), 0.12), transparent 55%),
        radial-gradient(700px 320px at 100% 100%, rgba(var(--c-secondary-rgb, 51, 65, 85), 0.08), transparent 50%),
        linear-gradient(180deg, #f3f7fb 0%, #ffffff 70%);
}

.hc-slider__bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.hc-slider__orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(55px);
    opacity: 0.4;
}

.hc-slider__orb--1 {
    width: 260px;
    height: 260px;
    top: -60px;
    inset-inline-start: -40px;
    background: rgba(var(--hc-accent-rgb), 0.35);
    animation: hc-float 9s ease-in-out infinite;
}

.hc-slider__orb--2 {
    width: 220px;
    height: 220px;
    bottom: -50px;
    inset-inline-end: -30px;
    background: rgba(var(--c-secondary-rgb, 51, 65, 85), 0.22);
    animation: hc-float 11s ease-in-out infinite reverse;
}

.hc-slider__grid {
    position: absolute;
    inset: 0;
    opacity: 0.35;
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.035) 1px, transparent 1px);
    background-size: 42px 42px;
    mask-image: linear-gradient(180deg, #000 10%, transparent 95%);
}

.hc-slider > .container {
    position: relative;
    z-index: 1;
}

.hc-slider__head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.hc-slider__eyebrow {
    display: inline-block;
    margin-bottom: 0.4rem;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.04em;
    color: rgb(var(--hc-accent-rgb));
}

.hc-slider__title {
    margin: 0 0 0.4rem;
    font-size: clamp(1.45rem, 2.4vw, 2rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--hc-text);
    line-height: 1.2;
}

.hc-slider__desc {
    margin: 0;
    max-width: 34rem;
    color: var(--hc-muted);
    font-size: 0.95rem;
    line-height: 1.65;
}

.hc-slider__nav {
    display: inline-flex;
    gap: 0.55rem;
    flex-shrink: 0;
}

.hc-slider__btn {
    width: 46px;
    height: 46px;
    border: 1px solid var(--hc-border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.9);
    color: var(--hc-text);
    display: grid;
    place-items: center;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);
    transition: transform 0.2s var(--hc-ease), background 0.2s var(--hc-ease), color 0.2s var(--hc-ease), border-color 0.2s var(--hc-ease);
}

.hc-slider__btn svg {
    width: 18px;
    height: 18px;
}

.hc-slider__btn:hover {
    transform: translateY(-2px);
    color: #fff;
    border-color: transparent;
    background: linear-gradient(
        135deg,
        rgb(var(--hc-accent-rgb)),
        rgb(var(--c-accent-hover-rgb, var(--hc-accent-rgb)))
    );
}

.hc-swiper {
    overflow: visible;
    padding-bottom: 0.35rem;
}

.hc-card {
    height: 100%;
    display: flex;
    flex-direction: column;
    background: var(--hc-card);
    border: 1px solid var(--hc-border);
    border-radius: 22px;
    overflow: hidden;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.07);
    transition: transform 0.3s var(--hc-ease), box-shadow 0.3s var(--hc-ease), border-color 0.3s var(--hc-ease);
    animation: hc-rise 0.55s var(--hc-ease) both;
}

.hc-card:hover {
    transform: translateY(-8px);
    border-color: rgba(var(--hc-accent-rgb), 0.28);
    box-shadow: 0 22px 44px rgba(15, 23, 42, 0.12);
}

.hc-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: #e2e8f0;
}

.hc-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.55s var(--hc-ease);
}

.hc-card:hover .hc-card__media img {
    transform: scale(1.07);
}

.hc-card__shine {
    position: absolute;
    inset: 0;
    background: linear-gradient(120deg, transparent 30%, rgba(255, 255, 255, 0.28) 48%, transparent 65%);
    transform: translateX(120%);
    transition: transform 0.7s var(--hc-ease);
    pointer-events: none;
}

.hc-card:hover .hc-card__shine {
    transform: translateX(-120%);
}

.hc-card__badge {
    position: absolute;
    top: 0.8rem;
    inset-inline-start: 0.8rem;
    z-index: 1;
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    font-size: 0.74rem;
    font-weight: 800;
    color: #fff;
    background: rgba(15, 23, 42, 0.78);
    backdrop-filter: blur(6px);
}

.hc-card__badge--free {
    background: rgba(16, 185, 129, 0.92);
}

.hc-card__badge--sale {
    background: rgba(225, 29, 72, 0.92);
}

.hc-card__body {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    flex: 1;
    padding: 1rem 1.05rem 1.1rem;
}

.hc-card__cats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.74rem;
    font-weight: 700;
    line-height: 1.35;
}

.hc-card__cat {
    color: rgb(var(--hc-accent-rgb));
}

.hc-card__sep {
    color: #94a3b8;
}

.hc-card__sub {
    color: var(--hc-muted);
}

.hc-card__title {
    margin: 0;
    font-size: 1.02rem;
    font-weight: 800;
    line-height: 1.4;
    letter-spacing: -0.015em;
    min-height: 2.8em;
}

.hc-card__title a {
    color: inherit;
    text-decoration: none;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.hc-card__title a:hover {
    color: rgb(var(--hc-accent-rgb));
}

.hc-card__footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    margin-top: auto;
    padding-top: 0.75rem;
    border-top: 1px solid var(--hc-border);
}

.hc-card__price {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
    min-width: 0;
}

.hc-card__price-now {
    font-size: 1rem;
    font-weight: 800;
    color: rgb(var(--hc-accent-rgb));
    letter-spacing: -0.02em;
}

.hc-card__price-now--free {
    color: #059669;
}

.hc-card__price-old {
    font-size: 0.78rem;
    color: var(--hc-muted);
}

.hc-card__cta {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-height: 40px;
    padding: 0.45rem 0.85rem;
    border-radius: 12px;
    font-size: 0.82rem;
    font-weight: 800;
    text-decoration: none;
    white-space: nowrap;
    color: #fff;
    background: linear-gradient(
        135deg,
        rgb(var(--hc-accent-rgb)),
        rgb(var(--c-accent-hover-rgb, var(--hc-accent-rgb)))
    );
    box-shadow: 0 10px 20px rgba(var(--hc-accent-rgb), 0.24);
    transition: transform 0.2s var(--hc-ease), box-shadow 0.2s var(--hc-ease);
}

.hc-card__cta svg {
    width: 15px;
    height: 15px;
}

.hc-card__cta:hover {
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 14px 24px rgba(var(--hc-accent-rgb), 0.32);
}

.hc-slider__pagination {
    margin-top: 1.25rem;
    display: flex;
    justify-content: center;
    gap: 0.35rem;
}

.hc-slider__pagination .swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    margin: 0 !important;
    opacity: 1;
    background: rgba(15, 23, 42, 0.18);
    border-radius: 999px;
    transition: width 0.25s var(--hc-ease), background 0.25s var(--hc-ease);
}

.hc-slider__pagination .swiper-pagination-bullet-active {
    width: 22px;
    background: rgb(var(--hc-accent-rgb));
}

@keyframes hc-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(18px); }
}

@keyframes hc-rise {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 767.98px) {
    .hc-slider {
        padding: 2rem 0 2.25rem;
    }

    .hc-slider__head {
        flex-direction: column;
        align-items: flex-start;
    }

    .hc-card__title {
        min-height: 0;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hc-slider__orb,
    .hc-card,
    .hc-card__media img,
    .hc-card__shine,
    .hc-card__cta,
    .hc-slider__btn {
        animation: none !important;
        transition: none !important;
    }
}
