/** @format */

/* theme_hr_cwn — หน้า CodeIgniter (landing, รายวิชา, หน้า student) ตามแบบ lmsgroup.chanwanich.com
 *
 * โหลดผ่าน site_theme_stylesheet_tag() (_libs/moodle/site-theme-util.php) เฉพาะตอนที่
 * $CFG->theme = hr_cwn — ธีมอื่นไม่เห็นไฟล์นี้เลย
 *
 * สีอ่านจากเว็บต้นแบบด้วย getComputedStyle เมื่อ 2026-11-19:
 *   primary  #18632a  ปุ่มหลัก, pill หลักสูตรที่เลือก, ไอคอน
 *   bronze   #85754e  ขอบปุ่ม "ดูทั้งหมด"/ลูกศร carousel, จุด carousel, แถบล่างของ footer, ปุ่มกลับขึ้นบน
 *   cream    #f0deaa  วงโฟกัสของปุ่มขอบ bronze
 *   light    #8dcc71  ปุ่มค้นหาบน hero, ลิงก์เบอร์โทรใน footer
 *   deep     #053a20  ลิงก์อีเมลใน footer
 *
 * กลไก: ทุกที่ในหน้า CI อ้างสีผ่าน var(--brand-*, <ค่าเดิม>) และ landing-theme.css อ้างผ่าน
 * var(--lp-*) ไฟล์นี้จึงแค่ redefine ตัวแปร ส่วนกฎด้านล่างคือสิ่งที่ตัวแปรเปลี่ยนไม่ได้
 * (รูปใน CSS, จุดที่เว็บต้นแบบใช้สีต่างบทบาทจากธีมน้ำเงิน)
 *
 * selector ขึ้นต้นด้วย `html body` ให้ specificity สูงกว่า `body.theme-blue` ของ landing-theme.css
 * เพราะบางหน้าโหลด landing-theme.css หลังไฟล์นี้
 */

:root {
  --brand-primary: #18632a;
  --brand-primary-hover: #134f22;
  --brand-primary-active: #0e3a19;
  --brand-primary-border: #18632a;
  --brand-primary-ring: rgba(24, 99, 42, 0.23);
  --brand-accent: #85754e;
  --brand-deep: #134f22;
  --brand-deeper: #053a20;
  --brand-link: #18632a;
  --brand-link-light: #8dcc71;
}

html body.theme-blue {
  --lp-primary: #18632a;
  --lp-primary-hover: #134f22;
  --lp-primary-active: #0e3a19;
  --lp-primary-border: #18632a;
  --lp-primary-ring: rgba(24, 99, 42, 0.23);
  --lp-primary-ring-soft: rgba(24, 99, 42, 0.15);
  --lp-primary-line: rgba(24, 99, 42, 0.35);
  --lp-accent: #85754e;
  --lp-accent-ring: #f0deaa;
  --lp-link: #18632a;
  --lp-accent-hero: #f0deaa;
  --lp-band: #f0f7fd;
  --lp-band-soft: #f7f9fe;
  --lp-ink: #141414;
  --lp-footer-bg: #444;
  --lp-footer-overlay: transparent;
  --lp-footer-bottom: #85754e;
}

/* ── hero ── */
/* ปุ่มค้นหาเป็นเขียวอ่อน ตัวอักษรขาว (.btn-search ของเว็บต้นแบบ) */
/* (.btn.btn-submit เท่านั้น — กรอบไอคอนแว่นขยายก็มี class btn-submit แต่ไม่ใช่ปุ่ม .btn) */
html body .section-hero .btn.btn-submit,
html body .section-hero .btn.btn-submit:hover,
html body .section-hero .btn.btn-submit:focus,
html body .section-hero .btn.btn-submit:active {
  background: #8dcc71 !important;
  background-color: #8dcc71 !important;
  border-color: #8dcc71 !important;
  color: #fff !important;
}
html body .section-hero .btn.btn-submit:hover,
html body .section-hero .btn.btn-submit:focus-visible {
  box-shadow: 0 0 0 0.25rem rgba(141, 204, 113, 0.23) !important;
}
/* แว่นขยายในช่องค้นหาเป็นเทา ไม่ใช่สีแบรนด์ */
html body .section-hero .frm-search-course .fa-search {
  color: #9e9e9e !important;
}
/* ป้าย "ยกระดับ" ของธีมนี้กว้าง 130 ไม่ใช่ 163 — ปล่อยความกว้างตามสัดส่วนรูป */
html body .new-template-sub-banner {
  width: auto;
}

/* ── โลโก้ navbar: สูง 35 กว้างตามสัดส่วน (markup กำหนด 212x34 ไว้ให้โลโก้ของธีมน้ำเงิน) ── */
html body img[src*="themes/hr_cwn/images/logo.svg"] {
  width: auto;
  height: 35px;
}

/* ── หน้ารายวิชา/ผลการค้นหา: แถบหัวขาวเหมือนเว็บต้นแบบ
   (--lp-band ข้างบนเป็นสีฟ้าอ่อนของแถบวิชายอดนิยม ซึ่งใช้ตัวแปรเดียวกัน) ── */
html body.theme-blue .page-searach-course .hero {
  background-color: #fff !important;
}

/* ── carousel: จุดทั้งหมดเป็น bronze ── */
html body .owl-theme .owl-dots .owl-dot.active span,
html body .owl-theme .owl-dots .owl-dot:hover span,
html body.theme-blue .owl-theme .owl-dots .owl-dot.active span,
html body.theme-blue .owl-theme .owl-dots .owl-dot:hover span {
  background-color: #85754e !important;
}

/* ── แถบสถิติ: ไอคอนของธีมนี้ไม่มีขนาดในไฟล์ (มีแค่ viewBox) จึงกำหนดตามเว็บต้นแบบ ── */
html body .footer-detail img[alt^="sum-"] {
  width: 65px;
  height: 54px;
}

/* ── footer ── */
html body.theme-blue .footer-container .body {
  background-image: url(images/footer-bg.jpg) !important;
}
html body .footer-container a.new-template-color-link,
html body .footer-container .new-template-color-link {
  color: #8dcc71;
}
html body .footer-container a[href^="mailto:"] .new-template-color-link {
  color: #053a20;
}

/* ── ปุ่มกลับขึ้นบน ── */
html body .scroll-to-top a {
  background-color: #85754e !important;
}
