/* ============================================
   courses.css — EduCoach Courses Page
   Matches home.css color pattern exactly
   ============================================ */

/* ---------- HERO ---------- */
.crs-hero {
    background: #f5f0e8;
    padding: 5rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}
.crs-hero-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 3rem;
}

.crs-hero-badge {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    background: #fff;
    border: 1px solid #e2d9cc;
    color: #666;
    font-size: .72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .12em;
    padding: 7px 16px;
    border-radius: 30px;
    margin-bottom: 1.5rem;
}
.crs-hero-badge span { color: #e8651a; }

.crs-hero-title {
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 900;
    color: #0a1628;
    line-height: 1.1;
    margin-bottom: 1.25rem;
    letter-spacing: -.03em;
}
.crs-hero-title em {
    font-style: italic;
    color: #e8651a;
}

.crs-hero-sub {
    font-size: 1rem;
    color: #64748b;
    line-height: 1.75;
    margin-bottom: 2.5rem;
    max-width: 480px;
}

.crs-hero-nums {
    display: flex;
    gap: 2.5rem;
}
.crs-hero-nums strong {
    display: block;
    font-size: 2rem;
    font-weight: 800;
    color: #0a1628;
    line-height: 1;
    margin-bottom: .2rem;
}
.crs-hero-nums span {
    font-size: .78rem;
    color: #94a3b8;
}

/* Right preview card */
.crs-hero-card {
    background: #fff;
    border-radius: 20px;
    padding: 1.75rem;
    box-shadow: 0 20px 60px rgba(10,22,40,.1);
    border: 1px solid #e8e0d5;
}
.crs-hero-card-title {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: #94a3b8;
    margin-bottom: 1.1rem;
}
.crs-hero-card-row {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .75rem 1rem;
    background: #f8fafc;
    border-radius: 12px;
    margin-bottom: .6rem;
}
.crs-hero-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}
.crs-hero-card-name {
    font-size: .88rem;
    font-weight: 700;
    color: #0a1628;
    margin-bottom: 1px;
}
.crs-hero-card-meta {
    font-size: .72rem;
    color: #94a3b8;
}
.crs-hero-card-tag {
    margin-left: auto;
    font-size: .65rem;
    font-weight: 700;
    padding: 3px 10px;
    border-radius: 20px;
    white-space: nowrap;
}
.tag-popular  { background: #fff7f0; color: #e8651a; border: 1px solid #fde0cc; }
.tag-new      { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.tag-trending { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

/* ---------- FILTER BAR ---------- */
.crs-filter {
    background: #fff;
    border-bottom: 1px solid #e8e0d5;
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 16px rgba(10,22,40,.06);
}
.crs-filter-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}
.crs-filter-label {
    font-size: .72rem;
    font-weight: 700;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: .1em;
    white-space: nowrap;
}
.crs-filter-tabs {
    display: flex;
    gap: .4rem;
    flex-wrap: wrap;
    flex: 1;
}
.crs-tab {
    background: #f1f5f9;
    border: 1.5px solid transparent;
    color: #475569;
    padding: 6px 16px;
    border-radius: 30px;
    font-size: .8rem;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all .18s;
    white-space: nowrap;
}
.crs-tab:hover {
    border-color: #e8651a;
    color: #e8651a;
    background: #fff7f0;
}
.crs-tab.active {
    background: #e8651a;
    border-color: #e8651a;
    color: #fff;
    box-shadow: 0 4px 12px rgba(232,101,26,.25);
}
.crs-search {
    position: relative;
    margin-left: auto;
}
.crs-search input {
    background: #f8fafc;
    border: 1.5px solid #e2e8f0;
    border-radius: 30px;
    padding: 8px 16px 8px 36px;
    font-size: .83rem;
    font-family: inherit;
    outline: none;
    width: 200px;
    color: #1e293b;
    transition: border-color .18s, box-shadow .18s;
}
.crs-search input:focus {
    border-color: #e8651a;
    box-shadow: 0 0 0 3px rgba(232,101,26,.1);
    background: #fff;
}
.crs-search-icon {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
    font-size: .85rem;
    pointer-events: none;
}

/* ---------- MAIN SECTION ---------- */
.crs-main {
    background: #fff;
    padding: 4rem 2rem 5rem;
    min-height: 50vh;
}
.crs-main-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.crs-main-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    gap: .75rem;
}
.crs-result-count {
    font-size: .8rem;
    color: #94a3b8;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 5px 14px;
    border-radius: 20px;
    white-space: nowrap;
}
.crs-result-count strong { color: #0a1628; }

/* Grid */
.crs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Card */
.crs-card {
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #e8e0d5;
    transition: transform .25s ease, box-shadow .25s ease;
    animation: crsCardIn .4s ease both;
}
.crs-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 18px 45px rgba(10,22,40,.12);
}
@keyframes crsCardIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}
.crs-grid .crs-card:nth-child(1) { animation-delay: .04s; }
.crs-grid .crs-card:nth-child(2) { animation-delay: .08s; }
.crs-grid .crs-card:nth-child(3) { animation-delay: .12s; }
.crs-grid .crs-card:nth-child(4) { animation-delay: .16s; }
.crs-grid .crs-card:nth-child(5) { animation-delay: .20s; }
.crs-grid .crs-card:nth-child(6) { animation-delay: .24s; }
.crs-grid .crs-card:nth-child(7) { animation-delay: .28s; }
.crs-grid .crs-card:nth-child(8) { animation-delay: .32s; }
.crs-grid .crs-card:nth-child(9) { animation-delay: .36s; }

