/* ===========================================
   COURSES.CSS  —  Dashmesh Khalsa College
   Extends global.css — no duplicate :root
=========================================== */

/* ── SECTION BADGE ── */
.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    background: #eaf1ff;
    padding: 9px 18px;
    border-radius: var(--radius-badge);
    margin-bottom: 22px;
    letter-spacing: .3px;
}

.section-badge svg { flex-shrink: 0; }

/* ── SECTION TITLE ── */
.section-title {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 56px;
}

.section-title .global-h2 { margin-bottom: 14px; }
.section-title .global-p  { max-width: 540px; margin: 0 auto; }


/* ===========================================
   COURSES HERO
=========================================== */
.courses-hero-bg {
    background: #f3f7fc;
}

.courses-hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.courses-hero-content .global-h1 {
    margin-bottom: 20px;
    color: #111;
}

.courses-hero-content .global-p {
    margin-bottom: 36px;
}

/* Hero buttons */
.hero-btns {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.btn-outline-hero {
    border: 2px solid var(--primary);
    color: var(--primary);
    padding: 16px 32px;
    border-radius: var(--radius-btn);
    font-weight: 700;
    font-size: 17px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: .35s;
}

.btn-outline-hero:hover {
    background: var(--primary);
    color: #fff;
    transform: translateY(-5px);
}

/* Hero image */
.courses-hero-image {
    position: relative;
}

.courses-hero-image img {
    border-radius: 28px;
    height: 560px;
    width: 100%;
    object-fit: cover;
    box-shadow: 0 30px 80px rgba(10, 61, 145, .14);
}

.courses-hero-image::before {
    content: '';
    position: absolute;
    inset: -14px auto auto -14px;
    width: 100px;
    height: 100px;
    border-radius: 18px;
    background: linear-gradient(135deg, #0a3d91, #12c7ea);
    z-index: -1;
    opacity: .3;
}

.hero-image-badge {
    position: absolute;
    bottom: 28px;
    right: 28px;
    background: linear-gradient(135deg, #0a3d91, #12c7ea);
    color: #fff;
    border-radius: 20px;
    padding: 16px 24px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(10, 61, 145, .3);
}

.badge-num {
    display: block;
    font-size: 32px;
    font-weight: 800;
    line-height: 1;
}

.badge-text {
    display: block;
    font-size: 13px;
    font-weight: 600;
    opacity: .85;
    margin-top: 4px;
}


/* ===========================================
   FILTER BAR
=========================================== */
.courses-filter-section {
    padding: 36px 0 0;
    background: #fff;
}

.courses-filter-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.courses-filter-buttons button {
    height: 48px;
    padding: 0 24px;
    border: 2px solid #e8eef9;
    background: #fff;
    border-radius: var(--radius-badge);
    font-size: 15px;
    font-weight: 600;
    color: #555;
    cursor: pointer;
    transition: .3s ease;
    font-family: 'Poppins', sans-serif;
}

.courses-filter-buttons button:hover,
.courses-filter-buttons button.active {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
    box-shadow: 0 8px 24px rgba(10, 61, 145, .2);
    transform: translateY(-2px);
}


/* ===========================================
   COURSES GRID
=========================================== */
.courses-grid-section {
    background: #fff;
}

.courses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

/* Course Card */
.course-card {
    background: #fff;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 6px 28px rgba(0, 0, 0, .06);
    border: 1px solid #eef2fb;
    transition: transform .35s ease, box-shadow .35s ease;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(10, 61, 145, .12);
}

/* Card image */
.course-image {
    position: relative;
    overflow: hidden;
}

.course-image img {
    height: 220px;
    width: 100%;
    object-fit: cover;
    transition: transform .5s ease;
}

.course-card:hover .course-image img {
    transform: scale(1.05);
}

.course-category-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    background: linear-gradient(135deg, #0a3d91, #12c7ea);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 50px;
    letter-spacing: .4px;
    text-transform: uppercase;
}

/* Card content */
.course-content {
    padding: 28px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.course-content h3 {
    font-size: 22px;
    font-weight: 800;
    color: #111;
    margin-bottom: 10px;
    line-height: 1.3;
}

.course-content p {
    font-size: 15px;
    line-height: 1.75;
    color: var(--text);
    margin-bottom: 20px;
    flex: 1;
}

/* Meta pills */
.course-meta {
    display: flex;
    gap: 10px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}

.course-meta span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: #f0f5ff;
    padding: 8px 16px;
    border-radius: 50px;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
}

.course-meta span svg { flex-shrink: 0; }

/* CTA button */
.course-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #0a3d91, #12c7ea);
    border-radius: 14px;
    color: #fff;
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    transition: .35s ease;
    margin-top: auto;
}

.course-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(10, 61, 145, .28);
}

/* No results state */
.no-results {
    text-align: center;
    padding: 60px 20px;
    color: #999;
    font-size: 18px;
    font-weight: 600;
}


/* ===========================================
   CTA SECTION
=========================================== */
.cta-bg {
    background: #f3f7fc;
}

.courses-cta-box {
    background: linear-gradient(135deg, #082b73 0%, #0a3d91 50%, #0d6efd 100%);
    border-radius: 40px;
    padding: 90px 80px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(18, 199, 234, .25) 0%, transparent 70%);
    top: -200px;
    right: -100px;
    pointer-events: none;
}

.courses-cta-box .global-h2 {
    color: #fff;
    margin-bottom: 14px;
}

.courses-cta-box .global-p {
    color: rgba(255, 255, 255, .75);
    max-width: 520px;
    margin: 0 auto 36px;
}

.courses-cta-box .hero-btns {
    justify-content: center;
    flex-wrap: wrap;
}

.btn-cta-outline {
    border: 2px solid rgba(255, 255, 255, .7);
    color: #fff;
    background: transparent;
    padding: 16px 32px;
    border-radius: var(--radius-btn);
    font-weight: 700;
    font-size: 17px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: .35s;
}

.btn-cta-outline:hover {
    background: #fff;
    color: var(--primary);
    border-color: #fff;
    transform: translateY(-5px);
}

.btn-primary {
    display: inline-flex;
    align-items: center;
}


/* ===========================================
   SCROLL-REVEAL ANIMATION
=========================================== */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity .55s ease, transform .55s ease;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Filter animation */
@keyframes cardPop {
    from { opacity: 0; transform: scale(.96) translateY(12px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.card-animate {
    animation: cardPop .35s ease forwards;
}


/* ===========================================
   RESPONSIVE — TABLET (≤ 992px)
=========================================== */
@media (max-width: 992px) {

    .courses-hero-grid {
        grid-template-columns: 1fr;
        gap: 48px;
    }

    .courses-hero-image img {
        height: 400px;
    }

    .courses-hero-image::before { display: none; }

    .courses-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }

    .courses-cta-box {
        padding: 60px 48px;
    }
}


/* ===========================================
   RESPONSIVE — MOBILE (≤ 767px)
=========================================== */
@media (max-width: 767px) {

    /* Hero */
    .courses-hero-image img {
        height: 280px;
        border-radius: 20px;
    }

    .hero-image-badge {
        bottom: 16px;
        right: 16px;
        padding: 12px 18px;
    }

    .badge-num { font-size: 24px; }
    .badge-text { font-size: 12px; }

    .btn-outline-hero {
        font-size: 15px;
        padding: 14px 24px;
    }

    /* Filter */
    .courses-filter-buttons {
        gap: 8px;
    }

    .courses-filter-buttons button {
        height: 42px;
        padding: 0 18px;
        font-size: 14px;
    }

    /* Grid */
    .courses-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .course-image img {
        height: 200px;
    }

    .course-content {
        padding: 22px;
    }

    .course-content h3 {
        font-size: 20px;
    }

    /* CTA */
    .courses-cta-box {
        padding: 50px 24px;
        border-radius: 24px;
    }

    .courses-cta-box .hero-btns {
        flex-direction: column;
        align-items: center;
    }

    .btn-cta-outline {
        font-size: 15px;
        padding: 14px 28px;
    }
}


/* ===========================================
   RESPONSIVE — SMALL MOBILE (≤ 480px)
=========================================== */
@media (max-width: 480px) {

    .courses-hero-image img {
        height: 240px;
    }

    .course-image img {
        height: 180px;
    }

    .courses-filter-buttons button {
        height: 40px;
        padding: 0 14px;
        font-size: 13px;
    }

    .course-meta span {
        font-size: 12px;
        padding: 6px 12px;
    }
}