/* Recent-Activity-inspired department carousel */
.department-activity-section {
    width: 100%;
    padding: clamp(28px, 3.5vw, 48px) 0 36px;
    background: #fff;
}

.department-activity-heading {
    text-align: center;
    margin: 0 auto 28px;
    padding: 0 16px;
}

.department-activity-heading h2 {
    color: #201080;
    font-size: clamp(1.5rem, 2vw, 1.9rem);
    font-weight: 600;
    margin: 0 0 10px;
}

.department-activity-heading h2::after {
    content: "";
    display: block;
    width: 60px;
    height: 3px;
    margin: 8px auto 0;
    background: #f0a323;
}

.department-activity-heading p {
    color: #697386;
    margin: 0;
    font-size: .95rem;
}

.department-carousel {
    position: relative;
    padding: 0 clamp(38px, 3.5vw, 66px);
}

.department-carousel-viewport {
    overflow: hidden;
    width: 100%;
    scroll-behavior: smooth;
}

.department-carousel-track {
    display: flex;
    align-items: stretch;
    gap: 24px;
    transition: transform .55s ease;
    will-change: transform;
}

.department-activity-card {
    flex: 0 0 calc((100% - 72px) / 4);
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border-radius: 11px;
    box-shadow: 0 3px 15px rgba(28, 36, 65, .11);
}

.department-activity-link {
    display: flex;
    height: 100%;
    flex-direction: column;
    color: #201080;
    text-decoration: none;
}

.department-activity-image {
    height: 250px;
    overflow: hidden;
    background: #f1f4f9;
}

.department-activity-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .35s ease;
}

.department-activity-link:hover .department-activity-image img {
    transform: scale(1.035);
}

.department-activity-title {
    min-height: 78px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px 18px;
    text-align: center;
    color: #201080;
    font-weight: 600;
    line-height: 1.4;
}

.department-carousel-arrow {
    position: absolute;
    z-index: 2;
    top: 42%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: 0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #201080;
    color: #fff;
    font-size: 1.25rem;
    cursor: pointer;
    transition: background .2s ease, opacity .2s ease;
}

.department-carousel-arrow:hover {
    background: #3224a8;
}

.department-carousel-arrow:focus-visible {
    outline: 3px solid #f0a323;
    outline-offset: 3px;
}

.department-carousel-prev { left: 12px; }
.department-carousel-next { right: 12px; }

.department-carousel-dots {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
}

.department-carousel-dot {
    width: 10px;
    height: 10px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #ccd5e3;
    cursor: pointer;
    transition: width .2s ease, background .2s ease;
}

.department-carousel-dot.is-active {
    width: 28px;
    border-radius: 8px;
    background: #201080;
}

@media (max-width: 1199.98px) {
    .department-activity-card { flex-basis: calc((100% - 48px) / 3); }
    .department-activity-image { height: 220px; }
}

@media (max-width: 767.98px) {
    .department-carousel { padding: 0 34px; }
    .department-carousel-track { gap: 14px; }
    .department-activity-card { flex-basis: calc((100% - 14px) / 2); }
    .department-activity-image { height: 180px; }
    .department-activity-title { min-height: 72px; padding: 12px; font-size: .92rem; }
    .department-carousel-arrow { width: 34px; height: 34px; font-size: 1rem; }
    .department-carousel-prev { left: 0; }
    .department-carousel-next { right: 0; }
}

@media (max-width: 480px) {
    .department-activity-card { flex-basis: 100%; }
    .department-activity-image { height: 220px; }
}

@media (prefers-reduced-motion: reduce) {
    .department-carousel-track,
    .department-activity-image img,
    .department-carousel-dot {
        transition: none;
    }
}

