/* ==========================================================================
   Homedecorio theme. Colors, fonts, widths and radius come from the
   Customizer through the CSS variables defined in :root (see inc/options.php).
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
	margin: 0;
	background: var(--bg);
	color: var(--text);
	font-family: var(--font-body);
	font-size: var(--base-size);
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
	--line: color-mix(in srgb, var(--text) 14%, transparent);
	--accent-deep: color-mix(in srgb, var(--accent) 65%, #000);
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--accent-deep); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, h4, h5, h6 {
	font-family: var(--font-head);
	font-weight: var(--hw);
	line-height: 1.15;
	margin: 0 0 .6em;
	color: var(--text);
	letter-spacing: -.005em;
}
p { margin: 0 0 1.2em; }
ul, ol { padding-left: 1.3em; }
button, input, select, textarea { font: inherit; color: inherit; }

.screen-reader-text {
	border: 0; clip: rect(1px,1px,1px,1px); clip-path: inset(50%);
	height: 1px; margin: -1px; overflow: hidden; padding: 0; position: absolute; width: 1px; word-wrap: normal;
}
.skip-link:focus {
	clip: auto; clip-path: none; height: auto; width: auto; margin: 0;
	left: 1rem; top: 1rem; z-index: 1000; background: var(--surface); padding: .8rem 1.2rem; border-radius: 6px;
}

.container { width: min(var(--container), 100% - 2.5rem); margin-inline: auto; }
.container.narrow { width: min(760px, 100% - 2.5rem); }
.container.wide { width: min(1000px, 100% - 2.5rem); }

/* ---------- Buttons ---------- */
.btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
	padding: .8rem 1.5rem; border-radius: 999px; border: 1.5px solid transparent;
	font-weight: 700; font-size: .95rem; line-height: 1.2; text-decoration: none; cursor: pointer;
	transition: background-color .2s, color .2s, border-color .2s;
}
.btn-small { padding: .5rem 1rem; font-size: .85rem; }
.btn-primary { background: var(--primary); color: var(--on-primary); }
.btn-primary:hover { background: var(--accent); color: var(--on-accent); }
.btn-outline { border-color: var(--primary); color: var(--primary); background: transparent; }
.btn-outline:hover { background: var(--primary); color: var(--on-primary); }
.btn-accent { background: var(--accent); color: var(--on-accent); }
.btn-accent:hover { background: var(--surface); color: var(--text); }

.icon-btn {
	display: inline-flex; align-items: center; justify-content: center;
	width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: var(--text); cursor: pointer;
}
.icon-btn:hover { background: color-mix(in srgb, var(--primary) 10%, transparent); }

/* ---------- Top bar & header ---------- */
.topbar { background: var(--primary); color: var(--on-primary); text-align: center; font-size: .875rem; padding: .5rem 1rem; }
.topbar a { color: inherit; }
.site-header { background: var(--header-bg); border-bottom: 1px solid var(--line); position: relative; z-index: 50; }
.has-sticky-header .site-header { position: sticky; top: 0; }
.admin-bar.has-sticky-header .site-header { top: 32px; }
.header-inner { display: flex; align-items: center; gap: 2rem; min-height: 78px; }
.site-branding { flex: none; }
.site-branding img { max-height: 56px; width: auto; }
.site-title { font-family: var(--font-head); font-weight: var(--hw); font-size: 1.85rem; color: var(--primary); text-decoration: none; letter-spacing: -.01em; }
.site-title:hover { color: var(--primary); }

.main-nav { margin-left: auto; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; gap: 1.6rem; }
.main-nav li { position: relative; }
.main-nav a { display: block; padding: .5rem 0; color: var(--text); font-weight: 500; font-size: .98rem; text-decoration: none; }
.main-nav a:hover, .main-nav .current-menu-item > a, .main-nav .current-menu-ancestor > a { color: var(--primary); box-shadow: inset 0 -2px 0 var(--accent); }
.main-nav .sub-menu {
	position: absolute; left: -1rem; top: 100%; min-width: 210px; display: block;
	background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .5rem 0;
	opacity: 0; visibility: hidden; transform: translateY(6px); transition: opacity .18s, transform .18s, visibility .18s;
	box-shadow: 0 14px 30px -18px rgba(0,0,0,.35);
}
.main-nav li:hover > .sub-menu, .main-nav li:focus-within > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.main-nav .sub-menu a { padding: .5rem 1.1rem; box-shadow: none !important; }
.main-nav .sub-menu a:hover { background: color-mix(in srgb, var(--primary) 8%, transparent); }
.sub-toggle { display: none; }

