/*
Theme Name: FAmiCal Custom Theme
Theme URI: https://startfa.com/
Author: STARTFA
Author URI: https://startfa.com/
Description: ธีม Landing Page / Content Hub สำหรับ startfa.com เพื่อส่งทราฟิกไปยัง FAmiCal (famical.startfa.com) รองรับบทความเดิมและปลั๊กอิน SEO (Rank Math / Yoast) ครบถ้วน
Version: 1.3.0
Requires at least: 6.0
Tested up to: 6.8
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: famical
Tags: one-column, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, blog, responsive-layout
*/

/* ==========================================================================
   1. Design tokens
   ========================================================================== */
:root {
	--navy-900: #0b1530;
	--navy-800: #111d3d;
	--navy-700: #17264f;
	--blue-600: #1e4fa3;
	--blue-500: #2a66c9;
	--amber-400: #f7c04a;
	--amber-500: #f5b82e;
	--amber-600: #e0a114;

	--ink: #0f1a33;
	--ink-soft: #4a5672;
	--line: #e3e8f2;
	--bg: #ffffff;
	--bg-soft: #f4f7fc;

	--radius-sm: 10px;
	--radius: 16px;
	--radius-lg: 24px;
	--shadow-sm: 0 1px 2px rgba(15, 26, 51, .06), 0 2px 8px rgba(15, 26, 51, .05);
	--shadow: 0 10px 30px rgba(15, 26, 51, .10);

	--container: 1180px;
	--gutter: 20px;
	--header-h: 68px;

	--font: "Noto Sans Thai", "Sarabun", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 12px); -webkit-text-size-adjust: 100%; }

body {
	margin: 0;
	font-family: var(--font);
	font-size: 17px;
	line-height: 1.75;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-500); }
h1, h2, h3, h4 { line-height: 1.35; margin: 0 0 .5em; font-weight: 700; color: var(--ink); }
p { margin: 0 0 1em; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--amber-500); outline-offset: 2px; border-radius: 4px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 780px; }
.icon { width: 1.25em; height: 1.25em; flex-shrink: 0; }

.screen-reader-text {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link:focus {
	position: fixed !important; top: 8px; left: 8px; z-index: 1000; width: auto; height: auto;
	clip: auto; padding: 10px 16px; background: #fff; color: var(--ink); border-radius: 8px;
}

/* ==========================================================================
   3. Buttons
   ========================================================================== */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5em;
	padding: .7em 1.3em; border-radius: 999px; border: 2px solid transparent;
	font-weight: 600; line-height: 1.3; text-align: center; cursor: pointer;
	transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease, color .15s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn .icon { width: 1.1em; height: 1.1em; transition: transform .15s ease; }
.btn:hover .icon { transform: translateX(3px); }

.btn-primary { background: var(--amber-500); color: var(--navy-900); box-shadow: 0 6px 20px rgba(245, 184, 46, .35); }
.btn-primary:hover { background: var(--amber-400); color: var(--navy-900); }
.btn-ghost { background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-ghost:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.btn-sm { padding: .5em 1em; font-size: .9rem; }
.btn-lg { padding: .85em 1.6em; font-size: 1.05rem; }

/* ==========================================================================
   4. Header
   ========================================================================== */
.site-header {
	position: sticky; top: 0; z-index: 100;
	background: rgba(11, 21, 48, .92);
	-webkit-backdrop-filter: saturate(160%) blur(10px);
	backdrop-filter: saturate(160%) blur(10px);
	border-bottom: 1px solid rgba(255, 255, 255, .06);
	transition: box-shadow .2s ease;
}
.admin-bar .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } }
.site-header.is-scrolled { box-shadow: 0 6px 24px rgba(0, 0, 0, .25); }

.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: var(--header-h); }

