/**
 * Courses Section - Homepage
 * 
 * Auto-scroll carousel with manual controls
 * Responsive: 5 → 2 → 1 columns
 */

/* ====================================
   SECTION CONTAINER
   ==================================== */

.courses-section {
    padding: 80px 0;
    background: linear-gradient(180deg, #fafafa 0%, #ffffff 100%);
    position: relative;
    overflow: hidden;
}

.courses-section .container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ====================================
   SECTION HEADER
   ==================================== */

.courses-section__header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 48px;
    gap: 32px;
}

.section-heading {
    max-width: 600px;
}

.section-label {
    display: inline-block;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #d4af37;
    margin-bottom: 12px;
}

.section-title {
    font-size: 42px;
    font-weight: 800;
    line-height: 1.2;
    color: #1a1a1a;
    margin-bottom: 16px;
}

.section-description {
    font-size: 16px;
    line-height: 1.7;
    color: #666666;
}

/* ====================================
   CAROUSEL CONTROLS (DESKTOP)
   ==================================== */

.carousel-controls {
    display: flex;
    gap: 12px;
}

.carousel-control {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid #e5e5e5;
    background: #ffffff;
    color: #1a1a1a;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.carousel-control:hover {
    background: #1a1a1a;
    border-color: #1a1a1a;
    color: #ffffff;
    transform: scale(1.05);
}

.carousel-control:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    transform: scale(1);
}

/* ====================================
   CAROUSEL CONTAINER
   ==================================== */

.courses-carousel {
    position: relative;
    overflow: hidden;
    margin-bottom: 40px;
}

.courses-carousel__track {
    display: flex;
    gap: 24px;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

/* Pause animation on hover */
.courses-carousel:hover .courses-carousel__track {
    animation-play-state: paused !important;
}

.courses-carousel__slide {
    flex: 0 0 auto;
    width: calc((100% - 96px) / 5); /* 5 cards on desktop */
}

/* ====================================
   CAROUSEL INDICATORS (MOBILE/TABLET)
   ==================================== */

.carousel-indicators {
    display: none;
    justify-content: center;
    gap: 8px;
    margin-bottom: 32px;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    border: none;
    background: #d1d5db;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-indicator.is-active {
    width: 24px;
    border-radius: 4px;
    background: #d4af37;
}

/* ====================================
   SECTION FOOTER
   ==================================== */

.courses-section__footer {
    text-align: center;
    margin-top: 48px;
}

.btn-view-all {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 36px;
    background: linear-gradient(135deg, #1a1a1a 0%, #333333 100%);
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-view-all:hover {
    background: linear-gradient(135deg, #d4af37 0%, #f4e4a6 100%);
    color: #1a1a1a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(212, 175, 55, 0.3);
}

.btn-view-all i {
    transition: transform 0.3s ease;
}

.btn-view-all:hover i {
    transform: translateX(4px);
}

/* ====================================
   RESPONSIVE DESIGN
   ==================================== */

/* Tablet (2 cards) */
@media (max-width: 1024px) {
    .courses-carousel__slide {
        width: calc((100% - 24px) / 2);
    }

    .carousel-controls {
        display: none;
    }

    .carousel-indicators {
        display: flex;
    }

    .section-title {
        font-size: 36px;
    }
}

/* Mobile (1 card) */
@media (max-width: 640px) {
    .courses-section {
        padding: 60px 0;
    }

    .courses-section__header {
        flex-direction: column;
        align-items: flex-start;
        margin-bottom: 32px;
    }

    .section-title {
        font-size: 28px;
    }

    .section-description {
        font-size: 15px;
    }

    .courses-carousel__track {
        gap: 16px;
    }

    .courses-carousel__slide {
        width: 100%;
    }

    .btn-view-all {
        width: 100%;
        justify-content: center;
    }
}