.header-actions { display: flex; align-items: center; gap: .5rem; }
.nav-toggle { display: none; }

.search-panel { border-top: 1px solid var(--line); background: var(--header-bg); padding: 1.2rem 0; }
.search-panel[hidden] { display: none; }
.search-form { display: flex; gap: .6rem; max-width: 640px; }
.search-field {
	flex: 1; min-width: 0; padding: .75rem 1.2rem; border-radius: 999px;
	border: 1.5px solid var(--line); background: var(--surface);
}
.search-field:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 40%, transparent); }

/* ---------- Hero ---------- */
.hero { padding: clamp(2.5rem, 6vw, 5.5rem) 0 clamp(2rem, 4vw, 3.5rem); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem, 6vw, 6rem); align-items: center; }
.hero-title { font-size: clamp(2.5rem, 5.6vw, 4.6rem); line-height: 1.04; letter-spacing: -.015em; margin-bottom: .5em; max-width: 14ch; }
.hero-text { font-size: 1.15rem; color: var(--muted); max-width: 46ch; margin-bottom: 1.8rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .8rem; }
.hero-media { position: relative; max-width: 440px; width: 100%; margin-left: auto; padding: 0 14px 14px 0; }
.hero-arch {
	position: relative; z-index: 1; aspect-ratio: 4 / 5; overflow: hidden;
	border-radius: 999px 999px 0 0; background: color-mix(in srgb, var(--primary) 14%, var(--bg));
}
.hero-arch img, .hero-arch .thumb-placeholder { width: 100%; height: 100%; object-fit: cover; }
.hero-media::before {
	content: ""; position: absolute; inset: 14px 0 0 14px; border: 2px solid var(--accent);
	border-radius: 999px 999px 0 0;
}
.hero-caption {
	position: absolute; z-index: 2; left: -1.6rem; bottom: 2.2rem; max-width: 250px;
	background: var(--surface); padding: .85rem 1.1rem; border-radius: var(--radius);
	text-decoration: none; color: var(--text); box-shadow: 0 16px 32px -20px rgba(0,0,0,.45);
}
.hero-caption:hover { color: var(--text); }
.hero-caption-label { display: block; font-size: .78rem; color: var(--muted); margin-bottom: .15rem; }
.hero-caption-title { display: block; font-family: var(--font-head); font-weight: var(--hw); line-height: 1.25; font-size: 1rem; }

