/* product.css | เฉพาะหน้า product.html (ทุนการศึกษา)  ใช้ร่วมกับ cream.css */

.hero-icon {
  width: 110px;
  height: 110px;
  display: grid;
  place-items: center;
  font-size: 3.2rem;
  color: var(--maroon);
  background: #fff;
  border: 4px solid var(--maroon);
  border-radius: 50%;
  box-shadow: 0 .5rem 1.25rem rgba(128, 0, 0, .2);
}

/* ===== กล่องแนะนำ ===== */
.intro-box {
  margin-top: 2rem;
  background: #fff;
  border: 1px solid var(--line);
  border-left: 8px solid var(--gold);
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  line-height: 1.8;
  box-shadow: 0 .25rem .75rem rgba(60, 20, 20, .06);
}

/* ===== หัวข้อแต่ละ section ===== */
.sch-section { margin-top: 3rem; }
.sec-head {
  display: flex;
  align-items: center;
  gap: .9rem;
  padding-bottom: .8rem;
  margin-bottom: 1.4rem;
  border-bottom: 3px solid var(--c);
}
.sec-head .sec-icon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  font-size: 1.6rem;
  color: var(--c-text, #fff);
  background: var(--c);
  border-radius: .9rem;
}
.sec-head h2 { font-size: 1.55rem; font-weight: 700; color: var(--c-title); margin: 0; }
.sec-head small { display: block; color: var(--muted); font-weight: 400; font-size: .9rem; }

/* สีของแต่ละ section / การ์ด */
.c-maroon { --c: #800000; --c-soft: #f8e9e9; --c-title: #800000; }
.c-blue   { --c: #1565c0; --c-soft: #e6f0fb; --c-title: #0b2f63; }
.c-gold   { --c: #ffd966; --c-soft: #fff6d6; --c-title: #7a5b00; --c-text: #4a0808; }

/* ===== การ์ดทุน ===== */
.sch-card {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 6px solid var(--c);
  border-radius: 1.1rem;
  overflow: hidden;
  height: 100%;
  display: flex;
  flex-direction: column;
  box-shadow: 0 .25rem .75rem rgba(60, 20, 20, .08);
  transition: box-shadow .25s, transform .25s;
}
.sch-card:hover { box-shadow: 0 .7rem 1.5rem rgba(60, 20, 20, .16); transform: translateY(-3px); }

/* ภาพประกอบทุน (ถ้ายังไม่มีไฟล์ภาพ จะแสดงไอคอนบนพื้นสีของหมวดแทน) */
.sch-media {
  position: relative;
  grid-area: media;
  aspect-ratio: 16 / 9;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(135deg, var(--c), var(--c-title));
  color: var(--c-text, #fff);
}
.sch-media .bi { font-size: 4.5rem; opacity: .9; }
.sch-media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .5s;
}
.sch-card:hover .sch-media img { transform: scale(1.05); }

.sch-head { padding: 1.3rem 1.5rem .4rem; display: flex; align-items: center; gap: .8rem; grid-area: head; }
.sch-head .icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  color: var(--c-text, #fff);
  background: var(--c);
  border-radius: .8rem;
}
.sch-head h3 { font-size: 1.25rem; font-weight: 600; color: var(--c-title); margin: 0; }

/* ตัวเลขสำคัญ */
.sch-stats {
  padding: 1rem 1.5rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .75rem;
  grid-area: stats;
  align-content: start;
}
.stat {
  background: var(--c-soft);
  border-radius: .8rem;
  padding: .7rem .9rem;
  text-align: center;
}
.stat-label { display: block; font-size: .8rem; font-weight: 500; color: var(--muted); }
.stat-val { display: block; font-size: 1.5rem; font-weight: 700; color: var(--c-title); line-height: 1.3; }
.stat small { color: var(--muted); }
.stat.amount {
  grid-column: 1 / -1;
  background: var(--c);
  padding: .9rem;
}
.stat.amount .stat-label { color: var(--c-text, #fff); opacity: .9; }
.stat.amount .stat-val { color: var(--c-text, #fff); font-size: 2rem; }
.stat.amount small { color: var(--c-text, #fff); opacity: .9; }

.sch-body { padding: .25rem 1.5rem 1.5rem; flex: 1; grid-area: body; }
.sch-body .desc { line-height: 1.8; color: #444; margin-bottom: .8rem; }
.sch-body ul { list-style: none; padding: 0; margin: 0; }
.sch-body li {
  position: relative;
  padding: .35rem 0 .35rem 1.6rem;
  line-height: 1.7;
  border-bottom: 1px dashed var(--line);
}
.sch-body li:last-child { border-bottom: 0; }
.sch-body li::before {
  content: "\F26A"; /* bi-check-circle-fill */
  font-family: "bootstrap-icons";
  position: absolute;
  left: 0;
  top: .35rem;
  color: var(--c-title);
}

/* การ์ดกว้าง (section ที่มีทุนเดียว) */
@media (min-width: 992px) {
  .sch-card.wide {
    display: grid;
    grid-template-columns: 1fr 360px;
    grid-template-areas: "media media" "head stats" "body stats";
    grid-template-rows: auto auto 1fr;
  }
  .sch-card.wide .sch-media { aspect-ratio: auto; height: 300px; }
  .sch-card.wide .sch-stats { background: var(--c-soft); padding: 1.5rem; border-left: 1px solid var(--line); grid-template-columns: 1fr; align-content: center; }
  .sch-card.wide .stat:not(.amount) { background: #fff; }
}
@media (max-width: 991.98px) {
  .sch-media, .sch-head, .sch-stats, .sch-body { grid-area: auto; }
}

/* ===== สนใจสมัคร ===== */
.cta-box {
  margin-top: 3rem;
  background: linear-gradient(135deg, var(--maroon-dark), var(--maroon));
  color: #fff;
  border-left: 8px solid var(--gold);
  border-radius: 1.1rem;
  padding: 1.75rem 1.75rem;
}
.cta-box h2 { font-size: 1.4rem; font-weight: 600; margin: 0 0 .25rem; }
.cta-box p { margin: 0; color: #f0d6d6; }
.cta-box .btn-gold {
  background: var(--gold);
  color: var(--maroon-dark);
  font-weight: 700;
  border-radius: 2rem;
  padding: .5rem 1.5rem;
  border: 0;
}
.cta-box .btn-gold:hover { background: #ffe58f; color: var(--maroon-dark); }
