/*
Theme Name:   MovieTV Child
Description:  Child theme ของ Hello Elementor สำหรับ movietv.paplerntour.com — เลย์เอาต์ทำใน Elementor Theme Builder, ข้อมูลอยู่ในปลั๊กอิน movietv-core
Author:       movietv
Template:     hello-elementor
Version:      0.9.3
Requires at least: 6.4
Requires PHP: 8.0
License:      GNU General Public License v3 or later
License URI:  https://www.gnu.org/licenses/gpl-3.0.html
Text Domain:  movietv-child
*/

/*
 * โลก "ป้ายหนังวาดมือหน้าโรง" (surface brief: .impeccable/surfaces/) — สีและฟอนต์หลักมาจาก Elementor Site Settings
 * สีหนึ่งสีหนึ่งหน้าที่: แดง = คำตอบพากย์/ซับ, เหลือง = ทางไปต่อ/ตำแหน่งปัจจุบัน, น้ำเงินหมึก = โครง, ฟ้าป้าย = พื้นป้ายคำตอบ
 */

:root {
	--mt-ink: var(--e-global-color-primary, #13203B);
	--mt-board: var(--e-global-color-secondary, #1A68A6);
	--mt-text: var(--e-global-color-text, #13203B);
	--mt-red: var(--e-global-color-accent, #E2321F);
	--mt-yellow: var(--e-global-color-mtyellow, #F5C21B);
	--mt-paper: #FFFFFF;
	--mt-muted: #4A5568;
	--mt-board-text: #DCEBF8;
	--mt-display: var(--e-global-typography-primary-font-family, "Chonburi"), "Sarabun", serif;
	--mt-body: var(--e-global-typography-text-font-family, "Sarabun"), "Noto Sans Thai", sans-serif;
	--mt-gutter: 16px;
	--mt-measure: 68ch;
	--mt-frame: 1120px;
	--mt-ease: cubic-bezier(.16, 1, .3, 1);
}

/* ---------- ผิวเบราว์เซอร์ — footer ชิดล่างเสมอแม้หน้าสั้น */
body {
	min-height: 100dvh;
	display: flex;
	flex-direction: column;
	font-family: var(--mt-body);
	color: var(--mt-text);
	-webkit-font-smoothing: antialiased;
}
::selection { background: var(--mt-yellow); color: var(--mt-ink); }
:focus-visible { outline: 3px solid var(--mt-yellow); outline-offset: 2px; box-shadow: 0 0 0 6px var(--mt-ink); }
a { text-underline-offset: .2em; text-decoration-thickness: .08em; }

/* ---------- หัวป้าย (Elementor header: container ใส่ class mt-mast) */
.mt-mast {
	background: var(--mt-ink);
	border-bottom: 6px solid var(--mt-yellow);
}
.mt-mast,
.mt-mast .movietv-credit { color: var(--mt-paper); }
.mt-mast .mt-brand .elementor-heading-title,
.mt-mast .mt-brand .elementor-heading-title a {
	font-family: var(--mt-display);
	font-weight: 400;
	font-size: clamp(17px, 4.6vw, 22px);
	line-height: 1.3;
	color: var(--mt-yellow);
	text-decoration: none;
}
.mt-mast .mt-nav .elementor-nav-menu--main .elementor-item {
	color: var(--mt-paper);
	font-family: var(--mt-body);
	font-size: 16px;
	font-weight: 700;
	padding: 6px 12px;
	text-decoration: none;
	transition: background-color .3s var(--mt-ease), color .3s var(--mt-ease);
}
.mt-mast .mt-nav .elementor-nav-menu--main .elementor-item:hover { color: var(--mt-yellow); }
/* แถบเหลืองบอกตำแหน่งปัจจุบัน */
.mt-mast .mt-nav .elementor-nav-menu--main .elementor-item.elementor-item-active,
.single-amy_tvshow .mt-mast .mt-nav .menu-item-type-post_type_archive > .elementor-item {
	background: var(--mt-yellow);
	color: var(--mt-ink);
}
.mt-foot .mt-brand .elementor-heading-title { font-size: 18px; }

/* ---------- ป้ายคำตอบ [movietv_board] */
.mt-board {
	background: var(--mt-board);
	color: var(--mt-paper);
	padding: 16px var(--mt-gutter) 22px;
	border-bottom: 8px solid var(--mt-ink);
}
.mt-board > * { max-width: var(--mt-frame); margin-inline: auto; }
.mt-crumb { font-size: 13px; font-weight: 600; color: var(--mt-board-text); }
/* padding แนวตั้งบน inline ขยายพื้นที่กดให้ถึง 24px (WCAG 2.5.8) โดยไม่ดันบรรทัด */
.mt-crumb a { color: inherit; padding-block: 4px; }
.mt-title {
	font-family: var(--mt-display);
	font-weight: 400;
	font-size: clamp(44px, 14vw, 96px);
	line-height: 1.02;
	letter-spacing: -.01em;
	color: var(--mt-yellow);
	margin-top: 6px;
	margin-bottom: 0;
	-webkit-text-stroke: .045em var(--mt-ink);
	paint-order: stroke fill;
	text-shadow: .05em .05em 0 var(--mt-ink), .09em .09em 0 var(--mt-red);
	text-wrap: balance;
	overflow-wrap: anywhere;
}
.mt-title-th {
	font-family: var(--mt-display);
	font-size: clamp(18px, 5vw, 26px);
	color: var(--mt-paper);
	margin: 4px 0 0;
}
.mt-meta {
	list-style: none;
	display: flex;
	flex-wrap: wrap;
	gap: 0 .6em;
	padding: 0;
	margin-top: 10px;
	margin-bottom: 0;
	font-size: 15px;
	font-weight: 600;
}
.mt-meta li:not(:last-child)::after { content: "·"; margin-left: .6em; color: var(--mt-board-text); }

.mt-answers {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-top: 16px;
}
.mt-plate {
	display: flex;
	flex-direction: column;
	gap: 2px;
	padding: 10px 12px 12px;
	background: var(--mt-paper);
	color: var(--mt-ink);
	border: 3px solid var(--mt-ink);
	min-height: 78px;
}
.mt-plate__label { font-size: 13px; font-weight: 600; }
.mt-plate__value {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 6px;
	font-family: var(--mt-display);
	font-size: 26px;
	line-height: 1.15;
}
.mt-mark { width: 26px; height: 26px; flex: none; }

/* มี: ป้ายทึบ ตัวแดง เครื่องหมายติ๊กในช่องแดง */
.mt-plate--yes .mt-plate__value { color: var(--mt-red); }
.mt-plate--yes .mt-mark { background: var(--mt-red); color: var(--mt-paper); padding: 3px; }
/* ไม่มี: ขีดฆ่า ตัวหมึก */
.mt-plate--no .mt-plate__value { color: var(--mt-ink); }
.mt-plate--no .mt-mark { color: var(--mt-red); }
/* ยังไม่ตรวจ: กรอบเส้นประบนพื้นป้าย ตัวบาง ไม่มีเครื่องหมาย */
.mt-plate--unknown {
	background: transparent;
	color: var(--mt-paper);
	border: 3px dashed var(--mt-board-text);
}
.mt-plate--unknown .mt-plate__value {
	font-family: var(--mt-body);
	font-weight: 400;
	font-size: 20px;
}

/* ดูได้ที่: แผ่นเหลืองเต็มแถว = ทางไปต่อ */
.mt-plate--where {
	position: relative;
	grid-column: 1 / -1;
	background: var(--mt-yellow);
	min-height: 0;
	transition: background-color .3s var(--mt-ease);
}
.mt-plate--where.mt-plate--unknown { background: transparent; }
.mt-plate--where .mt-plate__value a {
	color: var(--mt-ink);
	text-decoration: underline;
	text-decoration-thickness: 3px;
	text-underline-offset: 5px;
	transition: text-decoration-thickness .3s var(--mt-ease);
}
.mt-plate--where .mt-plate__value a:hover { text-decoration-thickness: 5px; }
/* แพลตฟอร์มเดียว: ทั้งแผ่นเป็นปุ่ม (ลิงก์ขยายเต็มแผ่น) */
.mt-plate--where:has(.mt-plate__value a:only-of-type) .mt-plate__value a::after { content: ""; position: absolute; inset: 0; }
.mt-plate--where:has(a:only-of-type):hover { background: #FFD23F; }
.mt-plate__more { font-size: 14px; font-weight: 600; }
.mt-sep { color: var(--mt-ink); }

/* ---------- โปสเตอร์ + ข้อมูล [movietv_facts] */
.mt-sheet {
	display: grid;
	grid-template-columns: minmax(104px, 34%) 1fr;
	gap: 16px;
	align-items: start;
	max-width: calc(var(--mt-frame) + 2 * var(--mt-gutter));
	margin: 0 auto;
	padding: 18px var(--mt-gutter);
}
.mt-poster { margin: 0; border: 6px solid var(--mt-ink); background: var(--mt-ink); }
.mt-poster img { display: block; width: 100%; height: auto; border: 3px solid var(--mt-paper); }
.mt-facts { margin: 0; display: grid; gap: 10px; font-size: 16px; }
.mt-facts dt { font-size: 13px; font-weight: 600; color: var(--mt-muted); }
.mt-facts dd { margin: 0; font-weight: 700; line-height: 1.6; }
.mt-facts a {
	color: var(--mt-ink);
	padding-block: 2px; /* พื้นที่กด ≥ 24px; line-height 1.6 กันชนบรรทัดถัดไป */
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: .22em;
	transition: text-decoration-thickness .3s var(--mt-ease);
}
.mt-facts a:hover { text-decoration-thickness: 3px; }

/* ---------- โฆษณา [movietv_ad] (บล็อก 2 in-article responsive) — จองความสูงกัน CLS
 * ใต้ป้ายคำตอบหน้าเรื่อง และกลางบทความ 1 จุด เท่านั้น; ป้าย "โฆษณา" บอกผู้อ่านตรง ๆ */
.elementor .e-con.mt-adbox { --width: 100%; }
.mt-ad {
	display: block;
	min-height: 280px;
	max-width: calc(var(--mt-frame) + 2 * var(--mt-gutter));
	margin: 12px auto;
	padding: 0 var(--mt-gutter);
	text-align: center;
}
.mt-ad__label { display: block; margin-bottom: 4px; font-size: 13px; font-weight: 600; color: var(--mt-muted); text-align: left; }
.mt-ad__dev { display: grid; place-items: center; min-height: 250px; border: 2px dashed var(--mt-muted); color: var(--mt-muted); font-size: 15px; }
.mt-article-body .mt-ad { padding: 0; margin: 24px 0; }
@media (min-width: 768px) { .mt-ad { min-height: 250px; } .mt-ad__dev { min-height: 220px; } }

/* ---------- คอลัมน์อ่าน (class mt-read บน container ของเรื่องย่อ)
 * กรอบกว้างเท่าป้าย ขอบซ้ายตรงกับป้าย, ตัวคอลัมน์ไม่เกิน 68ch */
.elementor .e-con.mt-read {
	--width: 100%;
	max-width: calc(var(--mt-frame) + 2 * var(--mt-gutter));
	margin-inline: auto;
	padding: 8px var(--mt-gutter) 24px;
	font-size: 17px;
	line-height: 1.8;
}
.elementor .e-con.mt-read > .elementor-widget.elementor-widget-heading,
.elementor .e-con.mt-read > .elementor-widget.elementor-widget-theme-post-content { max-width: var(--mt-measure); }
.mt-read .mt-section-title .elementor-heading-title { margin-top: 8px; }
.mt-read h2,
.mt-section-title .elementor-heading-title {
	font-family: var(--mt-display);
	font-weight: 400;
	font-size: clamp(22px, 6vw, 30px);
	line-height: 1.25;
	color: var(--mt-ink);
	margin: 28px 0 8px;
}
.mt-read a { color: var(--mt-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; }
.mt-read a:hover { text-decoration-thickness: 3px; }

/* ---------- trailer [movietv_trailer] */
.mt-trailer,
.mt-share {
	max-width: calc(var(--mt-frame) + 2 * var(--mt-gutter));
	margin: 8px auto 0;
	padding: 0 var(--mt-gutter);
}
.mt-trailer > * { max-width: 760px; }
.mt-trailer__play {
	position: relative;
	display: block;
	width: 100%;
	aspect-ratio: 16 / 9;
	padding: 0;
	border: 6px solid var(--mt-ink);
	background: var(--mt-ink);
	cursor: pointer;
	overflow: hidden;
}
.mt-trailer__play img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .6s var(--mt-ease), filter .6s var(--mt-ease); }
.mt-trailer__play:hover img { transform: scale(1.03); filter: saturate(1.15); }
.mt-trailer__label {
	position: absolute;
	left: 12px;
	top: 12px;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px 6px 10px;
	background: var(--mt-yellow);
	color: var(--mt-ink);
	border: 3px solid var(--mt-ink);
	font-family: var(--mt-display);
	font-size: 20px;
}
.mt-trailer__label::before {
	content: "";
	width: 0;
	height: 0;
	border-left: 14px solid var(--mt-ink);
	border-top: 9px solid transparent;
	border-bottom: 9px solid transparent;
}
.mt-trailer__frame { width: 100%; aspect-ratio: 16 / 9; border: 6px solid var(--mt-ink); display: block; }

/* ---------- แชร์ [movietv_share] */
.mt-share { margin-top: 16px; margin-bottom: 32px; display: flex; align-items: center; gap: 12px; }
.mt-share__button {
	font-family: var(--mt-body);
	font-weight: 700;
	font-size: 16px;
	padding: 10px 18px;
	background: var(--mt-paper);
	color: var(--mt-ink);
	border: 3px solid var(--mt-ink);
	cursor: pointer;
	transition: background-color .3s var(--mt-ease);
}
/* ทับ reset ของ Hello Elementor (button:hover/:focus เป็นพื้น #c36 ตัวขาว, มุมโค้ง 3px) */
.mt-share__button,
.mt-share__button:focus { background: var(--mt-paper); color: var(--mt-ink); border-radius: 0; }
.mt-share__button:hover,
.mt-share__button:focus-visible { background: var(--mt-yellow); color: var(--mt-ink); }
.mt-trailer__play,
.mt-trailer__play:hover,
.mt-trailer__play:focus { background: var(--mt-ink); color: var(--mt-ink); border-radius: 0; }
.mt-share__status { font-size: 14px; color: var(--mt-muted); }

/* ================================================================ รายการซีรีส์ [movietv_series_list]
 * "ป้ายเรียงริมถนน": ทุกเรื่องคือแถวป้ายเต็มกว้าง, เรื่องมาแรงเป็นป้ายฟ้า (surface brief ของ series-list) */
.elementor .e-con.mt-list { --width: 100%; }
.mt-list-head {
	max-width: calc(var(--mt-frame) + 2 * var(--mt-gutter));
	margin-inline: auto;
	padding: 16px var(--mt-gutter) 12px;
}

.mt-list-title {
	font-family: var(--mt-display);
	font-weight: 400;
	font-size: clamp(36px, 10vw, 64px);
	line-height: 1.1;
	color: var(--mt-ink);
	margin: 0;
	text-wrap: balance;
}
.mt-list-count { font-size: 15px; font-weight: 600; color: var(--mt-muted); margin: 4px 0 0; }

/* ตัวกรอง: แผ่นขอบหมึก ตัวที่เลือกพื้นเหลือง (ทางไปต่อ/ตำแหน่งปัจจุบัน) — ขึ้นบรรทัดใหม่บนจอแคบ ไม่ซ่อนตัวกรองไว้นอกจอ */
.mt-filters { margin-top: 12px; }
.mt-filters ul {
	list-style: none;
	display: flex;
	gap: 8px;
	margin: 0;
	padding: 0;
	flex-wrap: wrap;
}
.mt-filters li { flex: none; }
.mt-filter {
	display: inline-flex;
	align-items: baseline;
	gap: 6px;
	padding: 6px 12px;
	border: 3px solid var(--mt-ink);
	background: var(--mt-paper);
	color: var(--mt-ink);
	font-weight: 700;
	font-size: 15px;
	text-decoration: none;
	text-decoration-thickness: 3px;
	text-underline-offset: 4px;
}
.mt-filter:hover { color: var(--mt-ink); text-decoration-line: underline; }
.mt-filter.is-on { background: var(--mt-yellow); }
.mt-filter__count { font-weight: 600; color: var(--mt-muted); font-variant-numeric: tabular-nums; }
.mt-filter.is-on .mt-filter__count { color: var(--mt-ink); }

/* แถวป้าย */
.mt-rows {
	list-style: none;
	margin: 0;
	padding: 0;
	border-top: 6px solid var(--mt-ink);
}
.mt-row {
	position: relative;
	border-bottom: 3px solid var(--mt-ink);
	background: var(--mt-paper);
	transition: background-color .3s var(--mt-ease);
}
.mt-row > * { position: relative; }
.mt-row__poster,
.mt-row__body { position: static; }
.mt-row {
	display: grid;
	grid-template-columns: 72px minmax(0, 1fr);
	gap: 14px;
	padding: 14px max(var(--mt-gutter), calc((100% - var(--mt-frame)) / 2));
}
.mt-row:hover .mt-row__title a { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.mt-row__poster { border: 4px solid var(--mt-ink); background: var(--mt-ink); align-self: start; aspect-ratio: 2 / 3; overflow: hidden; }
.mt-row__poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.mt-row__title {
	font-family: var(--mt-display);
	font-weight: 400;
	font-size: clamp(22px, 6.4vw, 32px);
	line-height: 1.15;
	margin: 0;
	overflow-wrap: anywhere;
}
.mt-row__title a { color: var(--mt-ink); text-decoration: none; }
/* ทั้งแถวกดได้: ลิงก์ชื่อขยายเต็มแถว */
.mt-row__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.mt-row__title a:focus-visible { outline: none; box-shadow: none; }
.mt-row:has(.mt-row__title a:focus-visible) { outline: 3px solid var(--mt-yellow); outline-offset: -6px; box-shadow: inset 0 0 0 9px var(--mt-ink); }
.mt-row__meta { font-size: 15px; font-weight: 600; margin: 2px 0 0; color: var(--mt-muted); }
.mt-row__tags { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; font-size: 15px; }
.mt-chip {
	background: var(--mt-yellow);
	color: var(--mt-ink);
	border: 2px solid var(--mt-ink);
	padding: 0 8px;
	font-weight: 700;
}
.mt-dub { display: inline-flex; align-items: center; gap: 4px; padding: 0 8px; border: 2px solid var(--mt-ink); font-weight: 700; }
.mt-dub .mt-mark { width: 16px; height: 16px; }
.mt-dub--yes { color: var(--mt-red); }
.mt-dub--yes .mt-mark { background: var(--mt-red); color: var(--mt-paper); padding: 2px; }
.mt-dub--no .mt-mark { color: var(--mt-red); }
.mt-dub--unknown { border-style: dashed; font-weight: 400; color: var(--mt-muted); border-color: currentColor; }

/* มาแรง: ป้ายฟ้า ชื่อตัววาดเหลืองขอบหมึก */
.mt-row--hot { background: var(--mt-board); color: var(--mt-paper); }
.mt-row--hot .mt-row__title a {
	color: var(--mt-yellow);
	-webkit-text-stroke: .05em var(--mt-ink);
	paint-order: stroke fill;
}
.mt-row--hot .mt-row__meta { color: var(--mt-board-text); }
.mt-row--hot .mt-dub--unknown { color: var(--mt-board-text); }

/* ว่าง / แบ่งหน้า */
.mt-empty {
	max-width: none;
	margin: 0;
	padding: 24px max(var(--mt-gutter), calc((100% - var(--mt-frame)) / 2)) 40px;
	border-top: 6px solid var(--mt-ink);
	font-size: 17px;
	line-height: 1.7;
}
.mt-empty p { max-width: var(--mt-measure); margin: 0 0 16px; }
.mt-pages { max-width: calc(var(--mt-frame) + 2 * var(--mt-gutter)); margin: 0 auto; padding: 20px var(--mt-gutter) 32px; }
.mt-pages ul { list-style: none; display: flex; gap: 8px; margin: 0; padding: 0; }
.mt-pages a,
.mt-pages span { display: inline-block; padding: 6px 12px; border: 3px solid var(--mt-ink); color: var(--mt-ink); font-weight: 700; text-decoration: none; }
.mt-pages .current { background: var(--mt-yellow); }

@media (min-width: 768px) {
	.mt-row { grid-template-columns: 96px minmax(0, 1fr); gap: 24px; padding-block: 18px; }
}
/* จอกว้าง: ชิปแพลตฟอร์ม/พากย์ไทยย้ายไปคอลัมน์ขวาของแถว ไม่ปล่อยครึ่งขวาว่าง */
@media (min-width: 1024px) {
	.mt-row__body { display: grid; grid-template-columns: minmax(0, 560px) 260px; column-gap: 48px; align-content: center; }
	.mt-row__body > * { grid-column: 1; }
	.mt-row__body > .mt-row__tags { grid-column: 2; grid-row: 1 / span 3; align-self: center; justify-content: flex-start; margin: 0; font-size: 15px; }
	.mt-row__title { font-size: 34px; }
	.mt-list-head { padding-top: 28px; }
}

.elementor-location-archive,
.elementor-location-single,
.home .site-main,
.home main,
.page .site-main,
.page main { flex: 1 0 auto; }

/* ================================================================ หน้าแรก [movietv_home]
 * ป้ายใหญ่เรื่องเด่น (ใช้ป้ายคำตอบเดียวกับหน้าซีรีส์) + แถวป้ายเล็ก + บทความ (surface brief ของ home) */
.elementor .e-con.mt-homebox { --width: 100%; }
.home .mt-mast:not(.mt-foot) { border-bottom: 0; }
.mt-home-h1 { background: var(--mt-ink); border-bottom: 6px solid var(--mt-yellow); }
.mt-home-h1 h1 {
	max-width: calc(var(--mt-frame) + 2 * var(--mt-gutter));
	margin: 0 auto;
	padding: 0 var(--mt-gutter) 10px;
	font-family: var(--mt-body);
	font-size: 15px;
	font-weight: 600;
	line-height: 1.5;
	color: var(--mt-board-text);
}
/* ชื่อเรื่องเด่นเป็นลิงก์: คงตัววาดเหลืองขอบหมึก */
.mt-title a { color: inherit; text-decoration: none; }
.mt-title a:hover { text-decoration: underline; text-decoration-thickness: .06em; text-underline-offset: .12em; }

.mt-section-heading {
	font-family: var(--mt-display);
	font-weight: 400;
	font-size: clamp(22px, 6vw, 30px);
	line-height: 1.25;
	color: var(--mt-ink);
	margin: 0;
}

/* แถวป้ายเล็ก: เลื่อนข้างบนจอแคบ (เห็น 2.5 ใบ), กริด 4 ช่องบนจอกว้าง */
.mt-rail {
	max-width: calc(var(--mt-frame) + 2 * var(--mt-gutter));
	margin: 0 auto;
	padding: 20px 0 8px;
}
.mt-rail__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 0 var(--mt-gutter) 12px;
}
.mt-rail__list {
	list-style: none;
	display: grid;
	grid-auto-flow: column;
	grid-auto-columns: 37%;
	gap: 14px;
	margin: 0;
	padding: 0 var(--mt-gutter) 12px;
	overflow-x: auto;
	scroll-snap-type: x mandatory;
	scroll-padding-inline: var(--mt-gutter);
	scrollbar-width: thin;
	scrollbar-color: var(--mt-ink) transparent;
}
.mt-card { position: relative; scroll-snap-align: start; }
.mt-card__poster { border: 4px solid var(--mt-ink); background: var(--mt-ink); aspect-ratio: 2 / 3; overflow: hidden; }
.mt-card__poster img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--mt-ease); }
.mt-card:hover .mt-card__poster img { transform: scale(1.03); }
.mt-card__title { font-family: var(--mt-body); font-weight: 700; font-size: 16px; line-height: 1.35; margin: 8px 0 6px; }
.mt-card__title a { color: var(--mt-ink); text-decoration: none; }
.mt-card__title a::after { content: ""; position: absolute; inset: 0; }
.mt-card:hover .mt-card__title a { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }
.mt-card:has(.mt-card__title a:focus-visible) { outline: 3px solid var(--mt-yellow); outline-offset: 3px; box-shadow: 0 0 0 9px var(--mt-ink); }
.mt-card__title a:focus-visible { outline: none; box-shadow: none; }
.mt-card .mt-chip { font-size: 15px; }
/* ทางไปต่อ = พื้นเหลือง (ไม่ใช่ตัวกรองที่ถูกเลือก จึงไม่มี aria-current) */
.mt-rail__head .mt-filter { background: var(--mt-yellow); }

/* ป้ายเรื่องเด่นมีโปสเตอร์ในกรอบคู่ (หมึก 6 + ขาว 3) เฉพาะจอกว้าง */
.mt-board__poster { display: none; }
@media (min-width: 1024px) {
	.mt-board--poster {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 200px;
		column-gap: 48px;
		padding-inline: max(var(--mt-gutter), calc((100% - var(--mt-frame)) / 2));
	}
	.mt-board--poster > * { grid-column: 1; max-width: none; margin-inline: 0; }
	.mt-board--poster > .mt-board__poster {
		display: block;
		grid-column: 2;
		grid-row: 1 / span 4;
		align-self: start;
		margin: 0;
		border: 6px solid var(--mt-ink);
		background: var(--mt-ink);
	}
	.mt-board__poster img { display: block; width: 100%; height: auto; border: 3px solid var(--mt-paper); }
}

/* บทความ: แถวกฎหมึกแบบรายการซีรีส์ พร้อมวันที่เผยแพร่จริง */
.mt-articles {
	max-width: calc(var(--mt-frame) + 2 * var(--mt-gutter));
	margin: 0 auto;
	padding: 24px var(--mt-gutter) 40px;
}
.mt-articles .mt-section-heading { padding-bottom: 12px; border-bottom: 6px solid var(--mt-ink); }
.mt-articles__list { list-style: none; margin: 0; padding: 0; }
.mt-article { position: relative; padding: 14px 0; border-bottom: 3px solid var(--mt-ink); }
.mt-article__title { font-family: var(--mt-display); font-weight: 400; font-size: clamp(20px, 5.4vw, 26px); line-height: 1.3; margin: 0; }
.mt-article__title a { color: var(--mt-ink); text-decoration: none; }
.mt-article__title a::after { content: ""; position: absolute; inset: 0; }
.mt-article:hover .mt-article__title a { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 6px; }
.mt-article__date { margin: 4px 0 0; font-size: 15px; font-weight: 600; color: var(--mt-muted); }

@media (min-width: 768px) {
	/* ป้ายเล็กยังเล็กกว่าป้ายเรื่องเด่น ไม่กลายเป็นกริดการ์ดเท่ากันเต็มกว้าง */
	.mt-rail__list { grid-auto-flow: row; grid-template-columns: repeat(4, minmax(0, 176px)); overflow: visible; }
	.mt-rail { padding-top: 32px; }
}

/* ================================================================ บทความ (single post) + รายการข่าว
 * "อ่านง่ายเหมือนเว็บข่าว" (เจ้าของกำหนด 2026-11-27): หัวบทความพื้นขาว, คอลัมน์ 68ch, โลกป้ายอยู่ที่หัวเว็บและแถวป้ายท้ายบทความ */
.single-post .mt-mast .mt-nav .menu-item-type-taxonomy > .elementor-item,
.category .mt-mast .mt-nav .menu-item-type-taxonomy > .elementor-item { background: var(--mt-yellow); color: var(--mt-ink); }
.mt-article-head { padding-top: 16px; }
.mt-article-head .mt-crumb { color: var(--mt-muted); }
.mt-article-head__title {
	font-family: var(--mt-display);
	font-weight: 400;
	font-size: clamp(30px, 8.4vw, 48px);
	line-height: 1.2;
	color: var(--mt-ink);
	margin: 6px 0 8px;
	text-wrap: balance;
}
.mt-article-head__dates { margin: 0; padding-bottom: 12px; border-bottom: 6px solid var(--mt-ink); font-size: 15px; font-weight: 600; color: var(--mt-muted); }
/* บทความเก่า: เส้นประเหมือน "ยังไม่ตรวจ" = ข้อมูลที่อาจไม่ตรงแล้ว */
.mt-stale { max-width: var(--mt-measure); margin: 14px 0 4px; padding: 8px 12px; border: 2px dashed var(--mt-muted); font-size: 15px; line-height: 1.6; color: var(--mt-muted); }

/* เนื้อหาเดิมที่สร้างด้วย Elementor: ถอดความกว้าง/สไตล์เดิม ให้อยู่ในคอลัมน์อ่าน */
.mt-article-body .elementor-section .elementor-container,
.mt-article-body .e-con,
.mt-article-body .elementor-column { max-width: none; width: 100%; }
.mt-article-body .elementor-section,
.mt-article-body .elementor-column > .elementor-widget-wrap,
.mt-article-body .elementor-widget-theme-post-content .e-con { padding: 0 !important; margin: 0 !important; } /* ขอบซ้ายเนื้อหาเดิมตรงกับ H1 */
.mt-article-body .elementor-widget-text-editor,
.mt-article-body .elementor-widget-text-editor p { font-family: var(--mt-body) !important; font-size: 17px !important; line-height: 1.8 !important; color: var(--mt-text) !important; }
.mt-article-body .elementor-widget-theme-post-content .elementor-heading-title,
.mt-article-body .elementor-widget-theme-post-content h2,
.mt-article-body .elementor-widget-theme-post-content h3,
.mt-article-body .elementor-widget-theme-post-content :is(h2, h3, h4):not(li *) {
	/* !important: ทับสไตล์รายชิ้นที่ Elementor เขียนไว้ในเนื้อหาเดิม (specificity สูงกว่า) */
	font-family: var(--mt-display) !important;
	font-weight: 400 !important;
	font-size: clamp(22px, 6vw, 30px) !important;
	line-height: 1.3 !important;
	color: var(--mt-ink) !important;
	margin: 28px 0 10px;
	text-align: left;
}
.mt-article-body .elementor-widget-image img { display: block; width: 100%; max-width: 100%; height: auto; border: 4px solid var(--mt-ink); background: var(--mt-ink); margin: 8px 0; }
/* สีของเนื้อหาเดิม (inline/ต่อชิ้น) ไม่ตรงโลก — ตัวอักษรทั้งหมดเป็นสีตัวอักษร ลิงก์เป็นหมึกขีดเส้นใต้ */
.mt-article-body .elementor-widget-theme-post-content :is(p, span, li, div, strong, b, em):not(.mt-ad, .mt-ad *) { color: var(--mt-text) !important; } /* ไม่ทับป้าย "โฆษณา" */
.mt-article-body .elementor-widget-theme-post-content .elementor-icon-list-text { font-size: 17px !important; }
.mt-article-body .elementor-widget-theme-post-content .elementor-widget-container,
.mt-article-body .elementor-widget-theme-post-content .elementor-widget-text-editor { padding-inline: 0 !important; margin-inline: 0 !important; }
.mt-article-body .elementor-widget-divider,
.mt-article-body .elementor-widget-share-buttons { display: none; } /* ปุ่มแชร์เดิมถูกตัดลิงก์ทิ้งที่ PHP แล้ว เหลือกรอบว่าง */
.mt-article-body .elementor-widget-theme-post-content a,
.mt-article-body .elementor-widget-theme-post-content a * { color: var(--mt-ink) !important; text-decoration: underline !important; text-decoration-thickness: 1px !important; text-underline-offset: .22em; font-size: inherit !important; }

/* ท้ายบทความ: ซีรีส์ในบทความนี้ = แถวป้ายแบบหน้ารายการ */
.elementor .e-con.mt-article-end { --width: 100%; }
.mt-article-series { padding-top: 32px; }
.mt-article-series .mt-section-heading { max-width: calc(var(--mt-frame) + 2 * var(--mt-gutter)); margin: 0 auto; padding: 0 var(--mt-gutter) 12px; }

/* รายการข่าว: แถวบทความ + คำโปรย */
/* เส้นหมึก 6px เริ่ม-จบตรงกับเส้นแถว (อยู่ในขอบ gutter) */
.mt-news { list-style: none; margin: 0 max(var(--mt-gutter), calc((100% - var(--mt-frame)) / 2)) 40px; padding: 0; border-top: 6px solid var(--mt-ink); }
.mt-article__excerpt { margin: 6px 0 0; max-width: var(--mt-measure); font-size: 17px; line-height: 1.7; }

/* ================================================================ ค้นหา + 404 (ต่อยอดส่วนประกอบเดิม, surface brief ของ search)
 * ช่องค้นหา: input ขอบหมึก 3px + ปุ่มเหลือง (ทางไปต่อ); ผล = street rows / article rows; ว่าง/404 = แผ่นทางไปต่อ */
.page-template-default.page .mt-mast .mt-nav .current-menu-item > .elementor-item,
.search .mt-mast .mt-nav .menu-item-object-page > .elementor-item { background: var(--mt-yellow); color: var(--mt-ink); }
.mt-search { margin-top: 14px; max-width: var(--mt-measure); }
.mt-search__label { display: block; font-size: 15px; font-weight: 600; color: var(--mt-muted); margin-bottom: 6px; }
.mt-search__row { display: flex; gap: 8px; }
.mt-search .mt-search__row input.mt-search__input {
	flex: 1;
	min-width: 0;
	font-family: var(--mt-body);
	font-size: 17px;
	padding: 10px 12px;
	border: 3px solid var(--mt-ink);
	border-radius: 0;
	background: var(--mt-paper);
	color: var(--mt-ink);
}
.mt-search__input::placeholder { color: var(--mt-muted); }
.mt-search__input:focus { outline: 3px solid var(--mt-yellow); outline-offset: 2px; box-shadow: 0 0 0 6px var(--mt-ink); border-color: var(--mt-ink); }
.mt-search__button,
.mt-search__button:focus,
.mt-search__button:hover {
	font-family: var(--mt-body);
	font-weight: 700;
	font-size: 17px;
	padding: 10px 18px;
	background: var(--mt-yellow);
	color: var(--mt-ink);
	border: 3px solid var(--mt-ink);
	border-radius: 0;
	cursor: pointer;
}
.mt-search__button:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }
.mt-search ~ * { margin-top: 0; }
.mt-list-head:has(.mt-search) { padding-bottom: 20px; }
.mt-list-head .mt-list-count { text-wrap: pretty; }
/* ทางไปต่อ (ว่าง/404) */
.mt-way { margin: 0 max(var(--mt-gutter), calc((100% - var(--mt-frame)) / 2)); padding: 20px 0 40px; border-top: 6px solid var(--mt-ink); }
.mt-way ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.mt-filter--go { background: var(--mt-yellow); }

/* ================================================================ เรื่องที่เกี่ยวข้อง [movietv_related]
 * แถวป้ายเล็กท้ายหน้าเรื่อง (ใช้ rail เดียวกับหน้าแรก) — เส้นหมึก 6px แยกจากเนื้อหาด้านบน อยู่ในกรอบเดียวกับป้าย */
.elementor .e-con.mt-relatedbox { --width: 100%; }
.mt-related { margin-top: 24px; padding-bottom: 32px; }
.mt-related .mt-rail__head { margin: 0 max(var(--mt-gutter), calc((100% - var(--mt-frame)) / 2)); padding: 16px 0 12px; border-top: 6px solid var(--mt-ink); }

/* ================================================================ เกี่ยวกับเรา + ติดต่อ (surface brief: movietv-child-about-contact)
 * หน้าเงียบแบบเว็บข่าว: หัวหน้าแบบ list head + เส้นหมึก 6px, คอลัมน์อ่าน 68ch, ฟอร์มใช้ภาษาเดียวกับช่องค้นหา */
.elementor .e-con.mt-pagehead {
	--width: 100%;
	max-width: calc(var(--mt-frame) + 2 * var(--mt-gutter));
	margin-inline: auto;
	padding: 16px var(--mt-gutter) 0;
}
.mt-page-title .elementor-heading-title {
	font-family: var(--mt-display);
	font-weight: 400;
	font-size: clamp(36px, 10vw, 64px);
	line-height: 1.1;
	color: var(--mt-ink);
	text-wrap: balance;
}
.mt-page-lead,
.mt-page-lead p { margin: 4px 0 0; font-family: var(--mt-body); font-size: 15px; font-weight: 600; line-height: 1.6; color: var(--mt-muted); text-wrap: pretty; }
.mt-page-lead { max-width: var(--mt-measure); padding-bottom: 14px; border-bottom: 6px solid var(--mt-ink); }
.elementor .e-con.mt-pagehead > .mt-page-lead { max-width: none; }
.mt-page-lead p { max-width: var(--mt-measure); }
.mt-page-body { padding-top: 12px; padding-bottom: 40px; }
.mt-page-body .elementor-widget-text-editor h2 { font-family: var(--mt-display); font-weight: 400; font-size: clamp(22px, 6vw, 30px); line-height: 1.25; color: var(--mt-ink); margin: 28px 0 8px; }
.mt-page-body .elementor-widget-text-editor h2:first-child { margin-top: 8px; }
.mt-page-body .elementor-widget-text-editor p { font-size: 17px; line-height: 1.8; margin: 0 0 12px; }
.mt-page-body .elementor-widget-text-editor a { color: var(--mt-ink); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em; }
.mt-page-body .elementor-widget-text-editor a:hover { text-decoration-thickness: 3px; }
.elementor .e-con.mt-read > .elementor-widget.elementor-widget-text-editor,
.elementor .e-con.mt-read > .elementor-widget.elementor-widget-form { max-width: var(--mt-measure); }

/* ฟอร์มติดต่อ (PRO Elements Form) — ช่องแบบ search field, ปุ่มเหลือง (Button Reset Rule) */
.mt-form { padding-top: 12px; } /* ช่องห่างกัน 20px ตั้งที่ widget (row_gap) */
.mt-form .elementor-field-label { font-family: var(--mt-body); font-size: 15px; font-weight: 600; color: var(--mt-ink); margin-bottom: 6px; }
/* .elementor-select-wrapper ก็มี class elementor-field — ไม่ใส่กรอบที่ตัวห่อ ไม่งั้นกรอบซ้อน */
.mt-form .elementor-field-group .elementor-field:not(.elementor-select-wrapper),
.mt-form .elementor-field-group .elementor-select-wrapper select {
	font-family: var(--mt-body);
	font-size: 17px;
	line-height: 1.5;
	color: var(--mt-ink);
	background: var(--mt-paper);
	border: 3px solid var(--mt-ink);
	border-radius: 0;
	padding: 10px 12px;
	min-height: 0;
}
.mt-form .elementor-field-group .elementor-select-wrapper::before { color: var(--mt-ink); }
.mt-form .elementor-field-group .elementor-field::placeholder { color: var(--mt-muted); opacity: 1; } /* Elementor ตั้ง opacity .6 ทำให้จางเกิน 4.5:1 */
.mt-form .elementor-field-group .elementor-field:focus { outline: 3px solid var(--mt-yellow); outline-offset: 2px; box-shadow: 0 0 0 6px var(--mt-ink); }
.mt-form .elementor-field-type-submit .elementor-button,
.mt-form .elementor-field-type-submit .elementor-button:hover,
.mt-form .elementor-field-type-submit .elementor-button:focus {
	font-family: var(--mt-body);
	font-weight: 700;
	font-size: 17px;
	padding: 10px 22px;
	background: var(--mt-yellow);
	color: var(--mt-ink);
	border: 3px solid var(--mt-ink);
	border-radius: 0;
	min-height: 0;
}
.mt-form .elementor-field-type-submit .elementor-button:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 4px; }
.mt-form .elementor-field-type-submit .elementor-button:focus-visible { outline: 3px solid var(--mt-yellow); outline-offset: 2px; box-shadow: 0 0 0 6px var(--mt-ink); }
.mt-form .elementor-message { font-family: var(--mt-body); font-size: 17px; font-weight: 600; color: var(--mt-ink); margin-top: 12px; padding: 10px 12px; border: 3px solid var(--mt-ink); }
.mt-form .elementor-message.elementor-message-success { background: var(--mt-paper); }
.mt-form .elementor-message.elementor-message-danger,
.mt-form .elementor-error .elementor-field { border-style: dashed; }
.mt-form .elementor-message::before { display: none; }
.mt-form .elementor-field-group.elementor-error .help-inline { font-size: 15px; color: var(--mt-ink); }

/* ---------- footer: เมนูท้ายเว็บ + เครดิต TVmaze */
/* ตัวที่อยู่หน้านั้นพื้นเหลือง = ตำแหน่งปัจจุบัน (แบบหัวเว็บ); ดึงซ้ายให้ตัวอักษรแรกตรงกับชื่อเว็บ */
.mt-foot .mt-foot-nav .elementor-nav-menu { margin-left: -10px; gap: 4px; }
.mt-foot .mt-foot-nav .elementor-nav-menu--main .elementor-item { padding: 4px 10px; font-size: 15px; }
.movietv-credit { font-size: 13px; }
.movietv-credit a { color: inherit; }

/* ---------- ใต้ป้าย (class mt-main): มือถือเรียงลงมา
 * จอกว้าง ≥1024: ราวโปสเตอร์ซ้าย (sticky) + คอลัมน์ขวา: ข้อมูล → โฆษณา → เรื่องย่อ → trailer → แชร์ ไม่มีที่ว่างข้างโปสเตอร์ */
.elementor .e-con.mt-main,
.elementor .e-con.mt-body { --width: 100%; }
@media (min-width: 1024px) {
	.elementor .e-con.mt-main {
		display: grid;
		grid-template-columns: 220px minmax(0, 1fr);
		column-gap: 48px;
		align-items: start;
		max-width: calc(var(--mt-frame) + 2 * var(--mt-gutter));
		margin-inline: auto;
		padding: 28px var(--mt-gutter) 0;
	}
	/* ถอดกล่องห่อของ [movietv_facts] ให้โปสเตอร์กับรายการข้อมูลเป็นช่องของกริดนี้โดยตรง */
	.mt-main .mt-factsbox,
	.mt-main .mt-factsbox .elementor-widget,
	.mt-main .mt-factsbox .elementor-widget-container,
	.mt-main .mt-factsbox .elementor-shortcode,
	.mt-main .mt-factsbox .mt-sheet { display: contents; }
	.mt-main .mt-poster { grid-column: 1; grid-row: 1 / span 3; position: sticky; top: 16px; }
	.mt-main .mt-facts { grid-column: 2; grid-row: 1; grid-template-columns: repeat(3, max-content); column-gap: 48px; }
	.elementor .e-con.mt-main > .mt-adbox { grid-column: 2; grid-row: 2; width: 100%; margin: 24px 0 36px; } /* "เรื่องย่อ" ได้ที่ว่างด้านบนมากกว่าด้านล่าง */
	.mt-main .mt-adbox .mt-ad { padding: 0; margin: 0; }
	.elementor .e-con.mt-main > .mt-body { grid-column: 2; grid-row: 3; }
	.mt-main .mt-read,
	.mt-main .mt-trailer,
	.mt-main .mt-share { padding-inline: 0; margin-inline: 0; }
	.elementor .e-con.mt-main .e-con.mt-read { padding-inline: 0; margin-inline: 0; }
}

/* ---------- จอกว้าง */
@media (min-width: 768px) {
	:root { --mt-gutter: 32px; }
	.mt-board { padding-top: 24px; padding-bottom: 32px; }
	.mt-answers { grid-template-columns: 1fr 1fr 1.6fr; gap: 14px; margin-top: 22px; }
	.mt-plate--where { grid-column: auto; }
	.mt-plate__value { font-size: 30px; }
	.mt-sheet { grid-template-columns: 220px 1fr; gap: 32px; padding-top: 28px; }
	.mt-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 32px; font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { transition-duration: 0s !important; }
}
