/* ============================================================
   SelfCareThai — bridge: ทำให้ Elementor (Hello theme) แสดงผลเหมือน
   design system เดิมใน sct.css   (โหลดหลัง CSS ของ Elementor)
   ============================================================ */

/* ฟอนต์/สีพื้นฐาน — กัน Elementor Kit ทับ */
body.sct-body{ font-family:var(--f-body); color:var(--ink); background:var(--paper); font-size:17px; line-height:1.75; }
body.sct-body h1, body.sct-body h2, body.sct-body h3, body.sct-body h4,
body.sct-body .elementor-heading-title{ font-family:var(--f-display); font-weight:600; line-height:1.2; color:var(--ink); }
body.sct-body .elementor-widget-text-editor{ font-family:var(--f-body); }
.site-main{ display:block; }

/* Elementor ใส่ระยะห่างใต้ทุก widget 20px — เว็บเดิมใช้ margin ของ p/h2 เอง */
.sct .elementor-widget:not(:last-child){ margin-block-end:0; }
.sct .elementor-widget-text-editor > .elementor-widget-container > :first-child{ margin-top:0; }
.sct .elementor-widget-text-editor > .elementor-widget-container > :last-child{ margin-bottom:0; }

/* หัวข้อ: Elementor บังคับ margin:0 / line-height:1 */
.sct .elementor-heading-title{ line-height:1.2; }
.sct h1.elementor-heading-title{ font-size:clamp(34px, 4.3vw, 58px); letter-spacing:-.01em; margin:.4rem 0 1rem; }
.sct h2.elementor-heading-title{ font-size:clamp(27px, 2.9vw, 40px); margin:1.2rem 0 .8rem; }
.sct h3.elementor-heading-title{ font-size:26px; margin:1.4rem 0 .6rem; }
.sct.prose h2.elementor-heading-title{ margin:2.6rem 0 1rem; }
.sct.prose h3.elementor-heading-title{ margin:2rem 0 .6rem; color:var(--forest-d); }
.sct.prose .elementor-widget-heading:first-child h2.elementor-heading-title{ margin-top:0; }
.sct.article-hero h1.elementor-heading-title{ max-width:26ch; }
.sct.bg-forest .elementor-heading-title{ color:var(--white); }
.sct.bg-forest, .sct.bg-forest .elementor-widget-text-editor{ color:var(--paper); }