.site-title { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; }
.site-title:hover { color: #fff; }
.logo-mark {
	display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px;
	background: var(--amber-500); color: var(--navy-900); font-weight: 800;
}
.custom-logo { max-height: 44px; width: auto; }

.main-navigation { display: flex; align-items: center; gap: 20px; }
.main-navigation .menu { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-navigation .menu > li { position: relative; }
.main-navigation .menu a {
	display: block; padding: 8px 12px; border-radius: 8px;
	color: rgba(255, 255, 255, .82); font-size: .95rem; font-weight: 500;
}
.main-navigation .menu a:hover,
.main-navigation .current-menu-item > a { color: #fff; background: rgba(255, 255, 255, .08); }

/* Dropdown (desktop) */
.main-navigation .sub-menu {
	position: absolute; top: 100%; left: 0; min-width: 220px; list-style: none; margin: 0; padding: 8px;
	background: var(--navy-800); border: 1px solid rgba(255, 255, 255, .08); border-radius: 12px; box-shadow: var(--shadow);
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: .15s ease;
}
.main-navigation li:hover > .sub-menu,
.main-navigation li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }

.menu-toggle {
	display: none; background: transparent; border: 1px solid rgba(255, 255, 255, .2);
	color: #fff; border-radius: 10px; padding: 8px; cursor: pointer;
}

/* ==========================================================================
   5. Hero
   ========================================================================== */
.hero {
	position: relative; overflow: hidden; color: #fff;
	background:
		radial-gradient(900px 500px at 85% -10%, rgba(42, 102, 201, .55), transparent 60%),
		radial-gradient(700px 400px at -10% 110%, rgba(245, 184, 46, .14), transparent 60%),
		linear-gradient(160deg, var(--navy-900) 0%, var(--navy-700) 55%, var(--blue-600) 100%);
	padding: clamp(56px, 9vw, 112px) 0 clamp(64px, 10vw, 128px);
}
.hero-inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }

.badge {
	display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; margin-bottom: 20px;
	border-radius: 999px; font-size: .85rem; font-weight: 600;
	color: var(--amber-400); background: rgba(245, 184, 46, .12); border: 1px solid rgba(245, 184, 46, .4);
}
.badge-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--amber-500); box-shadow: 0 0 0 4px rgba(245, 184, 46, .25); }