/* Shared horizontal carousel for homepage Courses, Gallery and Videos */
.home-horizontal-carousel {
    position: relative;
    padding: 0 clamp(38px, 3.5vw, 66px);
    min-width: 0;
}
.home-carousel-viewport {
    width: 100%;
    overflow: hidden;
    scroll-behavior: smooth;
}
.home-carousel-track {
    display: flex !important;
    flex-wrap: nowrap !important;
    align-items: stretch;
    gap: 24px;
    width: 100%;
    transition: transform .55s ease;
    will-change: transform;
}
.home-carousel-card {
    display: block;
    flex: 0 0 calc((100% - 72px) / 4);
    min-width: 0;
    box-sizing: border-box;
    scroll-snap-align: start;
}
.home-course-card > .content-card {
    width: 100%;
    height: 100%;
}
.home-gallery-card {
    overflow: hidden;
    border: 1px solid #e0e6ef;
    border-radius: 11px;
    background: #fff;
    color: inherit;
    text-decoration: none;
    box-shadow: 0 3px 15px rgba(28, 36, 65, .11);
    transition: transform .2s ease, box-shadow .2s ease;
}
.home-gallery-card:hover { transform: translateY(-3px); box-shadow: 0 8px 20px rgba(25,45,75,.14); color: inherit; }
.home-gallery-image { height: 190px; overflow: hidden; background: #f1f4f8; }
.home-gallery-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .3s ease; }
.home-gallery-card:hover .home-gallery-image img { transform: scale(1.04); }
.home-gallery-card-body { padding: 1rem 1.1rem; }
.home-gallery-card-body h3 { font-size: 1.1rem; font-weight: 700; margin: 0 0 .55rem; }
.home-gallery-card-body span { display: flex; justify-content: space-between; align-items: center; color: #1b6ec2; font-size: .9rem; font-weight: 600; }
.home-video-card { overflow: hidden; background: #fff; border: 1px solid #e0e0e0; border-radius: 11px; transition: box-shadow .3s ease, transform .3s ease; }
.home-video-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); transform: translateY(-2px); }
.video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; background: #000; }
.video-container iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: none; }
.video-card-body { padding: 1rem; }
.video-card-title { font-size: 1rem; font-weight: 600; margin-bottom: .5rem; color: #333; }
.video-card-meta { display: flex; align-items: center; gap: .5rem; font-size: .875rem; color: #666; }
.home-carousel-arrow {
    position: absolute; z-index: 2; top: 42%; transform: translateY(-50%);
    width: 44px; height: 44px; border: 0; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    background: #201080; color: #fff; font-size: 1.25rem; cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.12); transition: background .2s ease, opacity .2s ease;
}
.home-carousel-arrow:hover { background: #3224a8; }
.home-carousel-arrow:focus-visible { outline: 3px solid #f0a323; outline-offset: 3px; }
.home-carousel-arrow[hidden] { display: none !important; }
.home-carousel-prev { left: 12px; }
.home-carousel-next { right: 12px; }
.home-carousel-dots { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 18px; }
.home-carousel-dots[hidden] { display: none !important; }
.home-carousel-dot { width: 10px; height: 10px; padding: 0; border: 0; border-radius: 50%; background: #ccd5e3; cursor: pointer; transition: width .2s ease, background .2s ease; }
.home-carousel-dot.is-active { width: 28px; border-radius: 8px; background: #201080; }

@media (max-width: 1199.98px) {
    .home-carousel-card { flex-basis: calc((100% - 48px) / 3); }
}
@media (max-width: 767.98px) {
    .home-horizontal-carousel { padding: 0 34px; }
    .home-carousel-track { gap: 14px; }
    .home-carousel-card { flex-basis: calc((100% - 14px) / 2); }
    .home-carousel-arrow { width: 34px; height: 34px; font-size: 1rem; }
    .home-carousel-prev { left: 0; }
    .home-carousel-next { right: 0; }
    .home-gallery-image { height: 180px; }
}
@media (max-width: 480px) {
    .home-carousel-card { flex-basis: 100%; }
    .home-gallery-image { height: 220px; }
}
@media (prefers-reduced-motion: reduce) {
    .home-carousel-track, .home-gallery-image img, .home-carousel-dot { transition: none; }
}
