/* หน้ารายการกิจกรรมและหน้ารายละเอียด ตาม mockup activities-handoff
   ทำไม: สี ระยะ และการ์ดรอบนี้คนละแบบกับ activities.css เดิม จึงแยกไฟล์ */
@font-face {
  font-family: "LINE Seed Sans TH";
  src: url("../fonts/LINESeedSansTH_W_Rg.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "LINE Seed Sans TH";
  src: url("../fonts/LINESeedSansTH_W_Bd.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

/* ===== ฐาน ===== */
/* ไม่ทาพื้นทึบทั้งหน้า ฉากต้นศรีตรัง (bgCB.js) จะได้โผล่เหมือนหน้ากิจกรรมอื่น */

.acts {
  --p: #9e5da5;
  --pd: #7d4485;
  --pl: #f5edf6;
  --ink: #2b2230;
  --mut: #6b6170;
  --ph: #e4e1e6;
  --cap: #7a7480;
  position: relative;
  z-index: 1;
  padding: 40px 24px 80px calc(var(--g, 32px) + 380px);
  color: var(--ink);
  font-family: "LINE Seed Sans TH", system-ui, -apple-system, "Noto Sans Thai", sans-serif;
  font-size: 16px;
  line-height: 1.7;
}

.acts .wrap { max-width: 1240px; margin: 0 auto; }

.acts.is-detail .wrap { max-width: 1100px; }

.acts h1,
.acts h2,
.acts h3 {
  line-height: 1.42;
  font-weight: 700;
  padding-top: .12em;
}

.acts h1 { margin: 0; font-size: 40px; color: var(--pd); }

.acts h2 { margin: 0 0 22px; font-size: 28px; }

.acts a:focus-visible,
.acts button:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
}

.acts .sub { margin: 6px 0 0; color: var(--mut); font-size: 18px; }

.acts .note { margin: 12px 0 0; color: var(--mut); font-size: 14px; }

.acts .note a { color: var(--pd); }

.acts .tag {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 12px;
  background: var(--pl);
  color: var(--pd);
  font-size: 13px;
  line-height: 1.6;
}

.acts .tag.code { background: var(--p); color: #fff; }

.acts .chip {
  display: inline-flex;
  flex-direction: column;
  border-radius: 14px;
  padding: 10px 16px;
  background: var(--pl);
  line-height: 1.5;
}

.acts .chip b { color: var(--pd); font-size: 13px; font-weight: 400; }

.acts .chip span { font-size: 16px; font-weight: 700; }

.acts .media {
  margin: 0;
  overflow: hidden;
  border-radius: 20px;
  background: var(--pl);
  aspect-ratio: 4 / 3;
}

.acts .media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.acts .media figcaption {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  margin: 0;
  color: var(--cap);
  font-size: 15px;
}

.acts .ph {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 20px;
  padding: 12px;
  background: var(--ph);
  color: var(--cap);
  font-size: 15px;
  text-align: center;
}

.acts .ph span {
  border-radius: 999px;
  padding: 6px 14px;
  background: #fff;
}

.acts .num {
  display: inline-flex;
  flex: none;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--p);
  color: #fff;
  font-weight: 700;
}

.acts .rv {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity .6s ease, transform .6s ease;
}

.acts .rv.in { opacity: 1; transform: none; }

/* ===== รายการ ===== */
.acts .filters {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  margin: 28px 0 12px;
}

.acts .fg p { margin: 0 0 6px; color: var(--mut); font-size: 14px; }

.acts .fg-row { display: flex; flex-wrap: wrap; gap: 8px; }

.acts .fg button {
  min-height: 44px;
  border: 0;
  border-radius: 999px;
  padding: 8px 16px;
  background: var(--pl);
  color: var(--pd);
  font: inherit;
  font-size: 16px;
  line-height: 1.5;
  cursor: pointer;
  touch-action: manipulation;
}

.acts .fg button.on { background: var(--p); color: #fff; font-weight: 700; }

.acts .fg button:active,
.acts .btn:active { opacity: .85; }

.acts .count { margin: 0 0 18px; color: var(--mut); font-size: 14px; }

.acts .grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 20px;
}

.acts .card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  background: #faf8fb;
  color: inherit;
  text-decoration: none;
  cursor: pointer;
  touch-action: manipulation;
  transition: transform .25s ease;
}

.acts .card .media { border-radius: 0; }

.acts .card .bd {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 16px 20px 20px;
}

.acts .card h3 { margin: 0; color: var(--ink); font-size: 19px; }

.acts .card p {
  display: -webkit-box;
  overflow: hidden;
  margin: 0;
  color: var(--mut);
  font-size: 16px;
  line-height: 1.7;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
}

.acts .tags,
.acts .meta { display: flex; flex-wrap: wrap; gap: 6px; }

.acts .meta { margin-top: auto; padding-top: 4px; }

.acts .price { color: var(--pd); font-weight: 700; }

.acts .empty { margin: 0; padding: 40px 0; color: var(--mut); }

@media (hover: hover) {
  .acts .card:hover { transform: translateY(-4px); }
}

/* ===== รายละเอียด ===== */
.acts .crumb { margin: 0 0 20px; color: var(--mut); font-size: 14px; }

.acts .crumb a { color: var(--pd); text-decoration: none; }

.acts .hero {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 40px;
  align-items: center;
}

.acts .hero h1 { margin: 14px 0 10px; }

.acts .lead { margin: 0; color: var(--mut); font-size: 18px; }

.acts .chips { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0; }

.acts .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border-radius: 999px;
  padding: 12px 28px;
  background: var(--p);
  color: #fff;
  font-size: 17px;
  font-weight: 700;
  text-decoration: none;
  touch-action: manipulation;
}