.hero-title { color: #fff; font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.3; margin-bottom: 20px; }
.hero-subtitle { color: rgba(255, 255, 255, .78); font-size: clamp(1rem, 1.6vw, 1.15rem); max-width: 600px; margin-bottom: 32px; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 28px; }

.hero-points { display: flex; flex-wrap: wrap; gap: 8px 22px; list-style: none; padding: 0; margin: 0; color: rgba(255, 255, 255, .7); font-size: .92rem; }
.hero-points li { position: relative; padding-left: 22px; }
.hero-points li::before {
	content: ""; position: absolute; left: 0; top: .55em; width: 12px; height: 7px;
	border-left: 2px solid var(--amber-500); border-bottom: 2px solid var(--amber-500); transform: rotate(-45deg);
}

/* Mock app window */
.mock-window {
	background: rgba(17, 29, 61, .85); border: 1px solid rgba(255, 255, 255, .1); border-radius: var(--radius-lg);
	padding: 18px; box-shadow: 0 30px 80px rgba(0, 0, 0, .45);
	transform: perspective(1200px) rotateY(-6deg) rotateX(2deg);
}
.mock-bar { display: flex; gap: 6px; margin-bottom: 14px; }
.mock-bar span { width: 10px; height: 10px; border-radius: 50%; background: rgba(255, 255, 255, .2); }
.mock-bar span:first-child { background: #ff6b6b; }
.mock-bar span:nth-child(2) { background: var(--amber-500); }
.mock-bar span:nth-child(3) { background: #4cd38a; }
.mock-title { font-weight: 800; font-size: 1.5rem; text-align: center; margin-bottom: 14px; color: #fff; }
.mock-card {
	display: flex; align-items: center; gap: 14px; padding: 14px; margin-bottom: 10px;
	background: var(--navy-900); border: 1px solid rgba(255, 255, 255, .06); border-radius: 14px;
}
.mock-card:last-child { margin-bottom: 0; }
.mock-card strong { display: block; color: #fff; font-size: .95rem; }
.mock-card small { display: block; color: rgba(255, 255, 255, .55); font-size: .78rem; line-height: 1.4; }
.mock-icon { display: grid; place-items: center; width: 42px; height: 42px; flex-shrink: 0; border-radius: 12px; background: var(--amber-500); color: var(--navy-900); }

/* ==========================================================================
   6. Sections
   ========================================================================== */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 44px; }
.section-head h2 { font-size: clamp(1.6rem, 3vw, 2.3rem); margin: 0; }
.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; text-align: left; max-width: none; }
.eyebrow { display: inline-block; margin-bottom: 8px; color: var(--blue-600); font-weight: 700; font-size: .9rem; letter-spacing: .04em; }

.grid { display: grid; gap: 24px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; white-space: nowrap; }
.link-arrow .icon { width: 1em; height: 1em; transition: transform .15s ease; }
.link-arrow:hover .icon { transform: translateX(3px); }

/* Features */
.features { background: var(--bg-soft); }
.feature-card {
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 32px 28px;
	box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease;
}
.feature-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.feature-card h3 { font-size: 1.2rem; margin-top: 18px; }
.feature-card p { color: var(--ink-soft); margin: 0; font-size: .97rem; }
.feature-icon {
	display: grid; place-items: center; width: 56px; height: 56px; border-radius: 16px;
	background: linear-gradient(135deg, var(--amber-400), var(--amber-600)); color: var(--navy-900);
}
.feature-icon .icon { width: 28px; height: 28px; }

.tools { margin-top: 64px; }
.tools-title { text-align: center; font-size: 1.3rem; margin-bottom: 24px; }
.tool-card {
	display: flex; align-items: center; gap: 16px; padding: 18px 20px; border-radius: var(--radius);
	background: var(--navy-900); color: #fff; transition: transform .2s ease, background-color .2s ease;
}
.tool-card:hover { transform: translateY(-3px); background: var(--navy-700); color: #fff; }
.tool-icon { display: grid; place-items: center; width: 48px; height: 48px; flex-shrink: 0; border-radius: 14px; background: var(--amber-500); color: var(--navy-900); }
.tool-text strong { display: block; font-size: 1rem; }
.tool-text small { display: block; color: rgba(255, 255, 255, .6); font-size: .85rem; line-height: 1.5; }

/* Testimonials */
.testimonial-card {
	position: relative; margin: 0; padding: 32px 28px 28px; display: flex; flex-direction: column;
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
}
.quote-icon { color: var(--amber-500); margin-bottom: 12px; }
.quote-icon .icon { width: 32px; height: 32px; }
.testimonial-card blockquote { margin: 0 0 24px; flex: 1; color: var(--ink); font-size: 1.02rem; }
.testimonial-card blockquote p { margin: 0; }
.testimonial-card figcaption { display: flex; align-items: center; gap: 12px; }
.testimonial-card figcaption strong { display: block; font-size: .95rem; }
.testimonial-card figcaption small { display: block; color: var(--ink-soft); font-size: .85rem; line-height: 1.4; }
.avatar {
	display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; flex-shrink: 0;
	background: var(--navy-900); color: var(--amber-500); font-weight: 700;
}

/* Blog cards */
.blog { background: var(--bg-soft); }
.post-card {
	display: flex; flex-direction: column; overflow: hidden;
	background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm);
	transition: transform .2s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.post-card-thumb { display: block; aspect-ratio: 16 / 9; background: var(--navy-800); overflow: hidden; }
.post-card-thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb-placeholder { display: grid; place-items: center; width: 100%; height: 100%; color: var(--amber-500); }
.thumb-placeholder .icon { width: 48px; height: 48px; }
.post-card-body { display: flex; flex-direction: column; flex: 1; padding: 22px 24px 24px; }
.post-card-title { font-size: 1.12rem; margin-bottom: 10px; }
.post-card-title a { color: var(--ink); }
.post-card-title a:hover { color: var(--blue-600); }
.post-card-excerpt { color: var(--ink-soft); font-size: .95rem; flex: 1; }

.post-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 10px; font-size: .85rem; color: var(--ink-soft); }
.post-cat { padding: 2px 10px; border-radius: 999px; background: rgba(30, 79, 163, .08); color: var(--blue-600); font-weight: 600; }

.category-pills { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 40px; }
.category-pills a {
	padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff;
	color: var(--ink); font-size: .92rem;
}
.category-pills a:hover { border-color: var(--blue-600); color: var(--blue-600); }

/* ==========================================================================
   7. Single / Archive (บทความเดิม)
   ========================================================================== */
.content-area { padding-top: 48px; padding-bottom: 72px; }
.content-area.has-sidebar { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 48px; }
.content-area:not(.has-sidebar) .content-main { max-width: 820px; margin: 0 auto; }

.entry-title { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
.entry-thumb { margin: 24px 0 32px; border-radius: var(--radius); overflow: hidden; }
.entry-thumb img { width: 100%; }

.entry-content { font-size: 1.06rem; }
.entry-content > * + * { margin-top: 1.1em; }
.entry-content h2 { font-size: 1.6rem; margin-top: 1.8em; }
.entry-content h3 { font-size: 1.3rem; margin-top: 1.5em; }
.entry-content img { border-radius: var(--radius-sm); }
.entry-content a { text-decoration: underline; text-underline-offset: 3px; }
.entry-content blockquote { margin: 1.5em 0; padding: 16px 24px; border-left: 4px solid var(--amber-500); background: var(--bg-soft); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; }
.entry-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 10px 12px; }
.entry-content .alignwide { margin-left: -60px; margin-right: -60px; }
.entry-content .aligncenter { margin-left: auto; margin-right: auto; }
.entry-content .alignleft { float: left; margin: 0 1.5em 1em 0; }
.entry-content .alignright { float: right; margin: 0 0 1em 1.5em; }
.wp-caption-text, figcaption { font-size: .88rem; color: var(--ink-soft); text-align: center; }

.entry-footer { margin-top: 48px; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 32px; }
.tag-list a { padding: 4px 12px; border-radius: 999px; background: var(--bg-soft); color: var(--ink-soft); font-size: .88rem; }


.post-navigation .nav-links { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.post-navigation a { display: block; height: 100%; padding: 16px 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); color: var(--ink); }
.post-navigation a:hover { border-color: var(--blue-600); }
.post-navigation small { display: block; color: var(--ink-soft); }
.post-navigation .nav-next { text-align: right; }

.archive-header { margin-bottom: 32px; }
.archive-title { font-size: clamp(1.6rem, 3vw, 2.2rem); }
.archive-description { color: var(--ink-soft); }

.pagination { margin-top: 40px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.pagination .page-numbers { min-width: 42px; padding: 8px 14px; text-align: center; border: 1px solid var(--line); border-radius: 10px; color: var(--ink); }
.pagination .page-numbers.current { background: var(--navy-900); border-color: var(--navy-900); color: #fff; }

/* Ad slots (ช่องโฆษณา) */
.ad-slot {
	display: block; margin: 32px 0; padding: 12px 12px 16px; text-align: center;
	background: var(--bg-soft); border: 1px dashed var(--line); border-radius: var(--radius);
	min-height: 120px; overflow: hidden; /* จองพื้นที่ไว้ กันหน้ากระตุก (CLS) */
}
.ad-label { display: block; margin-bottom: 8px; font-size: .72rem; letter-spacing: .08em; color: var(--ink-soft); text-transform: uppercase; }
.ad-widget + .ad-widget { margin-top: 16px; }
.ad-home-wrap { padding-bottom: 8px; }
.ad-home-wrap .ad-slot { margin: 48px 0; }
.sidebar .ad-slot { margin: 0; min-height: 250px; }
@media (min-width: 1025px) {
	.sidebar .ad-sticky { position: sticky; top: calc(var(--header-h) + 24px); }
}

/* โฆษณากลางบทความ: ไม่มีกรอบ ให้กลืนกับเนื้อหา คั่นด้วยเส้นบางบน-ล่าง */
.entry-content .ad-in-content {
	margin: 2em 0; padding: 14px 0 18px; background: transparent; border: 0; border-radius: 0;
	border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); min-height: 280px;
}
/* โฆษณาในรายการบทความ: เต็มแถว ดีไซน์เหมือนการ์ด */
.grid > .ad-in-feed {
	grid-column: 1 / -1; margin: 0; background: #fff; border: 1px solid var(--line); border-style: solid; box-shadow: var(--shadow-sm);
}

/* กล่องชวนใช้เครื่องมือ FAmiCal ในบทความ / หมวดหมู่ */
.tool-cta {
	display: flex; align-items: center; gap: 20px; margin: 32px 0; padding: 24px 28px;
	border-radius: var(--radius); color: #fff;
	background:
		radial-gradient(400px 200px at 100% 0%, rgba(245, 184, 46, .18), transparent 70%),
		linear-gradient(135deg, var(--navy-900), var(--blue-600));
	box-shadow: var(--shadow);
}
.tool-cta-icon { display: grid; place-items: center; width: 56px; height: 56px; flex-shrink: 0; border-radius: 16px; background: var(--amber-500); color: var(--navy-900); }
.tool-cta-icon .icon { width: 28px; height: 28px; }
.tool-cta-body { flex: 1; min-width: 0; }
.tool-cta-eyebrow { display: block; color: var(--amber-400); font-size: .8rem; font-weight: 600; letter-spacing: .03em; }
.tool-cta-title { display: block; font-size: 1.15rem; line-height: 1.45; color: #fff; }
.tool-cta p { margin: 4px 0 0; color: rgba(255, 255, 255, .75); font-size: .95rem; line-height: 1.6; }
.tool-cta .btn { flex-shrink: 0; }
.tool-cta-slim { padding: 16px 20px; margin: 20px 0 0; }
.tool-cta-slim .tool-cta-icon { width: 44px; height: 44px; border-radius: 12px; }
.tool-cta-slim .tool-cta-title { font-size: 1rem; }
.entry-content .tool-cta a { text-decoration: none; }

/* เครื่องคิดภาษีย่อ → FAmiCal */
.tax-calc {
	margin: 32px 0; padding: 24px 28px; border-radius: var(--radius); color: #fff;
	background:
		radial-gradient(400px 200px at 100% 0%, rgba(245, 184, 46, .18), transparent 70%),
		linear-gradient(135deg, var(--navy-900), var(--blue-600));
	box-shadow: var(--shadow);
}
.tax-calc-head { display: flex; align-items: center; gap: 16px; margin-bottom: 18px; }
.tax-calc label { display: block; margin-bottom: 6px; font-size: .9rem; color: rgba(255, 255, 255, .8); }
.tax-calc-row { display: flex; gap: 10px; flex-wrap: wrap; }
.tax-calc-row input {
	flex: 1 1 180px; min-width: 0; padding: 12px 16px; font: inherit; font-size: 1.1rem; font-weight: 600;
	color: var(--ink); background: #fff; border: 0; border-radius: 12px;
}
.tax-calc-row .btn { flex: 0 0 auto; }
.tax-calc-result { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 16px; }
.tax-calc-result[hidden] { display: none; }
.tax-calc-figure { padding: 12px 16px; border-radius: 12px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .12); }
.tax-calc-figure small { display: block; font-size: .8rem; color: rgba(255, 255, 255, .7); }
.tax-calc-figure strong { display: block; font-size: 1.5rem; color: var(--amber-400); line-height: 1.3; }
.tax-calc-hint { grid-column: 1 / -1; margin: 0; font-size: .92rem; color: rgba(255, 255, 255, .85); }
.tax-calc-note { margin: 14px 0 0; font-size: .78rem; line-height: 1.6; color: rgba(255, 255, 255, .55); }
.entry-content .tax-calc a { text-decoration: none; }
@media (max-width: 640px) {
	.tax-calc { padding: 20px; }
	.tax-calc-row .btn { width: 100%; }
	.tax-calc-result { grid-template-columns: 1fr; }
}

/* Sidebar & widgets */
.sidebar .widget { margin-bottom: 32px; padding: 24px; border: 1px solid var(--line); border-radius: var(--radius); }
.widget-title { font-size: 1.05rem; margin-bottom: 12px; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.widget li:last-child { border-bottom: 0; }

/* Forms */
input[type="text"], input[type="email"], input[type="url"], input[type="search"], textarea {
	width: 100%; padding: 10px 14px; font: inherit; border: 1px solid var(--line); border-radius: 10px; background: #fff;
}
.search-form { display: flex; gap: 8px; }
.search-form label { flex: 1; }
.search-submit, input[type="submit"] {
	padding: 10px 18px; border: 0; border-radius: 10px; background: var(--navy-900); color: #fff; font: inherit; font-weight: 600; cursor: pointer;
}

/* Comments */
.comments-area { margin-top: 56px; }
.comment-list { list-style: none; padding: 0; }
.comment-list .comment { padding: 16px 0; border-bottom: 1px solid var(--line); }
.comment-list .children { list-style: none; padding-left: 24px; }
.comment-author img { display: inline-block; border-radius: 50%; vertical-align: middle; margin-right: 8px; }

/* ==========================================================================
   8. Footer
   ========================================================================== */
.site-footer { background: var(--navy-900); color: rgba(255, 255, 255, .7); }
.footer-cta {
	display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
	padding-top: 56px; padding-bottom: 56px; border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.footer-cta h2 { color: #fff; font-size: clamp(1.4rem, 2.6vw, 1.9rem); margin-bottom: 6px; }
.footer-cta p { margin: 0; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-top: 48px; padding-bottom: 32px; }
.footer-about p { margin-top: 14px; font-size: .95rem; }
.footer-menu { list-style: none; margin: 0; padding: 0; }
.footer-menu li { margin-bottom: 8px; }
.site-footer a { color: rgba(255, 255, 255, .8); }
.site-footer a:hover { color: var(--amber-400); }
.site-footer .widget-title { color: #fff; }
.site-footer .widget li { border-color: rgba(255, 255, 255, .08); }
.footer-bottom {
	display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
	padding-top: 20px; padding-bottom: 28px; border-top: 1px solid rgba(255, 255, 255, .08); font-size: .88rem;
}
.footer-bottom p { margin: 0; }

/* ==========================================================================
   9. Responsive
   ========================================================================== */
@media (max-width: 1024px) {
	.hero-inner { grid-template-columns: 1fr; gap: 48px; }
	.hero-visual { max-width: 520px; width: 100%; margin: 0 auto; }
	.mock-window { transform: none; }
	.grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
	.content-area.has-sidebar { grid-template-columns: 1fr; }
	.footer-grid { grid-template-columns: 1fr 1fr; }
	.entry-content .alignwide { margin-left: 0; margin-right: 0; }
}

@media (max-width: 860px) {
	.menu-toggle { display: inline-flex; }
	.main-navigation {
		position: absolute; top: 100%; left: 0; right: 0;
		flex-direction: column; align-items: stretch; gap: 12px; padding: 16px var(--gutter) 24px;
		background: var(--navy-900); border-bottom: 1px solid rgba(255, 255, 255, .08);
		box-shadow: 0 20px 40px rgba(0, 0, 0, .3);
		display: none;
	}
	.site-header.is-open .main-navigation { display: flex; }
	.main-navigation .menu { flex-direction: column; align-items: stretch; }
	.main-navigation .menu a { padding: 12px; font-size: 1rem; }
	.main-navigation .sub-menu {
		position: static; opacity: 1; visibility: visible; transform: none;
		background: transparent; border: 0; box-shadow: none; padding: 0 0 0 16px;
	}
	.header-cta { width: 100%; }
}

@media (max-width: 640px) {
	body { font-size: 16px; }
	.grid-2, .grid-3 { grid-template-columns: 1fr; }
	.hero-actions .btn { width: 100%; }
	.section-head-row { flex-direction: column; align-items: flex-start; }
	.footer-grid { grid-template-columns: 1fr; }
	.post-navigation .nav-links { grid-template-columns: 1fr; }
	.post-navigation .nav-next { text-align: left; }
	.tool-cta { flex-direction: column; align-items: flex-start; }
	.tool-cta .btn { width: 100%; }
	.entry-content .alignleft, .entry-content .alignright { float: none; margin: 1em 0; }
}

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	*, *::before, *::after { transition: none !important; animation: none !important; }
}