/* section / container */
.sct.sct-section{ padding-block:72px; }
.sct.article-hero{ padding:56px 0 28px; }
.sct > .e-con-inner{ padding-inline:24px; }
.sct.prose{ font-size:18px; color:#26333A; }
.sct.prose .elementor-widget-text-editor > .elementor-widget-container > p{ margin:1.3rem 0; }

/* ปุ่ม: ให้ .elementor-button หน้าตาเหมือน .btn เดิม */
.sct .elementor-widget-button .elementor-button{
  display:inline-flex; align-items:center; gap:10px;
  font-family:var(--f-body); font-weight:500; font-size:16px; line-height:1.3;
  padding:13px 26px; border-radius:44px; border:1px solid transparent;
  background:var(--forest); color:var(--paper); fill:currentColor;
  transition:transform .15s, background .2s, box-shadow .2s;
}
.sct .elementor-widget-button .elementor-button:hover{ transform:translateY(-2px); background:var(--forest-d); color:var(--white); box-shadow:var(--shadow-md); }
.sct .btn-amber .elementor-button{ background:var(--amber); color:#2a1c07; }
.sct .btn-amber .elementor-button:hover{ background:var(--amber-d); color:var(--white); }
.sct .btn-ghost .elementor-button{ background:transparent; color:var(--forest-d); border-color:var(--forest); }
.sct .btn-ghost .elementor-button:hover{ background:var(--forest); color:var(--paper); }
.sct.bg-forest .btn-ghost .elementor-button{ color:var(--paper); border-color:rgba(255,255,255,.55); }
.sct .hero-actions{ margin-top:1.6rem; }

/* รูปภาพ / คำบรรยาย */
.sct .elementor-widget-image img{ display:block; height:auto; }
.sct .elementor-widget-image .widget-image-caption{ text-align:left; margin:10px 2px 0; font-size:14.5px; line-height:1.65; color:#5A6B6F; font-style:italic; }
.sct .article-cover{ margin:28px 0 8px; }
.sct .article-cover.photo .elementor-widget-container{ border-radius:var(--radius-lg); overflow:hidden; box-shadow:var(--shadow-sm); background:var(--paper-d); border:1px solid rgba(36,107,120,.18); }
.sct .article-cover.photo img{ width:100%; height:auto; aspect-ratio:16/9; object-fit:cover; }
.sct .board-img{ margin:26px 0 0; }
.sct .board-img img{ width:100%; border-radius:var(--radius-lg); border:1px solid rgba(36,107,120,.18); background:var(--white); box-shadow:var(--shadow-sm); }
.sct .photo-grid-el{ margin:26px 0; }
.sct .photo-grid-el img{ width:100%; height:auto; aspect-ratio:3/2; object-fit:cover; border-radius:var(--radius-lg); border:1px solid rgba(36,107,120,.18); background:var(--paper-d); }
.sct .photo-grid-el .widget-image-caption{ font-size:14px; margin-top:8px; }
.sct .photo-grid-el .imgclip .elementor-widget-container{ overflow:hidden; border-radius:var(--radius-lg); border:1px solid rgba(36,107,120,.18); aspect-ratio:3/2; }
.sct .photo-grid-el .imgclip img{ border:0; border-radius:0; transform:scale(2.4); transform-origin:50% 79%; }
.sct .hero-visual img{ width:100%; height:auto; }

/* กริด 2/3 คอลัมน์ที่แปลงมาเป็น container ซ้อน */
.sct .sct-grid{ align-items:stretch; }
.sct .sct-hero-grid{ align-items:center; }
.sct .sct-grid > .e-con > .e-con-inner, .sct .sct-grid > .e-con{ min-width:0; }
.sct .sct-values .value, .sct .sct-team .member{ height:100%; }

/* Toggle (FAQ) ให้เหมือน details/summary เดิม */
.sct .elementor-toggle .elementor-tab-title{ font-family:var(--f-body); font-weight:600; color:var(--forest-d); border-bottom:1px solid var(--line); padding:14px 0; }
.sct .elementor-toggle .elementor-tab-content{ border:0; padding:6px 0 18px; color:#26333A; }

/* ฟอร์มติดต่อ (Fluent Forms) ให้เข้าชุด */
.sct-form .ff-el-form-control{ font-family:var(--f-body); font-size:16px; border:1px solid var(--line); border-radius:10px; padding:12px 14px; background:var(--white); }
.sct-form .ff-btn-submit{ font-family:var(--f-body); font-weight:500; font-size:16px; padding:13px 26px; border-radius:44px; background:var(--forest)!important; color:var(--paper)!important; border:0; }
.sct-form .ff-btn-submit:hover{ background:var(--forest-d)!important; }
.sct-form .ff-el-input--label label{ font-weight:600; font-size:.92rem; color:var(--forest-d); }

/* WordPress core bits */
.sct img.alignnone, .sct .wp-caption{ max-width:100%; }
.screen-reader-text{ position:absolute!important; clip:rect(1px,1px,1px,1px); width:1px; height:1px; overflow:hidden; }

/* หน้า archive/หมวดหมู่ (Hello theme fallback) */
.sct-archive{ max-width:1440px; margin:0 auto; padding:56px 24px; }
.sct-archive .page-title{ margin:0 0 .4rem; }
.sct-archive .page-description{ color:#4A5B5F; margin:0 0 36px; }

@media (max-width:860px){
  .sct.sct-section{ padding-block:52px; }
  .sct h3.elementor-heading-title{ font-size:22px; }
}

/* grid columns: equal split, no wrap on desktop */
@media (min-width:768px){ .sct .sct-grid > .e-con{ width:auto !important; flex:1 1 0 !important; min-width:0; } }
@media (max-width:767px){ .sct .sct-grid > .e-con{ width:100% !important; flex:0 0 100% !important; } }
