/*
Theme Name: The Equation Studio
Theme URI: https://theequationstudio.com
Author: Arty Learning Group
Description: Website theme for The Equation Studio (TES), Primary 1 to 3 Maths at Hougang. Built from the approved TES website design: logo colours, Poppins and Nunito, page layouts, trial booking form and Maths Corner.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: tes
*/

:root {
	--tes-blue: #3471BA; --tes-blue-dark: #24508A; --tes-yellow: #FCBA23; --tes-green: #3D8A26;
	--tes-gold: #9A6700; --tes-red: #C01818; --tes-cream: #FBF8EF; --tes-ink: #1F2A37; --tes-ink-soft: #3B4652;
	--tes-muted: #5B6573; --tes-line: #E6E0CF; --tes-tint-green: #EAF5E1; --tes-tint-blue: #E3EEF9;
	--tes-tint-yellow: #FFF4D6; --tes-sky: #E3F1FA;
	--tes-radius: 20px;
}

/* ---------- page frame ---------- */
.wp-site-blocks > *, .tes-main, .tes-content > * { margin-block-start: 0 !important; }
.wp-site-blocks { padding: 0; }
.tes-main { margin: 0; }
.tes-wrap { max-width: 1200px; margin-inline: auto !important; padding-inline: 24px; box-sizing: border-box; width: 100%; }
.tes-content > :not(.tes-section) { max-width: 1200px; margin-inline: auto; padding-inline: 24px; box-sizing: border-box; }
.tes-section { padding-block: 80px; margin: 0; }
.tes-section > .tes-wrap > * + * { margin-block-start: 24px; }
.tes-bg-cream { background: var(--tes-cream); }
.tes-bg-white { background: #FFFFFF; }
.tes-bg-green { background: var(--tes-tint-green); }
.tes-bg-blue { background: var(--tes-blue); color: #FFFFFF; }
.tes-bg-yellow { background: var(--tes-tint-yellow); }
.tes-bg-sky { background: var(--tes-sky); }
.tes-bg-blue h1, .tes-bg-blue h2, .tes-bg-blue h3 { color: #FFFFFF; }
.tes-bg-blue a:not(.wp-block-button__link) { color: #FFFFFF; }
img { max-width: 100%; height: auto; }

/* ---------- type ---------- */
.tes-eyebrow, .tes-eyebrow a { margin: 0; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: 14px; color: var(--tes-gold); text-decoration: none; }
.tes-on-dark, .tes-eyebrow.tes-on-dark { color: #FFF4D1; }
h2.tes-on-dark { color: #FFFFFF; }
.tes-lead { font-size: 19px; margin: 0; }
.tes-hl { color: #B07800; }
.tes-hero-title .tes-hl { display: block; }
.tes-hero-title { font-size: clamp(34px, 5vw, 58px) !important; }
.tes-c-green { color: var(--tes-green) !important; }
.tes-c-blue { color: var(--tes-blue) !important; }
.tes-c-gold { color: var(--tes-gold) !important; }
.tes-c-red { color: var(--tes-red) !important; }
.tes-muted { color: var(--tes-muted); font-size: 15px; }
.tes-small-strong { font-weight: 700; color: var(--tes-ink-soft); margin: 0; }
.tes-label { font-weight: 800; color: var(--tes-blue); margin: 0; }
.tes-intro { max-width: 820px; }
.tes-intro > * + *, .tes-col > * + *, .tes-card > * + * { margin-block-start: 12px; }
.tes-center-block { margin-inline: auto; text-align: center; }
.tes-center-block .wp-block-buttons { justify-content: center; }
.tes-narrow { max-width: 880px; }
.tes-narrow h3 { margin-block-start: 28px; color: var(--tes-blue); }
.tes-narrow p { margin-block: 8px 0; }

/* ---------- layout ---------- */
.tes-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 48px; align-items: center; }
.tes-two.tes-top { align-items: start; }
.tes-two.tes-stretch { align-items: stretch; }
.tes-two > * { margin: 0 !important; }
.tes-grid { display: grid !important; gap: 20px; margin-block-start: 24px; padding: 0; list-style: none; }
.tes-grid > * { margin: 0 !important; }
.tes-grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.tes-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.tes-grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.tes-row-head { display: flex; flex-wrap: wrap; gap: 16px; justify-content: space-between; align-items: flex-end; }
.tes-row-head > * { margin: 0 !important; }

/* ---------- cards ---------- */
.tes-card { background: #FFFFFF; border: 1px solid var(--tes-line); border-radius: var(--tes-radius); padding: 28px; color: var(--tes-ink); box-sizing: border-box; }
.tes-card p { margin: 0; }
.tes-card h3 { margin: 0; }
.tes-card-flush { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.tes-card-flush > * + * { margin: 0 !important; }
.tes-card-img { margin: 0; }
.tes-card-img img { display: block; width: 100%; background: var(--tes-tint-green); }
.tes-card-body { padding: 24px 26px 28px; display: flex; flex-direction: column; gap: 10px; flex: 1; }
.tes-card-body > * { margin: 0 !important; }
.tes-card-body h3 { font-size: 26px; }
.tes-more { margin-top: auto !important; font-weight: 800; }
.tes-step { display: flex; gap: 18px; align-items: flex-start; }
.tes-step > * { margin: 0 !important; }
.tes-step-text > * + * { margin-block-start: 6px !important; }
.tes-icon { flex: none; width: 56px; height: 56px; border-radius: 16px; display: flex; align-items: center; justify-content: center; }
.tes-center { text-align: center; }
.tes-big { font-family: var(--wp--preset--font-family--poppins); font-weight: 800; font-size: 34px; color: var(--tes-blue); line-height: 1.2; }
.tes-step-no { font-family: var(--wp--preset--font-family--poppins); font-weight: 800; font-size: 28px; color: #B07800; line-height: 1.1; }
.tes-step-title { font-weight: 800; color: var(--tes-blue); font-size: 18px; }
.tes-books { margin: 0; padding-left: 22px; color: var(--tes-ink-soft); }
.tes-chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 0; }
.tes-chips li { background: #FFFFFF; border: 1px solid var(--tes-line); border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: 15px; }
.tes-img-round img, .tes-img-round { border-radius: 28px; }
.tes-img-card img { border-radius: var(--tes-radius); border: 1px solid var(--tes-line); display: block; }
.tes-offer { background: var(--tes-blue); color: #FFFFFF; border-radius: 24px; padding: 36px; box-sizing: border-box; }
.tes-offer > * { margin: 0; }
.tes-offer > * + * { margin-block-start: 14px; }
.tes-offer-title { font-family: var(--wp--preset--font-family--poppins); font-weight: 800; font-size: clamp(26px, 3vw, 36px); line-height: 1.15; }
.tes-places { font-weight: 800; font-size: 20px; color: #FFF4D1; }
.tes-chip { border-radius: 12px; padding: 10px 12px; margin-block-start: 10px !important; font-weight: 600; font-size: 15px; }
.tes-chip strong { font-size: 17px; }
.tes-chip-p1 { background: #E2F2D9; color: #245F18; }
.tes-chip-p2 { background: #DCEBFA; color: #1F4F8A; }
.tes-chip-p3 { background: #FFF0C7; color: #6E4A00; }
.tes-seats { display: inline-block; margin-left: 6px; font-weight: 800; font-size: 13px; background: rgba(255,255,255,.7); border-radius: 999px; padding: 2px 8px; }
.tes-seats-full { background: #FCE4E4; color: var(--tes-red); }
.tes-terms p + p { margin-top: 10px; }
.tes-map iframe { width: 100%; min-height: 340px; border: 0; border-radius: var(--tes-radius); display: block; }

/* ---------- tables ---------- */
.tes-table { margin: 0; overflow-x: auto; border: 1px solid var(--tes-line); border-radius: 16px; background: #FFFFFF; }
.tes-table table { border-collapse: collapse; width: 100%; min-width: 560px; color: var(--tes-ink); }
.tes-table th { text-align: left; padding: 14px 16px; background: var(--tes-blue); color: #FFFFFF; font-weight: 800; white-space: nowrap; border: 0; }
.tes-table td { padding: 14px 16px; border: 0; border-bottom: 1px solid var(--tes-line); white-space: nowrap; }
.tes-table tr:last-child td { border-bottom: 0; }
.tes-table td:first-child { font-weight: 800; color: var(--tes-blue); }
.tes-table-yellow th { background: var(--tes-yellow); color: var(--tes-ink); }
.tes-table-yellow table { min-width: 420px; }

/* ---------- buttons ---------- */
.wp-block-buttons { gap: 12px; }
.wp-block-button__link { text-decoration: none; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; }
.tes-btn-secondary .wp-block-button__link { background: #FFFFFF !important; color: var(--tes-blue) !important; border: 2px solid var(--tes-blue); padding: 12px 22px; }
.tes-btn-secondary .wp-block-button__link:hover { background: var(--tes-tint-blue) !important; }
.tes-bg-blue .tes-btn-secondary .wp-block-button__link { border-color: #FFFFFF; }
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid var(--tes-yellow); outline-offset: 2px; }

/* ---------- FAQ ---------- */
.tes-faq-group { margin-block-start: 32px !important; font-size: 28px !important; }
.tes-faq { background: #FFFFFF; border: 1px solid var(--tes-line); border-radius: var(--tes-radius); margin-block-start: 12px !important; }
.tes-faq summary { cursor: pointer; padding: 22px 26px; font-weight: 800; color: var(--tes-blue); font-size: 19px; list-style: none; }
.tes-faq summary::-webkit-details-marker { display: none; }
.tes-faq summary::after { content: "+"; float: right; font-size: 24px; line-height: 1; }
.tes-faq[open] summary::after { content: "–"; }
.tes-faq > p { margin: 0; padding: 0 26px 24px; }

/* ---------- header ---------- */
.tes-banner { background: var(--tes-blue); color: #FFFFFF; font-weight: 700; font-size: 15px; text-align: center; padding: 10px 16px; }
.tes-banner a { color: #FFF4D1; }
.tes-header { background: var(--tes-cream); border-bottom: 1px solid var(--tes-line); }
.tes-header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.tes-logo img { display: block; height: 46px; width: auto; }
.tes-nav { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; }
.tes-nav a { text-decoration: none; font-weight: 700; color: #2B3A4A; padding: 6px 0; border-bottom: 3px solid transparent; }
.tes-nav a:hover, .tes-nav a[aria-current="page"] { color: var(--tes-blue); border-bottom-color: var(--tes-yellow); }
.tes-header-actions { display: flex; gap: 12px; align-items: center; }
.tes-pill { display: inline-flex; align-items: center; min-height: 48px; box-sizing: border-box; font-weight: 800; text-decoration: none; color: var(--tes-ink); background: var(--tes-yellow); padding: 12px 20px; border-radius: 999px; }
.tes-pill:hover { color: var(--tes-ink); background: #E9A90F; }
.tes-pill-outline { background: #FFFFFF; color: var(--tes-blue); border: 2px solid var(--tes-blue); }
.tes-pill-outline:hover { background: var(--tes-tint-blue); color: var(--tes-blue); }
.tes-menu { display: none; position: relative; }
.tes-menu summary { list-style: none; cursor: pointer; width: 48px; height: 48px; border-radius: 12px; border: 2px solid var(--tes-blue); color: var(--tes-blue); display: flex; align-items: center; justify-content: center; box-sizing: border-box; }
.tes-menu summary::-webkit-details-marker { display: none; }
.tes-menu-panel { position: absolute; right: 0; top: 58px; z-index: 40; background: #FFFFFF; border: 1px solid var(--tes-line); border-radius: 16px; box-shadow: 0 10px 30px rgba(0,0,0,.12); padding: 10px; min-width: 250px; display: flex; flex-direction: column; }
.tes-menu-panel a { padding: 14px 16px; font-weight: 700; text-decoration: none; color: #2B3A4A; border-radius: 10px; }
.tes-menu-panel a:hover { background: var(--tes-tint-blue); }
.tes-menu-login { color: var(--tes-blue) !important; font-weight: 800 !important; border-top: 1px solid var(--tes-line); margin-top: 6px; }
.tes-strip { display: grid; grid-template-columns: repeat(4, 1fr); height: 6px; }
.tes-strip span:nth-child(1) { background: #5BB841; } .tes-strip span:nth-child(2) { background: #3A78C3; }
.tes-strip span:nth-child(3) { background: #FCBA23; } .tes-strip span:nth-child(4) { background: #E61E1E; }

/* ---------- footer ---------- */
.tes-footer { background: var(--tes-blue); color: #EEF3FA; padding: 56px 0 32px; overflow-wrap: anywhere; }
.tes-footer a { color: #FFFFFF; }
.tes-footer p { margin: 0; line-height: 1.7; }
.tes-footer-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.tes-footer-logo { background: #FFFFFF; border-radius: 14px; padding: 12px; width: max-content; margin-bottom: 14px; }
.tes-footer-logo img { height: 40px; width: auto; display: block; }
.tes-footer-tag { font-family: var(--wp--preset--font-family--poppins); font-weight: 700; font-size: 18px; color: #FFFFFF; }
.tes-footer-h { font-weight: 800; color: #FFF4D1; margin-bottom: 8px !important; }
.tes-footer-base { border-top: 1px solid #6B98D0; margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; font-size: 14px; color: #E3ECF7; }

/* ---------- WhatsApp button ---------- */
.tes-wa { position: fixed; right: 24px; bottom: 24px; z-index: 50; display: flex; align-items: center; gap: 10px; background: #1F7A3A; color: #FFFFFF; text-decoration: none; font-weight: 800; padding: 14px 20px; border-radius: 999px; box-shadow: 0 6px 18px rgba(0,0,0,.18); }
.tes-wa:hover { color: #FFFFFF; background: #18652F; }

/* ---------- Maths Corner ---------- */
.tes-chips-nav { display: flex; gap: 10px; flex-wrap: wrap; }
.tes-chips-nav a { text-decoration: none; font-weight: 800; padding: 10px 18px; border-radius: 999px; background: #FFFFFF; color: var(--tes-blue); border: 2px solid #CFC8B4; }
.tes-chips-nav a.is-active { background: var(--tes-blue); color: #FFFFFF; border-color: var(--tes-blue); }
.tes-posts .wp-block-post-template { margin-top: 0; }
.tes-post-card { display: flex; flex-direction: column; gap: 10px; height: 100%; }
.tes-post-card > * { margin: 0 !important; }
.tes-post-card .wp-block-post-title { font-size: 21px; line-height: 1.3; font-weight: 700; }
.tes-post-card .wp-block-post-title a { text-decoration: none; }
.tes-post-card .wp-block-post-excerpt__excerpt { margin: 0; }
.tes-post-card .wp-block-post-date { margin-top: auto !important; font-weight: 700; }
.wp-block-query-pagination { margin-top: 32px; gap: 12px; font-weight: 800; }
.tes-article { font-size: 18px; }
.tes-article > * + * { margin-block-start: 18px; }

/* ---------- trial form ---------- */
.tes-form-card { padding: 32px; }
.tes-form { display: flex; flex-direction: column; gap: 22px; }
.tes-form fieldset { border: 0; padding: 0; margin: 0; }
.tes-form legend { font-weight: 800; color: var(--tes-blue); margin-bottom: 10px; padding: 0; }
.tes-hint { margin: 0 0 10px !important; font-size: 15px; color: var(--tes-muted); }
.tes-choice-row { display: flex; gap: 10px; flex-wrap: wrap; }
.tes-choice input, .tes-class input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.tes-choice span { display: inline-flex; align-items: center; min-height: 52px; box-sizing: border-box; padding: 12px 20px; border-radius: 999px; font-weight: 800; cursor: pointer; background: #FFFFFF; color: var(--tes-blue); border: 2px solid #CFC8B4; }
.tes-choice input:checked + span, .tes-class input:checked + span { background: var(--tes-blue); color: #FFFFFF; border-color: var(--tes-blue); }
.tes-choice input:focus-visible + span, .tes-class input:focus-visible + span { outline: 3px solid var(--tes-yellow); outline-offset: 2px; }
.tes-class-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; }
.tes-class[hidden] { display: none; }
.tes-class span { display: flex; flex-direction: column; gap: 2px; min-height: 52px; padding: 14px 16px; border-radius: 16px; cursor: pointer; background: #FFFFFF; color: var(--tes-blue); border: 2px solid #CFC8B4; font-weight: 600; }
.tes-class strong { font-size: 18px; }
.tes-class em { font-style: normal; font-size: 14px; font-weight: 700; }
.tes-class input:disabled + span { opacity: .5; cursor: not-allowed; }
.tes-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.tes-form label:not(.tes-choice):not(.tes-class):not(.tes-check) { display: flex; flex-direction: column; gap: 6px; font-weight: 800; color: var(--tes-blue); }
.tes-form input[type=text], .tes-form input[type=tel], .tes-form input[type=email], .tes-form select, .tes-form textarea { font: inherit; padding: 13px 16px; border: 2px solid #CFC8B4; border-radius: 12px; background: #FFFFFF; color: var(--tes-ink); font-weight: 600; min-height: 52px; box-sizing: border-box; width: 100%; }
.tes-form.tes-tried :invalid { border-color: var(--tes-red); }
.tes-check { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; }
.tes-check input { width: 22px; height: 22px; margin-top: 2px; flex: none; }
.tes-submit { font: inherit; font-weight: 800; font-size: 18px; color: var(--tes-ink); background: var(--tes-yellow); border: 0; border-radius: 999px; padding: 16px 26px; min-height: 56px; cursor: pointer; }
.tes-submit:hover { background: #E9A90F; }
.tes-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tes-form-error { background: #FCE4E4; color: #8A1212; border-radius: 12px; padding: 12px 16px; font-weight: 700; margin: 0; }
.tes-thanks { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.tes-thanks h2 { margin: 0; font-size: 32px; }
.tes-thanks p { margin: 0; font-size: 19px; }
.tes-thanks-tick { width: 64px; height: 64px; border-radius: 50%; background: #E2F2D9; color: var(--tes-green); font-size: 32px; font-weight: 800; display: flex; align-items: center; justify-content: center; }

/* ---------- tablet ---------- */
@media (max-width: 1024px) {
	.tes-grid-3, .tes-grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.tes-nav, .tes-hide-md { display: none !important; }
	.tes-menu { display: block; }
	.tes-footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
	.tes-two { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
/* ---------- phone ---------- */
@media (max-width: 640px) {
	.tes-grid-2, .tes-grid-3, .tes-grid-4, .tes-fields, .tes-footer-grid { grid-template-columns: minmax(0, 1fr); }
	.tes-wrap, .tes-content > :not(.tes-section) { padding-inline: 16px; }
	.tes-section { padding-block: 48px; }
	.tes-card { padding: 22px; }
	.tes-offer { padding: 26px; }
	.wp-block-buttons > .wp-block-button { width: 100%; }
	.wp-block-buttons > .wp-block-button .wp-block-button__link { width: 100%; }
	.tes-wa-label { display: none; }
	.tes-wa { padding: 14px; right: 16px; bottom: 16px; }
	.tes-banner { font-size: 13px; padding: 8px 12px; }
	.tes-logo img { height: 38px; }
	.tes-header-actions .tes-pill { padding: 10px 14px; }
	.tes-form-card { padding: 22px; }
}
