/*
Theme Name: BodyWise Pro
Theme URI: https://bodywisetips.com/
Author: BodyWiseTips
Author URI: https://bodywisetips.com/
Description: A premium editorial-wellness theme for BodyWiseTips: hero with search + trending rail, explore-by-topic tiles, tabbed recommended reads, and a full articles grid. Fast, mobile-first, AdSense-ready.
Version: 3.6.1
Requires at least: 5.9
Tested up to: 6.7
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: bodywise-pro
Tags: blog, news, two-columns, right-sidebar, custom-menu, featured-images, threaded-comments, editorial
*/

/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
  --bg:          #f6f2ea;
  --bg-alt:      #efe9dd;
  --surface:     #ffffff;
  --ink:         #19231d;
  --ink-soft:    #4d574f;
  --ink-faint:   #8a9189;
  --brand:       #1f5640;
  --brand-deep:  #143b2c;
  --brand-tint:  #e7efe9;
  --accent:      #cf7d4f;
  --accent-deep: #b3633a;
  --accent-tint: #f6e6da;
  --line:        #e5ddcd;
  --line-soft:   #efe9dd;

  --radius:      18px;
  --radius-sm:   12px;
  --shadow-sm:   0 1px 2px rgba(25,35,29,.04), 0 2px 6px rgba(25,35,29,.05);
  --shadow-md:   0 6px 18px rgba(25,35,29,.07), 0 2px 6px rgba(25,35,29,.05);
  --shadow-lg:   0 18px 50px rgba(25,35,29,.16);

  --font-display: "Poppins", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --wrap: 1200px;
  --ease: cubic-bezier(.22,.61,.36,1);
}

/* ============================================================
   2. RESET & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.7;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--accent-deep); }
h1,h2,h3,h4 { font-family: var(--font-display); color: var(--ink); line-height: 1.12; font-weight: 600; margin: 0 0 .5em; letter-spacing: -.01em; }
p { margin: 0 0 1.2em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 16px; top: 16px; background: var(--brand); color:#fff; padding: 10px 16px; border-radius: 8px; z-index: 999; }

/* ============================================================
   3. HEADER
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(246,242,234,.97);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), box-shadow .3s var(--ease), background .3s var(--ease);
}
.site-header.is-stuck { border-bottom-color: var(--line); box-shadow: 0 6px 24px rgba(25,35,29,.06); }
.topbar { background: var(--brand-deep); color: #d9e6df; font-size: 13px; letter-spacing: .02em; }
.topbar .wrap { display:flex; justify-content:space-between; align-items:center; min-height: 38px; padding-top:6px; padding-bottom:6px; }
.topbar a { color: #f0e3d6; }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 0; transition: padding .3s var(--ease); }
.is-stuck .header-inner { padding: 11px 0; }
.brand { display: flex; flex-direction: column; line-height: 1; }
.brand .name { font-family: var(--font-display); font-weight: 600; font-size: 28px; color: var(--ink); letter-spacing: -.02em; }
.brand .tag { font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-faint); margin-top: 5px; font-weight: 600; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav ul { list-style: none; display: flex; align-items: center; gap: 4px; margin: 0; padding: 0; }
.nav li { position: relative; }
.nav a { display: block; padding: 9px 14px; font-size: 15px; font-weight: 600; color: var(--ink); border-radius: 10px; }
.nav a:hover, .nav .current-menu-item > a { color: var(--brand); background: var(--brand-tint); }
.nav .sub-menu {
  position: absolute; top: 100%; left: 0; min-width: 210px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); padding: 8px; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .22s var(--ease); z-index: 50;
}
.nav li:hover > .sub-menu { opacity: 1; visibility: visible; transform: translateY(0); }
.nav .sub-menu a { padding: 8px 12px; font-weight: 500; }

.header-tools { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; cursor: pointer; color: var(--ink); transition: all .2s var(--ease); }
.icon-btn:hover { border-color: var(--brand); color: var(--brand); transform: translateY(-1px); }
.menu-toggle { display: none; }

/* search dropdown */
.search-pop { position: absolute; right: 24px; top: 100%; width: min(420px, 90vw); background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 14px; transform-origin: top right; opacity: 0; visibility: hidden; transform: scale(.96) translateY(6px); transition: all .2s var(--ease); z-index: 90; }
.search-pop.open { opacity: 1; visibility: visible; transform: scale(1) translateY(0); }
.search-pop form { display: flex; gap: 8px; }
.search-pop input[type=search] { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 11px 14px; font-family: inherit; font-size: 15px; background: var(--bg); }
.search-pop input[type=search]:focus { outline: none; border-color: var(--brand); }
.search-pop button { border: none; background: var(--brand); color: #fff; border-radius: 10px; padding: 0 18px; font-weight: 600; cursor: pointer; }

/* ============================================================
   4. BUTTONS, PILLS, SECTION HEADS
   ============================================================ */
.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--brand); color: #fff; font-weight: 700; font-size: 15px; padding: 13px 22px; border-radius: 999px; transition: transform .2s var(--ease), box-shadow .2s var(--ease), background .2s; }
.btn:hover { color: #fff; background: var(--brand-deep); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(4px); }
.btn-ghost { background: transparent; color: var(--brand); border: 1.5px solid var(--line); }
.btn-ghost:hover { background: var(--brand-tint); color: var(--brand); border-color: var(--brand); }

.cat-pill { display: inline-block; font-family: var(--font-body); font-size: 11.5px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--brand); background: var(--brand-tint); padding: 5px 12px; border-radius: 999px; transition: all .2s var(--ease); }
a.cat-pill:hover { background: var(--brand); color: #fff; }

.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin: 0 0 28px; }
.section-head h2 { font-size: clamp(26px, 3.4vw, 38px); margin: 0; position: relative; padding-left: 18px; }
.section-head h2::before { content: ""; position: absolute; left: 0; top: .12em; bottom: .12em; width: 5px; border-radius: 4px; background: var(--accent); }
.section-head .more { font-weight: 700; font-size: 15px; white-space: nowrap; }