/* ---------- Section titles ---------- */
.section-title {
	display: flex; align-items: center; gap: 1.2rem;
	font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 1.6rem;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ---------- Category tiles ---------- */
.cats { padding: clamp(1.5rem, 3vw, 2.5rem) 0 clamp(2rem, 4vw, 3.5rem); }
.cat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 1.6rem; }
.cat-tile { display: block; max-width: 240px; width: 100%; margin-inline: auto; text-align: center; text-decoration: none; color: var(--text); }
.cat-tile:hover { color: var(--text); }
.cat-arch {
	display: block; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 999px 999px 0 0;
	background: color-mix(in srgb, var(--primary) 14%, var(--bg)); margin-bottom: .9rem;
}
.cat-arch img, .cat-arch .thumb-placeholder { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.cat-tile:hover .cat-arch img { transform: scale(1.05); }
.cat-tile:nth-child(3n+2) .cat-arch { background: color-mix(in srgb, var(--accent) 22%, var(--bg)); }
.cat-name { display: block; font-family: var(--font-head); font-weight: var(--hw); font-size: 1.15rem; line-height: 1.2; }
.cat-count { display: block; font-size: .85rem; color: var(--muted); }

/* ---------- Layout with sidebar ---------- */
.posts-section { padding: 1rem 0 clamp(3rem, 6vw, 5rem); }
.content-layout { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: start; }
.content-layout.has-sidebar { grid-template-columns: minmax(0, 1fr) 320px; }
.content-layout.has-sidebar.sidebar-left { grid-template-columns: 320px minmax(0, 1fr); }
.content-layout.sidebar-left .sidebar { order: -1; }
.content-layout.no-sidebar { grid-template-columns: minmax(0, 1fr); }
.content-main { min-width: 0; }

/* ---------- Cards ---------- */
.post-grid { display: grid; grid-template-columns: repeat(var(--cols), minmax(0, 1fr)); gap: 2.8rem 2rem; }
.related-grid { --cols: 3; }
.card { display: flex; flex-direction: column; min-width: 0; }
.card-media { display: block; aspect-ratio: var(--ratio); overflow: hidden; border-radius: var(--radius); background: color-mix(in srgb, var(--primary) 12%, var(--bg)); margin-bottom: 1rem; }
.card-media img, .card-media .thumb-placeholder { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.card:hover .card-media img { transform: scale(1.03); }
.card-cat {
	align-self: flex-start; font-size: .85rem; font-weight: 700; color: var(--primary);
	text-decoration: none; margin-bottom: .45rem; padding-bottom: 2px; border-bottom: 2px solid var(--accent);
}
.card-cat:hover { color: var(--accent-deep); }
.card-title { font-size: 1.4rem; line-height: 1.22; margin-bottom: .55rem; }
.card-title a { color: var(--text); text-decoration: none; background: linear-gradient(var(--accent), var(--accent)) 0 100% / 0 2px no-repeat; transition: background-size .3s; }
.card-title a:hover { background-size: 100% 2px; color: var(--text); }
.card-excerpt { color: var(--muted); font-size: .98rem; margin-bottom: .8rem; }
.meta { display: flex; flex-wrap: wrap; align-items: center; gap: .15rem 1.2rem; color: var(--muted); font-size: .85rem; }
.meta a { color: inherit; text-decoration: none; }
.meta a:hover { color: var(--primary); text-decoration: underline; }

.card-wide { grid-column: 1 / -1; display: grid; grid-template-columns: 1.3fr 1fr; gap: 2rem; align-items: center; }
.card-wide .card-media { margin-bottom: 0; aspect-ratio: 3 / 2; }
.card-wide .card-title { font-size: clamp(1.7rem, 2.6vw, 2.3rem); }
.card-wide .card-excerpt { font-size: 1.05rem; }

.thumb-placeholder { display: block; background: color-mix(in srgb, var(--primary) 14%, var(--bg)); }

/* ---------- Sidebar & widgets ---------- */
.sidebar { position: sticky; top: 110px; }
.widget { background: var(--surface); border-radius: var(--radius); padding: 1.5rem; margin-bottom: 1.5rem; border: 1px solid var(--line); }
.widget-title { font-size: 1.2rem; margin-bottom: .8rem; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: .4rem 0; border-bottom: 1px solid var(--line); }
.widget li:last-child { border-bottom: 0; }
.widget a { text-decoration: none; }
.widget a:hover { text-decoration: underline; }
.about-card { text-align: center; }
.about-photo { width: 120px; aspect-ratio: 3 / 4; margin: 0 auto 1rem; border-radius: 999px 999px 0 0; overflow: hidden; background: color-mix(in srgb, var(--accent) 22%, var(--bg)); }
.about-photo img, .about-photo .thumb-placeholder { width: 100%; height: 100%; object-fit: cover; }
.about-card p { font-size: .95rem; color: var(--muted); }

/* ---------- Pagination ---------- */
.pagination { margin-top: 3rem; }
.pagination ul { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 0; }
.pagination a, .pagination span {
	display: inline-flex; min-width: 42px; height: 42px; padding: 0 .9rem; align-items: center; justify-content: center;
	border-radius: 999px; border: 1.5px solid var(--line); text-decoration: none; font-weight: 700; font-size: .92rem; background: var(--surface); color: var(--text);
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .current { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.pagination .dots { border-color: transparent; background: transparent; }

/* ---------- Archive header ---------- */
.archive-header { padding: clamp(2.5rem, 5vw, 4rem) 0 2rem; max-width: 760px; }
.archive-title { font-size: clamp(2rem, 4.2vw, 3.2rem); margin-bottom: .3em; }
.archive-desc { color: var(--muted); font-size: 1.1rem; }
.empty { padding: 3rem 0; }

/* ---------- Single ---------- */
.entry-header { padding: clamp(2.5rem, 5vw, 4rem) 0 1.5rem; text-align: center; }
.entry-header .card-cat { align-self: center; display: inline-block; margin-bottom: 1rem; }
.entry-title { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.1; margin-bottom: .6em; }
.entry-header .meta { justify-content: center; }
.entry-hero { margin-top: 0; margin-bottom: 2.5rem; }
.entry-hero img { width: 100%; border-radius: var(--radius); }
.entry-hero figcaption { font-size: .85rem; color: var(--muted); text-align: center; margin-top: .6rem; }

.entry-content { font-size: 1.08rem; line-height: 1.8; }
.entry-content > * { max-width: 100%; }
.entry-content h2 { font-size: 1.9rem; margin: 2.2em 0 .6em; }
.entry-content h3 { font-size: 1.45rem; margin: 1.9em 0 .5em; }
.entry-content h4 { font-size: 1.2rem; margin: 1.6em 0 .4em; }
.entry-content img { border-radius: var(--radius); }
.entry-content figure { margin: 2em 0; }
.entry-content figcaption, .wp-caption-text { font-size: .85rem; color: var(--muted); text-align: center; margin-top: .5rem; }
.entry-content blockquote {
	margin: 2em 0; padding: .2em 0 .2em 1.6rem; border-left: 3px solid var(--accent);
	font-family: var(--font-head); font-size: 1.3rem; line-height: 1.45; font-weight: var(--hw);
}
.entry-content blockquote p { margin-bottom: .6em; }
.entry-content blockquote cite { font-family: var(--font-body); font-size: .9rem; color: var(--muted); font-style: normal; }
.entry-content ul, .entry-content ol { margin: 0 0 1.4em; }
.entry-content li { margin-bottom: .4em; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 2em 0; font-size: .96rem; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: .6rem .8rem; text-align: left; }
.entry-content th { background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.entry-content hr { border: 0; border-top: 1px solid var(--line); margin: 2.5em 0; }
.entry-content pre { background: var(--surface); padding: 1rem; overflow: auto; border-radius: var(--radius); border: 1px solid var(--line); }
.entry-content .alignwide { width: min(1000px, 100vw - 2.5rem); max-width: none; margin-inline: calc((100% - min(1000px, 100vw - 2.5rem)) / 2); }
.entry-content .alignfull { width: 100vw; max-width: none; margin-left: calc(50% - 50vw); }
.entry-content .alignleft { float: left; margin: .3em 1.5em 1em 0; max-width: 50%; }
.entry-content .alignright { float: right; margin: .3em 0 1em 1.5em; max-width: 50%; }
.entry-content .aligncenter { margin-inline: auto; }
.wp-block-button__link { border-radius: 999px; background: var(--primary); color: var(--on-primary); }
.page-links { margin: 2rem 0; font-weight: 700; }
.fullwidth-content { font-size: inherit; }
.fullwidth-content > * { max-width: none; }

.entry-footer { padding-bottom: 3rem; }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2rem 0 1.5rem; }
.tags a { font-size: .85rem; padding: .3rem .8rem; border-radius: 999px; background: color-mix(in srgb, var(--primary) 10%, transparent); text-decoration: none; }
.tags a:hover { background: var(--primary); color: var(--on-primary); }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: 1.2rem 0; border-block: 1px solid var(--line); margin-bottom: 2rem; }
.share-label { font-family: var(--font-head); font-weight: var(--hw); margin-right: .5rem; }
.author-box { display: flex; gap: 1.4rem; align-items: center; background: var(--surface); padding: 1.6rem; border-radius: var(--radius); border: 1px solid var(--line); margin-bottom: 2rem; }
.author-avatar { flex: none; width: 88px; aspect-ratio: 3 / 4; overflow: hidden; border-radius: 999px 999px 0 0; background: color-mix(in srgb, var(--accent) 22%, var(--bg)); }
.author-avatar img { width: 100%; height: 100%; object-fit: cover; }
.author-name { font-size: 1.25rem; margin-bottom: .3rem; }
.author-name a { color: var(--text); text-decoration: none; }
.author-box p { margin: 0; color: var(--muted); font-size: .96rem; }
.post-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.post-nav a { display: block; padding: 1rem 1.2rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); font-family: var(--font-head); font-weight: var(--hw); line-height: 1.3; background: var(--surface); }
.post-nav a:hover { border-color: var(--primary); }
.post-nav span { display: block; font-family: var(--font-body); font-weight: 500; font-size: .8rem; color: var(--muted); margin-bottom: .2rem; }
.post-nav-next { grid-column: 2; text-align: right; }
.post-nav-prev:only-child { grid-column: 1; }

.related { padding: 1rem 0 clamp(3rem, 6vw, 5rem); }

/* ---------- Comments ---------- */
.comments { padding: 1rem 0 4rem; }
.comments-title { font-size: 1.6rem; }
.comment-list { list-style: none; padding: 0; }
.comment-list .children { list-style: none; padding-left: 1.5rem; border-left: 2px solid var(--line); }
.comment-body { padding: 1.2rem 0; border-bottom: 1px solid var(--line); }
.comment-author { display: flex; align-items: center; gap: .7rem; font-weight: 700; }
.comment-author img { border-radius: 50%; }
.comment-metadata { font-size: .82rem; color: var(--muted); margin-bottom: .5rem; }
.comment-metadata a { color: inherit; text-decoration: none; }
.comment-form label { display: block; font-weight: 700; font-size: .9rem; margin-bottom: .25rem; }
.comment-form input[type="text"], .comment-form input[type="email"], .comment-form input[type="url"], .comment-form textarea {
	width: 100%; padding: .75rem 1rem; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface);
}
.comment-form .submit { background: var(--primary); color: var(--on-primary); border: 0; padding: .8rem 1.6rem; border-radius: 999px; font-weight: 700; cursor: pointer; }
.comment-form .submit:hover { background: var(--accent); color: var(--on-accent); }

/* ---------- Newsletter ---------- */
.newsletter { background: var(--primary); color: var(--on-primary); padding: clamp(2.5rem, 5vw, 4rem) 0; }
.newsletter h2 { color: inherit; font-size: clamp(1.7rem, 3vw, 2.3rem); margin-bottom: .3em; }
.newsletter p { margin: 0; opacity: .85; }
.newsletter-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; align-items: center; }
.newsletter-form form { display: flex; gap: .6rem; flex-wrap: wrap; }
.newsletter-form input[type="email"], .newsletter-form input[type="text"] { flex: 1; min-width: 200px; padding: .8rem 1.2rem; border-radius: 999px; border: 0; color: #111; background: #fff; }
.newsletter-note { font-size: .9rem; }
.newsletter-form a { color: inherit; }

/* ---------- Footer ---------- */
.site-footer { background: var(--footer-bg); color: var(--on-footer); font-size: .95rem; }
.site-footer a { color: inherit; }
.site-footer .widget { background: transparent; border: 0; padding: 0; margin-bottom: 1rem; }
.site-footer .widget-title { color: inherit; font-size: 1.25rem; }
.site-footer .widget li { border-color: color-mix(in srgb, var(--on-footer) 18%, transparent); }
.footer-cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 3rem; padding: clamp(2.5rem, 5vw, 4rem) 0 2rem; }
.footer-cols p { opacity: .8; }
.social-links { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; margin: 1rem 0 0; }
.site-footer .social-links li { padding: 0; border: 0; }
.social-links a { display: inline-block; padding: .35rem .9rem; border: 1px solid color-mix(in srgb, var(--on-footer) 35%, transparent); border-radius: 999px; font-size: .85rem; text-decoration: none; }
.social-links a:hover { background: var(--on-footer); color: var(--footer-bg); }
.footer-bottom { border-top: 1px solid color-mix(in srgb, var(--on-footer) 18%, transparent); padding: 1.2rem 0; font-size: .85rem; }
.footer-bottom-inner { display: flex; flex-wrap: wrap; gap: .6rem 2rem; justify-content: space-between; align-items: center; }
.copyright { margin: 0; opacity: .8; }
.footer-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: 0; padding: 0; }
.footer-nav a { text-decoration: none; opacity: .85; }
.footer-nav a:hover { opacity: 1; text-decoration: underline; }