/* Card banner */
.crs-card-banner {
    height: 140px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}
.crs-card-banner.b1 { background: linear-gradient(135deg, #0a1628, #1a3a6b); }
.crs-card-banner.b2 { background: linear-gradient(135deg, #064e3b, #065f46); }
.crs-card-banner.b3 { background: linear-gradient(135deg, #7c2d12, #c2410c); }
.crs-card-banner.b4 { background: linear-gradient(135deg, #312e81, #4338ca); }
.crs-card-banner.b5 { background: linear-gradient(135deg, #713f12, #a16207); }
.crs-card-banner.b6 { background: linear-gradient(135deg, #1e1b4b, #3730a3); }

.crs-card-badge {
    position: absolute;
    top: 10px; right: 10px;
    background: rgba(255,255,255,.18);
    backdrop-filter: blur(4px);
    color: #fff;
    font-size: .6rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,.2);
}

/* Card body */
.crs-card-body {
    padding: 1.25rem 1.2rem 1.4rem;
}
.crs-card-name {
    font-size: 1rem;
    font-weight: 800;
    color: #0a1628;
    margin-bottom: .4rem;
    line-height: 1.3;
}
.crs-card-desc {
    font-size: .82rem;
    color: #64748b;
    line-height: 1.65;
    margin-bottom: 1rem;
}
.crs-card-line {
    height: 1px;
    background: #f1f5f9;
    margin-bottom: .9rem;
}
.crs-card-meta {
    display: flex;
    gap: .75rem;
    flex-wrap: wrap;
}
.crs-card-meta span {
    font-size: .74rem;
    color: #94a3b8;
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Empty */
.crs-empty {
    display: none;
    grid-column: 1 / -1;
    text-align: center;
    padding: 4rem 2rem;
    color: #94a3b8;
}
.crs-empty.show { display: block; }
.crs-empty-icon { font-size: 3rem; display: block; margin-bottom: .75rem; }

/* ---------- CTA ---------- */
.crs-cta {
    background: #0a1628;
    padding: 5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}
.crs-cta::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(circle at 20% 50%, rgba(232,101,26,.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 30%, rgba(13,148,136,.08) 0%, transparent 45%);
    pointer-events: none;
}
.crs-cta-inner {
    position: relative;
    z-index: 1;
    max-width: 580px;
    margin: 0 auto;
}
.crs-cta-eyebrow {
    font-size: .72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #e8651a;
    display: block;
    margin-bottom: .75rem;
}
.crs-cta-title {
    font-size: clamp(1.8rem, 4vw, 2.6rem);
    font-weight: 900;
    color: #fff;
    line-height: 1.2;
    margin-bottom: .9rem;
    letter-spacing: -.02em;
}
.crs-cta-title em { font-style: italic; color: #e8651a; }
.crs-cta-sub {
    font-size: 1rem;
    color: rgba(255,255,255,.55);
    line-height: 1.75;
    margin-bottom: 2rem;
}
.crs-cta-btns {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}
.crs-btn-orange {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: #e8651a;
    color: #fff;
    padding: .9rem 2rem;
    border-radius: 10px;
    font-size: .92rem;
    font-weight: 700;
    text-decoration: none;
    transition: background .18s, transform .18s;
    box-shadow: 0 6px 20px rgba(232,101,26,.35);
}
.crs-btn-orange:hover {
    background: #c0501a;
    transform: translateY(-2px);
    color: #fff;
}
.crs-btn-white {
    display: inline-flex;
    align-items: center;
    gap: .45rem;
    background: transparent;
    border: 2px solid rgba(255,255,255,.25);
    color: #fff;
    padding: .9rem 2rem;
    border-radius: 10px;
    font-size: .92rem;
    font-weight: 700;
    text-decoration: none;
    transition: border-color .18s, background .18s;
}
.crs-btn-white:hover {
    border-color: rgba(255,255,255,.5);
    background: rgba(255,255,255,.07);
    color: #fff;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 1024px) {
    .crs-grid { grid-template-columns: repeat(2, 1fr); }
    .crs-hero-inner { grid-template-columns: 1fr; }
    .crs-hero-card { display: none; }
}
@media (max-width: 640px) {
    .crs-grid { grid-template-columns: 1fr; }
    .crs-filter-tabs { gap: .3rem; }
    .crs-tab { padding: 5px 12px; font-size: .76rem; }
    .crs-search { width: 100%; }
    .crs-search input { width: 100%; }
    .crs-hero-nums { gap: 1.5rem; }
}