/* ============================================================
   5. HERO (front page)
   ============================================================ */
.hero { padding: 44px 0 8px; }
.hero-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 30px; align-items: stretch; }
@media (max-width: 900px){ .hero-grid { grid-template-columns: 1fr; } }

.hero-feature { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 480px; display: flex; align-items: flex-end; box-shadow: var(--shadow-md); isolation: isolate; }
.hero-feature .ph { position:absolute; inset:0; background: linear-gradient(135deg,#2c5d49,#1d3f31); z-index:-2; }
.hero-feature img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transition: transform .9s var(--ease); }
.hero-feature:hover img { transform: scale(1.045); }
.hero-feature::after { content:""; position: absolute; inset: 0; background: linear-gradient(to top, rgba(15,28,22,.92) 0%, rgba(15,28,22,.55) 38%, rgba(15,28,22,.05) 72%); z-index: -1; }
.hero-feature .inner { padding: 36px; color: #fff; position: relative; z-index: 2; }
.hero-feature h1, .hero-feature h2 { color: #fff; font-size: clamp(28px, 3.6vw, 46px); margin: 12px 0 10px; }
.hero-feature .excerpt { color: rgba(255,255,255,.86); font-size: 16px; max-width: 60ch; margin-bottom: 16px; }
.hero-feature .meta { color: rgba(255,255,255,.8); font-size: 13.5px; font-weight: 600; letter-spacing: .02em; }
.hero-feature .cat-pill { background: rgba(255,255,255,.16); color: #fff; backdrop-filter: blur(4px); }

.hero-side { display: flex; flex-direction: column; gap: 18px; }
.hero-side .mini { display: grid; grid-template-columns: 104px 1fr; gap: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px; align-items: center; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.hero-side .mini:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--brand-tint); }
.hero-side .mini .thumb { width: 104px; height: 84px; border-radius: 10px; overflow: hidden; background: var(--brand-tint); }
.hero-side .mini .thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.hero-side .mini:hover .thumb img { transform: scale(1.08); }
.hero-side .mini h3 { font-size: 17px; line-height: 1.25; margin: 7px 0 0; }
.hero-side .mini .meta { font-size: 12.5px; color: var(--ink-faint); font-weight: 600; }

/* ============================================================
   6. ARTICLE CARDS / GRID
   ============================================================ */
.section { padding: 46px 0; }
.section.alt { background: var(--bg-alt); border-top: 1px solid var(--line-soft); border-bottom: 1px solid var(--line-soft); }

.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
@media (max-width: 900px){ .card-grid { grid-template-columns: repeat(2,1fr); gap: 20px; } }
@media (max-width: 600px){ .card-grid { grid-template-columns: 1fr; } }
.card-grid.is-sparse { grid-template-columns: repeat(2, minmax(0, 360px)); justify-content: center; }
@media (max-width: 600px){ .card-grid.is-sparse { grid-template-columns: 1fr; } }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; box-shadow: var(--shadow-sm); transition: transform .3s var(--ease), box-shadow .3s var(--ease), border-color .3s; }
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); border-color: var(--brand-tint); }
.card .media { aspect-ratio: 16/10; overflow: hidden; background: var(--brand-tint); }
.card .media img { width: 100%; height: 100%; object-fit: cover; transition: transform .55s var(--ease); }
.card:hover .media img { transform: scale(1.06); }
.card .body { padding: 20px 20px 22px; display: flex; flex-direction: column; flex: 1; }
.card .body .cat-pill { align-self: flex-start; margin-bottom: 12px; }
.card h3 { font-size: 21px; line-height: 1.22; margin: 0 0 10px; }
.card h3 a { color: var(--ink); background-image: linear-gradient(var(--accent),var(--accent)); background-size: 0% 2px; background-repeat: no-repeat; background-position: 0 100%; transition: background-size .3s var(--ease), color .2s; padding-bottom: 1px; }
.card:hover h3 a, .card h3 a:hover { color: var(--brand); background-size: 100% 2px; }
.card .excerpt { font-size: 14.5px; color: var(--ink-soft); margin: 0 0 16px; }
.card .meta { margin-top: auto; font-size: 12.5px; color: var(--ink-faint); font-weight: 600; display: flex; gap: 10px; align-items: center; }
.card .meta .dot { width: 3px; height: 3px; border-radius: 50%; background: var(--ink-faint); }