.to-top {
	position: fixed; right: 1.2rem; bottom: 1.2rem; z-index: 40; width: 44px; height: 44px; border-radius: 50%;
	border: 0; background: var(--primary); color: var(--on-primary); cursor: pointer; display: flex; align-items: center; justify-content: center;
	box-shadow: 0 10px 24px -10px rgba(0,0,0,.5);
}
.to-top[hidden] { display: none; }
.to-top:hover { background: var(--accent); color: var(--on-accent); }

/* ---------- 404 ---------- */
.not-found { text-align: center; padding: clamp(3rem, 8vw, 6rem) 0; }
.not-found-arch {
	width: 150px; aspect-ratio: 3 / 4; margin: 0 auto 1.5rem; border-radius: 999px 999px 0 0;
	background: var(--primary); color: var(--on-primary); display: flex; align-items: flex-end; justify-content: center; padding-bottom: 1.5rem;
	font-family: var(--font-head); font-size: 2rem;
}
.not-found .search-form { margin: 1.5rem auto; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
	.content-layout.has-sidebar, .content-layout.has-sidebar.sidebar-left { grid-template-columns: minmax(0, 1fr); }
	.content-layout.sidebar-left .sidebar { order: 0; }
	.sidebar { position: static; }
	.footer-cols { grid-template-columns: 1fr 1fr; }
	.related-grid { --cols: 2; }
}

