/**
 * TIS Home 1.0.0
 * All selectors are scoped to the shortcode root or its optional template.
 */

.tis-home {
	--th-navy: var(--tis-color-navy, #071d49);
	--th-navy-light: var(--tis-color-navy-light, #102d67);
	--th-gold: var(--tis-color-gold, #d3a83f);
	--th-gold-soft: var(--tis-color-gold-soft, #f6edd7);
	--th-teal: var(--tis-color-teal, #0f7a67);
	--th-teal-dark: var(--tis-color-teal-dark, #0b5d4f);
	--th-ink: var(--tis-color-ink, #172033);
	--th-muted: var(--tis-color-muted, #647087);
	--th-line: var(--tis-color-line, #dfe5ee);
	--th-surface: var(--tis-color-surface, #f5f7fb);
	--th-white: #fff;
	--th-font: var(--tis-font-sans, "Avenir Next", Inter, "Noto Sans Thai", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif);
	--th-radius: var(--tis-radius-card, 20px);
	--th-radius-large: var(--tis-radius-hero, 26px);
	--th-shadow: var(--tis-shadow-card, 0 18px 54px rgba(7, 29, 73, .1));
	background: var(--th-white);
	color: var(--th-ink);
	font-family: var(--th-font);
	font-size: 16px;
	line-height: 1.68;
	overflow: hidden;
	width: 100%;
}

.tis-home *,
.tis-home *::before,
.tis-home *::after { box-sizing: border-box; }
.tis-home :where(h1, h2, h3, p, figure, blockquote, ul, ol) { margin-top: 0; }
.tis-home :where(h1, h2, h3) {
	color: var(--th-navy);
	font-family: var(--th-font);
	font-weight: 760;
	letter-spacing: -.038em;
	line-height: 1.12;
	text-wrap: balance;
}
.tis-home[lang="th"] :where(h1, h2, h3),
.tis-home[lang="zh-Hans"] :where(h1, h2, h3) { letter-spacing: 0; line-height: 1.34; }
.tis-home img { display: block; height: auto; max-width: 100%; }
.tis-home a { color: inherit; }
.tis-home :where(a, summary):focus-visible { outline: 3px solid var(--th-teal); outline-offset: 4px; }
.tis-home .th-shell { margin-inline: auto; max-width: 1328px; padding-inline: clamp(20px, 4vw, 52px); width: 100%; }
.tis-home .th-section { padding-block: clamp(76px, 9vw, 132px); }
.tis-home .th-eyebrow {
	color: #8b691d;
	font-size: 12px;
	font-weight: 800;
	letter-spacing: .14em;
	line-height: 1.4;
	margin-bottom: 20px;
	text-transform: uppercase;
}
.tis-home[lang="th"] .th-eyebrow,
.tis-home[lang="zh-Hans"] .th-eyebrow { letter-spacing: .05em; }
.tis-home .th-section-heading { margin-bottom: clamp(38px, 6vw, 70px); max-width: 760px; }
.tis-home .th-section-heading h2,
.tis-home .th-intro h2,
.tis-home .th-pathways h2,
.tis-home .th-faq h2,
.tis-home .th-visit h2 { font-size: clamp(2.15rem, 4.4vw, 4.25rem); margin-bottom: 22px; }
.tis-home .th-section-heading > p:last-child,
.tis-home .th-intro-copy > p:first-child,
.tis-home .th-visit-inner > div > p:last-child { color: var(--th-muted); font-size: clamp(1rem, 1.5vw, 1.18rem); margin-bottom: 0; max-width: 670px; }
.tis-home .th-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 12px; }
.tis-home .th-button {
	align-items: center;
	border: 1px solid transparent;
	border-radius: 999px;
	display: inline-flex;
	font-size: 14px;
	font-weight: 780;
	gap: 15px;
	justify-content: center;
	line-height: 1.35;
	min-height: 50px;
	padding: 12px 22px;
	text-decoration: none;
	transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}
.tis-home .th-button-gold { background: var(--th-gold); color: var(--th-navy); }
.tis-home .th-button-light { background: var(--th-white); border-color: rgba(255, 255, 255, .35); color: var(--th-navy); }
.tis-home .th-button-outline { background: transparent; border-color: rgba(255, 255, 255, .35); color: var(--th-white); }
.tis-home .th-text-link {
	align-items: center;
	color: var(--th-navy);
	display: inline-flex;
	font-size: 14px;
	font-weight: 780;
	gap: 12px;
	text-decoration-color: var(--th-gold);
	text-decoration-thickness: 2px;
	text-underline-offset: 5px;
}
.tis-home .th-screen-reader-text {
	clip: rect(1px, 1px, 1px, 1px);
	clip-path: inset(50%);
	height: 1px;
	overflow: hidden;
	position: absolute;
	white-space: nowrap;
	width: 1px;
}

/* Standalone language selector; auto mode defers to the TIS theme. */
.tis-home > .th-language-switcher { background: var(--th-navy); border-bottom: 1px solid rgba(255, 255, 255, .15); padding: 8px clamp(20px, 4vw, 52px); }
.tis-home > .th-language-switcher ul { align-items: center; display: flex; gap: 6px; justify-content: flex-end; list-style: none; margin: 0 auto; max-width: 1224px; padding: 0; }
.tis-home > .th-language-switcher a { border: 1px solid rgba(255, 255, 255, .25); border-radius: 999px; color: #fff; display: block; font-size: 12px; font-weight: 750; line-height: 1.2; padding: 7px 12px; text-decoration: none; }
.tis-home > .th-language-switcher a.is-current { background: var(--th-gold); border-color: var(--th-gold); color: var(--th-navy); }

/* Hero */
.tis-home .th-hero {
	background:
		radial-gradient(circle at 4% 8%, rgba(211, 168, 63, .2), transparent 25rem),
		linear-gradient(135deg, var(--th-navy) 0%, #0b2a60 66%, #0b3c61 100%);
	color: #fff;
	position: relative;
}
.tis-home .th-hero::after { border: 1px solid rgba(255, 255, 255, .08); border-radius: 50%; content: ""; height: 540px; pointer-events: none; position: absolute; right: -250px; top: -240px; width: 540px; }
.tis-home .th-hero-grid { align-items: center; display: grid; gap: clamp(44px, 7vw, 94px); grid-template-columns: minmax(0, .88fr) minmax(430px, 1.12fr); min-height: clamp(650px, 78vh, 830px); padding-block: clamp(62px, 8vw, 108px); position: relative; z-index: 1; }
.tis-home .th-hero-copy { max-width: 620px; min-width: 0; }
.tis-home .th-hero .th-eyebrow { color: #efd990; }
.tis-home .th-hero h1 { color: #fff; font-size: clamp(3.45rem, 5.6vw, 5.7rem); margin-bottom: 28px; }
.tis-home .th-hero h1 span,
.tis-home .th-hero h1 em { display: block; }
.tis-home .th-hero h1 em { color: #efd47f; font-style: normal; }
.tis-home .th-hero-intro { color: #d9e2ef; font-size: clamp(1.05rem, 1.65vw, 1.3rem); margin-bottom: 34px; max-width: 610px; }
.tis-home .th-hero-media { border-radius: clamp(24px, 3vw, 40px); box-shadow: 0 30px 80px rgba(0, 0, 0, .3); margin: 0; min-height: 480px; overflow: hidden; position: relative; transform: rotate(1.4deg); }
.tis-home .th-hero-media::after { border: 1px solid rgba(255, 255, 255, .52); border-radius: inherit; content: ""; inset: 14px; pointer-events: none; position: absolute; }
.tis-home .th-hero-media img { height: 100%; inset: 0; object-fit: cover; position: absolute; width: 100%; }
.tis-home .th-hero-mark { align-items: center; background: var(--th-gold); border-radius: 50%; bottom: 28px; color: var(--th-navy); display: flex; flex-direction: column; height: 104px; justify-content: center; left: 28px; line-height: 1; position: absolute; transform: rotate(-7deg); width: 104px; z-index: 2; }
.tis-home .th-hero-mark b { font-size: 36px; }
.tis-home .th-hero-mark small { font-size: 10px; font-weight: 800; letter-spacing: .15em; margin-top: 5px; }
.tis-home .th-proof { border-top: 1px solid rgba(255, 255, 255, .16); display: grid; grid-template-columns: repeat(3, 1fr); list-style: none; margin-bottom: 0; padding-block: 22px; position: relative; z-index: 1; }
.tis-home .th-proof li { align-items: center; color: #dfe7f3; display: flex; font-size: 13px; font-weight: 700; gap: 12px; justify-content: center; margin: 0; padding: 4px 20px; text-align: center; }
.tis-home .th-proof li + li { border-left: 1px solid rgba(255, 255, 255, .16); }
.tis-home .th-proof li > span { align-items: center; background: rgba(211, 168, 63, .18); border-radius: 50%; color: #f1d67f; display: inline-flex; flex: 0 0 26px; height: 26px; justify-content: center; }

/* Accreditation introduction */
.tis-home .th-intro { background: #fff; }
.tis-home .th-intro-grid { display: grid; gap: clamp(42px, 9vw, 124px); grid-template-columns: minmax(0, 1fr) minmax(320px, .84fr); }
.tis-home .th-intro-copy { padding-top: 8px; }
.tis-home .th-intro-copy > p:first-child { margin-bottom: 28px; }
.tis-home .th-accreditation { align-items: center; border-block: 1px solid var(--th-line); color: var(--th-navy); display: flex; font-size: 14px; font-weight: 750; gap: 16px; margin: 0 0 25px; padding-block: 20px; }
.tis-home .th-accreditation > span { align-items: center; background: var(--th-navy); border-radius: 50%; color: var(--th-gold); display: inline-flex; flex: 0 0 42px; font-family: Georgia, serif; font-size: 23px; font-weight: 700; height: 42px; justify-content: center; }

/* Difference cards */
.tis-home .th-why { background: var(--th-surface); }
.tis-home .th-feature-grid { display: grid; gap: 16px; grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tis-home .th-feature-card { background: #fff; border: 1px solid var(--th-line); border-radius: var(--th-radius); min-height: 310px; padding: clamp(26px, 3vw, 38px); position: relative; transition: box-shadow .2s ease, transform .2s ease; }
.tis-home .th-card-number { color: var(--th-gold); display: block; font-size: 13px; font-weight: 800; letter-spacing: .12em; margin-bottom: 54px; }
.tis-home .th-feature-card h3 { font-size: clamp(1.3rem, 2vw, 1.62rem); margin-bottom: 16px; }
.tis-home .th-feature-card p { color: var(--th-muted); font-size: 14px; margin-bottom: 0; }

/* Academic program cards */
.tis-home .th-section-heading-split { align-items: end; display: grid; gap: 48px; grid-template-columns: minmax(0, 1.15fr) minmax(290px, .85fr); max-width: none; }
.tis-home .th-section-heading-split h2 { margin-bottom: 0; }
.tis-home .th-program-grid { display: grid; gap: 20px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tis-home .th-program-card { background: #fff; border: 1px solid var(--th-line); border-radius: var(--th-radius-large); box-shadow: 0 12px 42px rgba(7, 29, 73, .07); min-width: 0; overflow: hidden; }
.tis-home .th-program-media { aspect-ratio: 4 / 3; overflow: hidden; }
.tis-home .th-program-media img { height: 100%; object-fit: cover; transition: transform .45s ease; width: 100%; }
.tis-home .th-program-copy { padding: clamp(24px, 3vw, 34px); }
.tis-home .th-program-copy h3 { font-size: clamp(1.45rem, 2.4vw, 2rem); margin-bottom: 14px; }
.tis-home .th-program-copy p { color: var(--th-muted); font-size: 14px; margin-bottom: 24px; }

/* Specialist pathways */
.tis-home .th-pathways { background: var(--th-navy); color: #fff; }
.tis-home .th-pathways-grid { align-items: start; display: grid; gap: clamp(50px, 9vw, 130px); grid-template-columns: minmax(280px, .72fr) minmax(0, 1.28fr); }
.tis-home .th-pathways .th-eyebrow { color: #e7cb70; }
.tis-home .th-pathways h2 { color: #fff; }
.tis-home .th-pathways header { position: sticky; top: 40px; }
.tis-home .th-pathway-list { list-style: none; margin: 0; padding: 0; }
.tis-home .th-pathway-list li { border-top: 1px solid rgba(255, 255, 255, .2); display: grid; gap: 25px; grid-template-columns: 52px 1fr; padding-block: 31px; }
.tis-home .th-pathway-list li:last-child { border-bottom: 1px solid rgba(255, 255, 255, .2); }
.tis-home .th-pathway-list > li > span { color: #e7cb70; font-size: 12px; font-weight: 800; letter-spacing: .14em; padding-top: 6px; }
.tis-home .th-pathway-list h3 { color: #fff; font-size: clamp(1.35rem, 2.5vw, 2rem); margin-bottom: 11px; }
.tis-home .th-pathway-list p { color: #c6d1e2; font-size: 14px; margin-bottom: 0; }

/* Special subjects */
.tis-home .th-subjects { background: var(--th-gold-soft); }
.tis-home .th-subjects-grid { align-items: center; display: grid; gap: clamp(50px, 8vw, 112px); grid-template-columns: minmax(360px, .92fr) minmax(0, 1.08fr); }
.tis-home .th-subjects-media { border-radius: var(--th-radius-large); box-shadow: var(--th-shadow); margin: 0; min-height: 620px; overflow: hidden; position: relative; }
.tis-home .th-subjects-media img { height: 100%; inset: 0; object-fit: cover; position: absolute; width: 100%; }
.tis-home .th-subject-list { border-top: 1px solid rgba(7, 29, 73, .17); }
.tis-home .th-subject-list article { border-bottom: 1px solid rgba(7, 29, 73, .17); display: grid; gap: 24px; grid-template-columns: minmax(150px, .55fr) minmax(0, 1fr); padding-block: 25px; }
.tis-home .th-subject-list h3 { font-size: 1.12rem; margin: 0; }
.tis-home .th-subject-list p { color: #5d6270; font-size: 14px; margin: 0; }

/* Family voices */
.tis-home .th-families { background: #fff; }
.tis-home .th-quote-grid { display: grid; gap: 16px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tis-home .th-quote-card { background: var(--th-surface); border: 1px solid var(--th-line); border-radius: var(--th-radius); display: flex; flex-direction: column; margin: 0; min-height: 295px; padding: clamp(28px, 4vw, 44px); }
.tis-home .th-quote-mark { color: var(--th-gold); font-family: Georgia, serif; font-size: 64px; height: 42px; line-height: .8; }
.tis-home .th-quote-card blockquote { margin-bottom: auto; }
.tis-home .th-quote-card blockquote p { color: var(--th-navy); font-size: clamp(1rem, 1.4vw, 1.16rem); font-weight: 620; line-height: 1.62; margin-bottom: 28px; }
.tis-home .th-quote-card figcaption { border-top: 1px solid var(--th-line); display: flex; flex-direction: column; padding-top: 18px; }
.tis-home .th-quote-card figcaption strong { color: var(--th-navy); font-size: 14px; }
.tis-home .th-quote-card figcaption span { color: var(--th-muted); font-size: 12px; margin-top: 2px; }

/* FAQ */
.tis-home .th-faq { background: var(--th-surface); }
.tis-home .th-faq-grid { align-items: start; display: grid; gap: clamp(48px, 9vw, 128px); grid-template-columns: minmax(250px, .62fr) minmax(0, 1.38fr); }
.tis-home .th-faq-grid > header { position: sticky; top: 40px; }
.tis-home .th-faq-list { border-top: 1px solid var(--th-line); }
.tis-home .th-faq-list details { border-bottom: 1px solid var(--th-line); }
.tis-home .th-faq-list summary { align-items: center; color: var(--th-navy); cursor: pointer; display: flex; font-size: clamp(1rem, 1.6vw, 1.22rem); font-weight: 740; gap: 24px; justify-content: space-between; list-style: none; padding: 24px 2px; }
.tis-home .th-faq-list summary::-webkit-details-marker { display: none; }
.tis-home .th-faq-list summary > span { border: 1px solid var(--th-line); border-radius: 50%; flex: 0 0 30px; height: 30px; position: relative; }
.tis-home .th-faq-list summary > span::before,
.tis-home .th-faq-list summary > span::after { background: var(--th-navy); content: ""; height: 2px; left: 8px; position: absolute; top: 13px; transition: transform .2s ease; width: 12px; }
.tis-home .th-faq-list summary > span::after { transform: rotate(90deg); }
.tis-home .th-faq-list details[open] summary > span::after { transform: rotate(0); }
.tis-home .th-faq-list details > div { max-width: 750px; padding: 0 55px 24px 2px; }
.tis-home .th-faq-list details p { color: var(--th-muted); margin: 0; }

/* Closing invitation */
.tis-home .th-visit { background: linear-gradient(115deg, var(--th-teal-dark), var(--th-teal)); color: #fff; padding-block: clamp(68px, 8vw, 108px); }
.tis-home .th-visit-inner { align-items: center; display: flex; gap: 50px; justify-content: space-between; }
.tis-home .th-visit .th-eyebrow { color: #f1d782; }
.tis-home .th-visit h2 { color: #fff; margin-bottom: 14px; }
.tis-home .th-visit-inner > div > p:last-child { color: #d9eee8; }
.tis-home .th-visit .th-actions { flex: 0 0 auto; justify-content: flex-end; }

.tis-home-template-main { margin: 0; max-width: none; overflow: hidden; padding: 0; width: 100%; }

@media (hover: hover) {
	.tis-home .th-button:hover { transform: translateY(-2px); }
	.tis-home .th-button-gold:hover { background: #e2bb59; }
	.tis-home .th-button-light:hover { background: var(--th-gold-soft); }
	.tis-home .th-button-outline:hover { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .7); }
	.tis-home .th-feature-card:hover { box-shadow: var(--th-shadow); transform: translateY(-5px); }
	.tis-home .th-program-card:hover .th-program-media img { transform: scale(1.035); }
}

@media (max-width: 1080px) {
	.tis-home .th-hero-grid { grid-template-columns: minmax(0, 1fr) minmax(380px, .95fr); }
	.tis-home .th-hero-media { min-height: 440px; }
	.tis-home .th-feature-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tis-home .th-feature-card { min-height: 265px; }
	.tis-home .th-subjects-grid { gap: 60px; grid-template-columns: minmax(320px, .8fr) minmax(0, 1.2fr); }
}

@media (max-width: 860px) {
	.tis-home .th-hero-grid { grid-template-columns: 1fr; min-height: 0; }
	.tis-home .th-hero-copy { max-width: 720px; }
	.tis-home .th-hero-media { aspect-ratio: 16 / 9; min-height: 0; transform: none; }
	.tis-home .th-proof { grid-template-columns: 1fr; padding-block: 14px; }
	.tis-home .th-proof li { justify-content: flex-start; padding-block: 10px; text-align: left; }
	.tis-home .th-proof li + li { border-left: 0; border-top: 1px solid rgba(255, 255, 255, .12); }
	.tis-home .th-intro-grid,
	.tis-home .th-pathways-grid,
	.tis-home .th-subjects-grid,
	.tis-home .th-faq-grid { grid-template-columns: 1fr; }
	.tis-home .th-section-heading-split { align-items: start; grid-template-columns: 1fr; }
	.tis-home .th-program-grid { grid-template-columns: 1fr; }
	.tis-home .th-program-card { display: grid; grid-template-columns: minmax(260px, .8fr) minmax(0, 1.2fr); }
	.tis-home .th-program-media { aspect-ratio: auto; min-height: 300px; }
	.tis-home .th-pathways header,
	.tis-home .th-faq-grid > header { position: static; }
	.tis-home .th-subjects-media { aspect-ratio: 16 / 10; min-height: 0; }
	.tis-home .th-visit-inner { align-items: flex-start; flex-direction: column; }
	.tis-home .th-visit .th-actions { justify-content: flex-start; }
}

@media (max-width: 620px) {
	.tis-home { font-size: 15px; }
	.tis-home .th-section { padding-block: 70px; }
	.tis-home .th-hero-grid { padding-block: 58px; }
	.tis-home .th-hero h1 { font-size: clamp(3rem, 15vw, 4.6rem); }
	.tis-home .th-actions { align-items: stretch; flex-direction: column; }
	.tis-home .th-button { width: 100%; }
	.tis-home .th-hero-media { aspect-ratio: 5 / 4; }
	.tis-home .th-hero-mark { bottom: 18px; height: 82px; left: 18px; width: 82px; }
	.tis-home .th-hero-mark b { font-size: 29px; }
	.tis-home .th-feature-grid,
	.tis-home .th-quote-grid { grid-template-columns: 1fr; }
	.tis-home .th-feature-card { min-height: 0; }
	.tis-home .th-card-number { margin-bottom: 38px; }
	.tis-home .th-program-card { display: block; }
	.tis-home .th-program-media { aspect-ratio: 4 / 3; min-height: 0; }
	.tis-home .th-subject-list article { grid-template-columns: 1fr; }
	.tis-home .th-quote-card { min-height: 0; }
	.tis-home > .th-language-switcher ul { display: grid; grid-template-columns: repeat(3, 1fr); }
	.tis-home > .th-language-switcher a { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
	.tis-home *,
	.tis-home *::before,
	.tis-home *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; }
}

@media print {
	.tis-home > .th-language-switcher,
	.tis-home .th-actions,
	.tis-home .th-text-link { display: none !important; }
	.tis-home .th-section,
	.tis-home .th-visit,
	.tis-home .th-hero-grid { min-height: 0; padding-block: 28px; }
	.tis-home .th-hero,
	.tis-home .th-pathways,
	.tis-home .th-visit { background: #fff !important; color: #000; }
	.tis-home :where(h1, h2, h3),
	.tis-home .th-hero :where(h1, h2, h3),
	.tis-home .th-pathways :where(h1, h2, h3),
	.tis-home .th-visit :where(h1, h2, h3) { color: #000 !important; }
}