.acts .btn:hover { background: var(--pd); }

.acts .block { margin-top: 64px; }

.acts .steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.acts .step .media { margin-bottom: 16px; }

.acts .step h3 {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-size: 19px;
}

.acts .step p { margin: 6px 0 0; padding-left: 48px; color: var(--mut); }

.acts .take {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 32px;
  align-items: center;
  border-radius: 24px;
  padding: 32px;
  background: var(--pl);
}

.acts .take .media { aspect-ratio: 1; }

.acts .take h2 { margin-bottom: 12px; }

.acts .take p { margin: 0; }

.acts .gal {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 180px 180px;
  gap: 14px;
}

.acts .gal .ph:first-child { grid-row: span 2; }

.acts .clip { max-width: 760px; aspect-ratio: 16 / 9; }

.acts .docs { margin-top: 28px; }

/* ===== จอเล็ก ===== */
@media (max-width: 1100px) {
  .acts .grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  .acts { padding: 16px 16px 60px; }

  /* หัวข้อรายการอยู่ขวากล่องโลโก้ การ์ดด้านล่างเลยพ้นโลโก้เอง */
  .acts .page-head { min-height: 140px; padding-left: 72px; }

  /* จอเมนูหด: ชื่อกิจกรรมอยู่ขวาโลโก้ รูปต่อท้าย จะได้ไม่เหลือแถบว่าง */
  .acts.is-detail .crumb { padding-left: 72px; }

  .acts.is-detail .hero { display: flex; flex-direction: column; }

  .acts.is-detail .hero-copy { display: contents; }

  .acts.is-detail .hero-top {
    order: 1;
    min-height: 108px;
    padding-left: 72px;
  }

  .acts.is-detail .hero .media { order: 2; margin-top: 16px; }

  .acts.is-detail .chips,
  .acts.is-detail .btn,
  .acts.is-detail .note { order: 3; }
}

@media (max-width: 700px) {
  .acts .hero,
  .acts .take { grid-template-columns: 1fr; gap: 20px; }

  .acts .take { padding: 20px; }

  .acts h2 { font-size: 24px; }

  .acts .block { margin-top: 44px; }

  .acts .gal {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 200px 120px 120px;
  }

  .acts .gal .ph:first-child { grid-column: span 2; grid-row: auto; }
}

@media (max-width: 640px) {
  .acts h1,
  .acts .hero h1 { font-size: 30px; }

  .acts .grid,
  .acts .steps { grid-template-columns: 1fr; }

  .acts .fg p,
  .acts .count,
  .acts .note,
  .acts .crumb { font-size: 16px; }

  .acts .rv { opacity: 1; transform: none; transition: none; }

  .acts .card:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .acts .rv { opacity: 1; transform: none; transition: none; }

  .acts .card,
  .acts .card:hover { transform: none; transition: none; }
}