@media (max-width: 900px) {
	.header-inner { min-height: 68px; gap: 1rem; }
	.header-actions { margin-left: auto; }
	.header-btn { display: none; }
	.nav-toggle { display: inline-flex; }
	.main-nav {
		display: none; position: absolute; left: 0; right: 0; top: 100%; margin: 0;
		background: var(--header-bg); border-bottom: 1px solid var(--line);
		padding: .5rem 1.25rem 1.5rem; max-height: calc(100vh - 80px); overflow: auto;
	}
	.main-nav.is-open { display: block; }
	.main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
	.main-nav li { border-bottom: 1px solid var(--line); }
	.main-nav a { padding: .9rem 0; }
	.main-nav a:hover, .main-nav .current-menu-item > a { box-shadow: none; }
	.main-nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: 0; padding: 0 0 .5rem 1rem; min-width: 0; display: none; background: transparent; }
	.main-nav li.is-open > .sub-menu { display: block; }
	.main-nav .menu-item-has-children > a { padding-right: 3rem; }
	.sub-toggle { display: flex; position: absolute; right: 0; top: .3rem; width: 40px; height: 40px; align-items: center; justify-content: center; border: 0; background: transparent; cursor: pointer; }
	.sub-toggle::before { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); transition: transform .2s; }
	.is-open > .sub-toggle::before { transform: rotate(225deg); }

	.hero-grid { grid-template-columns: 1fr; }
	.hero-media { margin: 0 auto; max-width: 360px; }
	.hero-caption { left: 0; }
	.newsletter-inner { grid-template-columns: 1fr; }
}

@media (max-width: 782px) { .admin-bar.has-sticky-header .site-header { top: 46px; } }

@media (max-width: 680px) {
	.post-grid, .related-grid { grid-template-columns: minmax(0, 1fr); }
	.card-wide { grid-template-columns: 1fr; gap: 1rem; }
	.card-wide .card-media { margin-bottom: 0; }
	.footer-cols { grid-template-columns: 1fr; gap: 1.5rem; }
	.post-nav { grid-template-columns: 1fr; }
	.post-nav-next { grid-column: 1; text-align: left; }
	.author-box { flex-direction: column; text-align: center; }
	.entry-content .alignleft, .entry-content .alignright { float: none; max-width: 100%; margin: 1em auto; }
	.search-form { flex-direction: column; }
}

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