/* ============================================================
   7. EXPLORE BY TOPIC
   ============================================================ */
.topic-grid { display: grid; grid-template-columns: repeat(3,1fr); gap: 26px; }
@media (max-width: 900px){ .topic-grid { grid-template-columns: repeat(2,1fr);} }
@media (max-width: 600px){ .topic-grid { grid-template-columns: 1fr;} }
.topic-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.topic-nav { display: flex; gap: 8px; flex-shrink: 0; }
.topic-arrow { width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--ink); cursor: pointer; display: grid; place-items: center; transition: all .2s var(--ease); }
.topic-arrow:hover { border-color: var(--brand); color: var(--brand); }
.topic-arrow:disabled { opacity: .3; cursor: default; }
.topic-slider { display: flex; gap: 26px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth; padding-bottom: 4px; scrollbar-width: none; -ms-overflow-style: none; }
.topic-slider::-webkit-scrollbar { display: none; }
.topic-slider .topic { flex: 0 0 300px; scroll-snap-align: start; }
@media (max-width: 600px){ .topic-slider .topic { flex: 0 0 80%; } }
.topic { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 230px; display: flex; align-items: flex-end; box-shadow: var(--shadow-sm); isolation: isolate; }
.topic .ph { position:absolute; inset:0; background: linear-gradient(135deg,#2c5d49,#1d3f31); z-index:-2; }
.topic img { position:absolute; inset:0; width:100%; height:100%; object-fit: cover; z-index:-2; transition: transform .6s var(--ease); }
.topic:hover img { transform: scale(1.07); }
.topic::after { content:""; position:absolute; inset:0; background: linear-gradient(to top, rgba(15,28,22,.86), rgba(15,28,22,.12)); z-index:-1; }
.topic .inner { padding: 22px; color: #fff; }
.topic h3 { color:#fff; font-size: 24px; margin: 0 0 3px; }
.topic .count { font-size: 13px; color: rgba(255,255,255,.82); font-weight: 600; }
.topic .go { position: absolute; top: 18px; right: 18px; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.18); backdrop-filter: blur(4px); display: grid; place-items: center; color: #fff; transition: all .25s var(--ease); }
.topic:hover .go { background: var(--accent); transform: rotate(-45deg); }

/* ============================================================
   8. LAYOUT WITH SIDEBAR (single / archive)
   ============================================================ */
.layout { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 48px; padding: 44px 24px; align-items: start; }
@media (max-width: 1000px){ .layout { grid-template-columns: minmax(0, 1fr); gap: 36px; } }
.sidebar { position: sticky; top: 96px; display: flex; flex-direction: column; gap: 26px; }
@media (max-width: 1000px){ .sidebar { position: static; } }
.widget { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-sm); }
.widget .widget-title { font-size: 16px; text-transform: uppercase; letter-spacing: .06em; font-family: var(--font-body); font-weight: 800; color: var(--ink); margin: 0 0 14px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { padding: 8px 0; border-bottom: 1px dashed var(--line-soft); }
.widget li:last-child { border-bottom: 0; }
.widget a { color: var(--ink-soft); font-weight: 600; }
.widget a:hover { color: var(--brand); }

/* ============================================================
   9. SINGLE POST
   ============================================================ */
.progress-bar { position: fixed; top: 0; left: 0; height: 3px; width: 0; background: linear-gradient(90deg,var(--brand),var(--accent)); z-index: 200; transition: width .1s linear; }
.article-head { max-width: 820px; margin: 0 auto; padding: 40px 24px 24px; text-align: center; }
.article-head .cat-pill { margin-bottom: 18px; }
.article-head h1 { font-size: clamp(30px, 4.4vw, 52px); margin: 0 0 18px; }
.article-head .dek { font-size: 20px; color: var(--ink-soft); max-width: 64ch; margin: 0 auto 22px; line-height: 1.5; }
.article-meta { display: flex; align-items: center; justify-content: center; gap: 14px; flex-wrap: wrap; color: var(--ink-faint); font-size: 14px; font-weight: 600; }
.article-meta .avatar { width: 38px; height: 38px; border-radius: 50%; }
.article-hero-img { max-width: 1080px; margin: 0 auto 8px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow-md); }
.article-hero-img img { width: 100%; }

.entry-content { font-size: 18.5px; line-height: 1.78; color: #25302a; overflow-wrap: break-word; word-wrap: break-word; min-width: 0; }
.article-main { min-width: 0; }
.entry-content img, .entry-content video, .entry-content iframe, .entry-content embed, .entry-content object { max-width: 100%; height: auto; }
.entry-content table { display: block; max-width: 100%; overflow-x: auto; }
.entry-content pre { max-width: 100%; overflow-x: auto; white-space: pre-wrap; word-break: break-word; }
.entry-content > * { max-width: 100%; }
.entry-content p, .entry-content ul, .entry-content ol, .entry-content blockquote, .entry-content figure, .entry-content table, .entry-content h2, .entry-content h3 { margin-left: auto; margin-right: auto; }
.entry-content h2 { font-size: 30px; margin: 1.7em 0 .5em; }
.entry-content h3 { font-size: 23px; margin: 1.4em 0 .4em; }
.entry-content a { font-weight: 600; text-decoration: underline; text-decoration-color: var(--accent-tint); text-underline-offset: 3px; }
.entry-content a:hover { text-decoration-color: var(--accent); }
.entry-content img { border-radius: var(--radius-sm); margin: 1.4em auto; }
.entry-content blockquote { border-left: 4px solid var(--accent); background: var(--brand-tint); margin: 1.6em 0; padding: 18px 24px; border-radius: 0 12px 12px 0; font-size: 18px; }
.entry-content blockquote p:last-child { margin-bottom: 0; }
.entry-content ul, .entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: .5em; }
.entry-content table { width: 100%; border-collapse: collapse; margin: 1.5em 0; font-size: 16px; }
.entry-content th, .entry-content td { border: 1px solid var(--line); padding: 11px 14px; text-align: left; }
.entry-content th { background: var(--brand-tint); font-family: var(--font-body); }
.entry-content figure { margin: 1.5em auto; }

.author-box { display: flex; gap: 18px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin: 40px 0; box-shadow: var(--shadow-sm); }
.author-box img { width: 64px; height: 64px; border-radius: 50%; flex-shrink: 0; }
.author-box h4 { margin: 0 0 6px; font-size: 19px; }
.author-box p { margin: 0; color: var(--ink-soft); font-size: 15px; }

.post-nav { display: flex; justify-content: space-between; gap: 16px; margin: 36px 0; flex-wrap: wrap; }
.post-nav a { flex: 1; min-width: 240px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px; box-shadow: var(--shadow-sm); transition: all .25s var(--ease); }
.post-nav a:hover { border-color: var(--brand); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.post-nav .lbl { font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-faint); font-weight: 800; }
.post-nav .ttl { font-family: var(--font-display); font-size: 17px; color: var(--ink); display: block; margin-top: 4px; }
.post-nav .next { text-align: right; }

/* ============================================================
   10. ADS
   ============================================================ */
.ad-zone { margin: 26px auto; text-align: center; }
.ad-zone .lbl { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 6px; }
.ad-zone ins, .ad-zone .ad-inner { display: block; }
.ad-sticky-side { position: sticky; top: 96px; }
.ad-anchor { position: fixed; left: 0; right: 0; bottom: 0; background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -4px 20px rgba(25,35,29,.1); z-index: 150; padding: 8px; text-align: center; display: none; }
.ad-anchor .close { position: absolute; right: 8px; top: -26px; width: 26px; height: 26px; border-radius: 50% 50% 0 0; background: var(--surface); border: 1px solid var(--line); border-bottom: none; cursor: pointer; font-size: 16px; line-height: 1; color: var(--ink-soft); }
@media (max-width: 1000px){ .ad-anchor.show { display: block; } }

/* ============================================================
   11. FOOTER
   ============================================================ */
.site-footer { background: #14201a; color: #c4d1ca; margin-top: 10px; }
.footer-cta { background: var(--brand); }
.footer-cta .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 34px 24px; flex-wrap: wrap; }
.footer-cta h3 { color: #fff; margin: 0; font-size: 26px; }
.footer-cta p { color: rgba(255,255,255,.82); margin: 4px 0 0; }
.footer-cta .btn { background: var(--accent); }
.footer-cta .btn:hover { background: var(--accent-deep); }

.footer-main { padding: 54px 0 30px; }
.footer-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 36px; }
@media (max-width: 900px){ .footer-cols { grid-template-columns: 1fr 1fr; gap: 30px; } }
@media (max-width: 520px){ .footer-cols { grid-template-columns: 1fr; } }
.footer-cols .brand .name { color: #fff; }
.footer-cols p { color: #9fb1a8; font-size: 15px; }
.footer-col h4 { color: #fff; font-size: 14px; text-transform: uppercase; letter-spacing: .08em; font-family: var(--font-body); margin: 0 0 16px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li { margin-bottom: 10px; }
.footer-col a { color: #a9b9b1; font-size: 15px; }
.footer-col a:hover { color: #fff; }
.social { display: flex; gap: 10px; margin-top: 16px; }
.social a { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,.07); display: grid; place-items: center; color: #cdd9d2; transition: all .25s var(--ease); }
.social a:hover { background: var(--accent); color: #fff; transform: translateY(-2px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); padding: 20px 0; font-size: 13.5px; color: #8c9d94; }
.footer-bottom .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ============================================================
   12. ARCHIVE / PAGE HEADERS, PAGINATION, MISC
   ============================================================ */
.page-hero { background: var(--bg-alt); border-bottom: 1px solid var(--line-soft); padding: 50px 0; text-align: center; }
.page-hero h1 { font-size: clamp(30px,4vw,46px); margin: 0 0 8px; }
.page-hero p { color: var(--ink-soft); margin: 0; max-width: 60ch; margin-inline: auto; }
.pagination { display: flex; justify-content: center; gap: 8px; margin: 44px 0 0; flex-wrap: wrap; }
.pagination .page-numbers { display: grid; place-items: center; min-width: 44px; height: 44px; padding: 0 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); font-weight: 700; color: var(--ink); transition: all .2s var(--ease); }
.pagination .page-numbers:hover, .pagination .current { background: var(--brand); color: #fff; border-color: var(--brand); }
.entry-content + .pagination { margin-top: 24px; }

/* comments (lean) */
.comments-area { max-width: 820px; margin: 30px auto; }
.comment-list { list-style: none; padding: 0; }
.comment-body { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 18px; margin-bottom: 14px; }
.comment-form input:not([type=submit]):not([type=button]):not([type=checkbox]):not([type=radio]), .comment-form textarea { width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font-family: inherit; margin-bottom: 12px; background: var(--surface); color: var(--ink); }
.comment-form input:focus, .comment-form textarea:focus { outline: none; border-color: var(--brand); }
.comment-form .form-submit { margin-top: 6px; }
.comment-form input[type=submit], .comment-form button[type=submit], .comment-form .submit { width: auto; background: var(--brand); color: #fff; border: none; font-weight: 700; font-size: 15px; padding: 13px 26px; border-radius: 999px; cursor: pointer; transition: background .2s var(--ease), transform .2s var(--ease), box-shadow .2s var(--ease); }
.comment-form input[type=submit]:hover, .comment-form button[type=submit]:hover, .comment-form .submit:hover { background: var(--brand-deep); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }

/* back to top */
.to-top { position: fixed; right: 22px; bottom: 22px; width: 48px; height: 48px; border-radius: 50%; background: var(--brand); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow-md); cursor: pointer; border: none; opacity: 0; visibility: hidden; transform: translateY(12px); transition: all .3s var(--ease); z-index: 140; }
.to-top.show { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--brand-deep); transform: translateY(-3px); }
@media (max-width: 1000px){ .to-top { bottom: 78px; } }

/* ============================================================
   13. MOTION — scroll reveal + page-load
   ============================================================ */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease); will-change: opacity, transform; }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"]{ transition-delay: .08s; }
.reveal[data-delay="2"]{ transition-delay: .16s; }
.reveal[data-delay="3"]{ transition-delay: .24s; }
.reveal[data-delay="4"]{ transition-delay: .32s; }

@keyframes floatUp { from { opacity: 0; transform: translateY(30px);} to { opacity: 1; transform: none; } }
.hero-feature .inner > * { animation: floatUp .8s var(--ease) both; }
.hero-feature .cat-pill { animation-delay: .05s; }
.hero-feature h1, .hero-feature h2 { animation-delay: .15s; }
.hero-feature .excerpt { animation-delay: .28s; }
.hero-feature .meta { animation-delay: .4s; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1 !important; transform: none !important; }
}

/* ============================================================
   14. MOBILE NAV
   ============================================================ */
@media (max-width: 860px){
  .menu-toggle { display: grid; position: relative; z-index: 130; }
  .nav { position: fixed; inset: 0 0 0 auto; width: min(82vw, 340px); background: var(--surface); flex-direction: column; align-items: stretch; padding: 84px 18px 24px; box-shadow: var(--shadow-lg); transform: translateX(100%); transition: transform .32s var(--ease); z-index: 120; overflow-y: auto; }
  .nav.open { transform: translateX(0); }
  .nav ul { flex-direction: column; align-items: stretch; gap: 2px; width: 100%; }
  .nav a { padding: 13px 14px; font-size: 16px; }
  .nav .sub-menu { position: static; opacity: 1; visibility: visible; transform: none; box-shadow: none; border: none; border-left: 2px solid var(--line); border-radius: 0; margin-left: 12px; padding: 0 0 0 6px; }
  .nav-overlay { position: fixed; inset: 0; background: rgba(20,32,26,.5); opacity: 0; visibility: hidden; transition: opacity .3s; z-index: 90; }
  .nav-overlay.open { opacity: 1; visibility: visible; }
  .brand .name { font-size: 23px; }
}

/* ============================================================
   15. HOME: HERO + SEARCH + TRENDING
   ============================================================ */
.home-hero { padding: 36px 0 10px; }
.hero-2col { display: grid; grid-template-columns: 1.7fr 1fr; gap: 28px; align-items: stretch; }
.hero-banner { position: relative; border-radius: var(--radius); overflow: hidden; min-height: 440px; display: flex; align-items: flex-end; background-size: cover; background-position: center; box-shadow: var(--shadow-md); isolation: isolate; }
.hero-banner.no-img { background: linear-gradient(135deg, var(--brand), var(--brand-deep)); }
.hero-banner::before { content:""; position:absolute; inset:0; background: linear-gradient(to top, rgba(15,28,22,.93), rgba(15,28,22,.5) 58%, rgba(15,28,22,.18)); z-index:0; }
.hero-inner { position: relative; z-index: 1; padding: 42px; color:#fff; width:100%; }
.hero-eyebrow { display:inline-block; font-size:12px; font-weight:800; letter-spacing:.16em; text-transform:uppercase; color: var(--accent); margin-bottom:12px; }
.hero-inner h1 { color:#fff; font-size: clamp(30px, 3.6vw, 48px); margin:0 0 12px; }
.hero-inner p { color: rgba(255,255,255,.9); font-size:16px; max-width:54ch; margin:0 0 22px; }
.hero-search form { display:flex; gap:8px; max-width:460px; }
.hero-search input[type=search] { flex:1; border:none; border-radius:999px; padding:14px 20px; font-family:inherit; font-size:15px; background:rgba(255,255,255,.96); color:var(--ink); }
.hero-search input[type=search]:focus { outline:2px solid var(--accent); }
.hero-search button { border:none; background: var(--accent); color:#fff; border-radius:999px; padding:0 24px; font-weight:700; cursor:pointer; font-family:inherit; transition: background .2s; }
.hero-search button:hover { background: var(--accent-deep); }

.trending { background: var(--surface); border:1px solid var(--line); border-radius: var(--radius); padding: 22px 22px 10px; box-shadow: var(--shadow-sm); }
.trend-title { font-size: 14px; text-transform: uppercase; letter-spacing:.08em; font-family: var(--font-body); font-weight:800; color: var(--ink); margin:0 0 8px; padding-bottom:10px; border-bottom:2px solid var(--accent); display:inline-block; }
.trend-list { list-style:none; margin:0; padding:0; }
.trend-list li { border-bottom:1px dashed var(--line-soft); }
.trend-list li:last-child { border-bottom:0; }
.trend-list a { display:grid; grid-template-columns: 20px 64px 1fr; gap:12px; align-items:center; padding:12px 0; }
.t-num { font-family: var(--font-display); font-size:20px; font-weight:600; color: var(--ink-faint); text-align:center; }
.t-thumb { width:64px; height:54px; border-radius:8px; overflow:hidden; background:var(--brand-tint); }
.t-thumb img { width:100%; height:100%; object-fit:cover; }
.t-thumb .ph { display:block; width:100%; height:100%; background: linear-gradient(135deg,#2c5d49,#1d3f31); }
.t-cat { display:block; font-size:10.5px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; color: var(--brand); margin-bottom:3px; }
.t-title { display:block; font-family: var(--font-display); font-size:15px; line-height:1.25; color: var(--ink); }
.trend-list a:hover .t-title { color: var(--brand); }

/* ============================================================
   16. HOME: RECOMMENDED READS (TABS)
   ============================================================ */
.rr-nav { display:flex; flex-wrap:wrap; gap:10px; margin-bottom:26px; }
.rr-tab { border:1px solid var(--line); cursor:pointer; font-family:inherit; font-weight:700; font-size:14.5px; padding:10px 20px; border-radius:999px; background: var(--surface); color: var(--ink); transition: all .2s var(--ease); }
.rr-tab:hover { border-color: var(--brand); color: var(--brand); }
.rr-tab.is-active { background: var(--brand); color:#fff; border-color: var(--brand); }
.rr-panel { display:none; }
.rr-panel.is-active { display:block; animation: rrFade .35s var(--ease) both; }
@keyframes rrFade { from { opacity:0; transform: translateY(8px);} to { opacity:1; transform:none; } }
.rr-grid { display:grid; grid-template-columns: 1fr 1fr; gap: 18px 36px; }
.rr-item { display:grid; grid-template-columns: 92px 1fr; gap:16px; align-items:center; padding:8px 0; }
.rr-thumb { width:92px; height:72px; border-radius:10px; overflow:hidden; background:var(--brand-tint); }
.rr-thumb img { width:100%; height:100%; object-fit:cover; transition: transform .5s var(--ease); }
.rr-item:hover .rr-thumb img { transform: scale(1.06); }
.rr-thumb .ph { display:block; width:100%; height:100%; background: linear-gradient(135deg,#2c5d49,#1d3f31); }
.rr-cat { display:block; font-size:10.5px; font-weight:800; letter-spacing:.07em; text-transform:uppercase; color: var(--brand); margin-bottom:4px; }
.rr-t { display:block; font-family: var(--font-display); font-size:17px; line-height:1.25; color: var(--ink); font-weight:600; }
.rr-item:hover .rr-t { color: var(--brand); }
.rr-empty { color: var(--ink-faint); }
.all-cta { text-align:center; margin-top:30px; }
.footer-email a { color:#a9b9b1; font-size:14px; }
.footer-email a:hover { color:#fff; }

/* ============================================================
   17. HOME RESPONSIVE
   ============================================================ */
@media (max-width: 980px){
  .hero-2col { grid-template-columns: 1fr; }
  .hero-banner { min-height: 360px; }
}
@media (max-width: 700px){
  .rr-grid { grid-template-columns: 1fr; gap:14px; }
  .hero-inner { padding: 26px; }
  .hero-inner h1 { font-size: 27px; }
}
@media (max-width: 420px){
  .hero-search form { flex-direction: column; }
  .hero-search button { padding:12px; }
}

/* ============================================================
   18. SINGLE-POST MOBILE POLISH
   ============================================================ */
@media (max-width: 700px){
  .article-head { text-align: left; padding: 26px 20px 16px; }
  .article-meta { justify-content: flex-start; }
  .layout { padding: 28px 20px; gap: 28px; }
  .entry-content { font-size: 17px; }
  .entry-content h2 { font-size: 25px; }
  .entry-content h3 { font-size: 20px; }
  .article-hero-img { border-radius: 12px; }
  .post-nav a { min-width: 100%; }
}

/* ============================================================
   19. HERO FEATURED ROTATOR
   ============================================================ */
.hero-featured { display: inline-flex; align-items: center; gap: 11px; max-width: 100%; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.24); padding: 7px 16px 7px 13px; border-radius: 999px; margin-bottom: 18px; }
.hf-label { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); white-space: nowrap; }
.hf-rotator { position: relative; list-style: none; margin: 0; padding: 0; height: 20px; line-height: 20px; overflow: hidden; width: 300px; max-width: 56vw; }
.hf-rotator li { position: absolute; left: 0; top: 0; width: 100%; opacity: 0; transform: translateY(8px); transition: opacity .45s var(--ease), transform .45s var(--ease); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
.hf-rotator li.is-active { opacity: 1; transform: none; pointer-events: auto; }
.hf-rotator a { display: block; color: #fff; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hf-rotator a:hover { color: var(--accent); }
@media (prefers-reduced-motion: reduce){ .hf-rotator li { transition: none; } }
@media (max-width: 480px){ .hf-rotator { max-width: 210px; } }
