/* ════════════════════════════════════════════════════════════════
   course-page.css — สไตล์ร่วมสำหรับหน้ารายการคอร์สอบรม (Course Listing)
   ใช้ร่วมกันโดย: course-general, course-laws, course-jorpor,
                  course-inhouse, course-safety-review
   (เดิมแต่ละหน้า copy <style> ก้อนเดียวกันซ้ำ ๆ ~3.6KB/หน้า รวม ~18KB
   ดึงออกมารวมเป็นไฟล์เดียว ให้เบราว์เซอร์โหลด+cache ครั้งเดียวใช้ได้ทุกหน้า)
   ════════════════════════════════════════════════════════════════ */


  /* ── Page Hero ── */
  .ch-hero {
    background: linear-gradient(90deg, #6171eb 0%, #4acee9 55%, #51d7c3 100%);
    padding: 52px 0 44px;
    text-align: center;
  }
  .ch-hero h1 {
    color: rgba(255,255,255,.9);
    color: #fff; font-size: clamp(2rem, 2.8vw, 2rem);
    font-weight: 800; line-height: 1.5; max-width: 100%;
  }
  /* ── Course Grid ── */
  .cg-section {
    padding: 64px 0 72px;
    background: linear-gradient(180deg, #f0f4ff 0%, #ffffff 100%);
  }
  .cg-header { text-align: center; margin-bottom: 44px; }
  .cg-tag {
    display: inline-block; background: #1565c0; color: #fff;
    font-size: 11px; font-weight: 700; letter-spacing: 1.5px;
    padding: 5px 16px; border-radius: 30px; text-transform: uppercase;
    margin-bottom: 12px;
  }
  .cg-header h2 {
    font-size: clamp(1.4rem, 2.5vw, 2rem); font-weight: 800;
    color: #0d1b3e; margin: 0;
  }

  /* ── CC Card ── */
  .cc {
    position: relative; overflow: hidden; border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0,0,0,.14); cursor: pointer; height: 100%;
  }
  .cc img {
    width: 100%; height: 100%; object-fit: cover; display: block;
    transition: transform .55s cubic-bezier(.25,.46,.45,.94); will-change: transform;
  }
  .cc:hover img { transform: scale(1.09); }
  .cc-overlay {
    position: absolute; inset: 0;
    background: linear-gradient(to top, rgba(5,15,45,.84) 0%, rgba(5,15,45,.36) 48%, transparent 100%);
    display: flex; flex-direction: column; justify-content: space-between; padding: 14px;
    transition: background .35s;
  }
  .cc:hover .cc-overlay {
    background: linear-gradient(to top, rgba(5,15,45,.93) 0%, rgba(5,15,45,.55) 56%, rgba(5,15,45,.08) 100%);
  }
  .cc-badge {
    align-self: flex-start; background: rgba(255,255,255,.18);
    backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
    border: 1px solid rgba(255,255,255,.32); color: #fff;
    font-size: 10px; font-weight: 700; letter-spacing: .8px;
    padding: 4px 11px; border-radius: 20px; transition: background .3s;
  }
  .cc:hover .cc-badge { background: rgba(21,101,192,.78); border-color: transparent; }
  .cc-bottom { display: flex; flex-direction: column; gap: 9px; }
  .cc-title {
    color: #fff; font-weight: 700; font-size: clamp(.85rem, 1.4vw, 1rem);
    margin: 0; line-height: 1.45; text-shadow: 0 2px 6px rgba(0,0,0,.5);
  }
  .cc-cta {
    display: flex; align-items: center; gap: 8px;
    opacity: 0; transform: translateY(10px); transition: opacity .3s, transform .3s;
  }
  .cc:hover .cc-cta { opacity: 1; transform: translateY(0); }
  @media (hover: none) { .cc-cta { opacity: 1; transform: translateY(0); } }
  .cc-btn {
    font-size: 12px; font-weight: 700; padding: 5px 14px; border-radius: 20px;
    text-decoration: none; display: inline-block; transition: transform .2s, opacity .2s;
    white-space: nowrap;
  }
  .cc-btn:hover { transform: translateY(-2px); text-decoration: none; }
  .cc-btn-primary { background: #1565c0; color: #fff !important; }
  .cc-btn-outline {
    background: transparent; color: #fff !important;
    border: 1.5px solid rgba(255,255,255,.65);
  }
  .cc-btn-outline:hover { background: rgba(255,255,255,.18); color: #fff !important; }
  .cc::after {
    content: ''; position: absolute; inset: 0; border-radius: 14px;
    border: 2px solid transparent; pointer-events: none; transition: border-color .35s;
  }
  .cc:hover::after { border-color: rgba(255,255,255,.25); }
  .cg-empty { text-align: center; padding: 60px 20px; color: #94a3b8; }
  .cg-empty i { font-size: 3rem; margin-bottom: 16px; display: block; }
