/*
Theme Name: FameFile
Theme URI: https://famefilesblog.co.uk
Author: SAM Marketing Agency
Author URI: https://sammarketingagency.com
Description: FameFile is a light, glossy celebrity & lifestyle magazine theme — a warm ivory canvas, elegant Playfair Display headlines, a clean Manrope body face and a raspberry-rose accent. Features a magazine featured-story hero, a thumbnail "Latest Articles" sidebar, category sections, AJAX live search and AdSense-ready slots. Pure WordPress, no page builders — fast, accessible and Rank Math compatible.
Version: 1.0.0
Requires at least: 6.0
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: famefile
Tags: blog, news, entertainment, two-columns, right-sidebar, custom-colors, custom-logo, custom-menu, featured-images, sticky-post, threaded-comments, translation-ready, full-width-template
*/

/* ==========================================================================
   1. Tokens — warm light glossy magazine
   ========================================================================== */
:root {
  --fm-bg: #ffffff;
  --fm-cream: #faf7f2;
  --fm-blush: #fdeef3;
  --fm-surface: #ffffff;
  --fm-ink: #1b1420;
  --fm-text: #4a4452;
  --fm-soft: #6f6878;
  --fm-muted: #9b94a3;
  --fm-border: #ece8e3;
  --fm-border-2: #e1dbd3;

  --fm-accent: #e0356b;
  --fm-accent-dark: #c01f57;
  --fm-accent-soft: #fdeef3;
  --fm-gold: #c9a24b;

  --fm-shadow-xs: 0 1px 2px rgba(27,20,32,.05);
  --fm-shadow: 0 14px 40px rgba(27,20,32,.09);
  --fm-shadow-lg: 0 30px 70px rgba(27,20,32,.14);

  --fm-display: "Playfair Display", Georgia, "Times New Roman", serif;
  --fm-body: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;

  --fm-container: 1200px;
  --fm-narrow: 740px;
  --fm-radius: 16px;
  --fm-radius-sm: 10px;
  --fm-pill: 999px;
  --fm-ease: cubic-bezier(.22,1,.36,1);
}

/* ==========================================================================
   2. Base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 110px; }
body {
  margin: 0;
  font-family: var(--fm-body);
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--fm-text);
  background: var(--fm-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg, video { max-width: 100%; height: auto; display: block; }
a { color: var(--fm-accent-dark); text-decoration: none; transition: color .15s var(--fm-ease); }
a:hover { color: var(--fm-accent); }

h1, h2, h3, h4 {
  font-family: var(--fm-display);
  font-weight: 700;
  line-height: 1.14;
  color: var(--fm-ink);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); }
h3 { font-size: 1.35rem; }
p { margin: 0 0 1.2em; }

blockquote {
  margin: 1.8em 0; padding: .4em 0 .4em 1.5em;
  border-left: 4px solid var(--fm-accent);
  font-family: var(--fm-display);
  font-size: 1.45rem; font-style: italic;
  color: var(--fm-ink); line-height: 1.4;
}
code { background: var(--fm-cream); padding: .12em .4em; border-radius: 5px; font-size: .9em; }
pre { background: var(--fm-cream); padding: 1.1em; border-radius: var(--fm-radius-sm); overflow-x: auto; border: 1px solid var(--fm-border); }
:focus-visible { outline: 2px solid var(--fm-accent); outline-offset: 3px; border-radius: 3px; }

.fm-container { width: 100%; max-width: var(--fm-container); margin: 0 auto; padding: 0 1.5rem; }
.fm-narrow { max-width: var(--fm-narrow); margin: 0 auto; }
.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; z-index: 9999; background: var(--fm-accent); color: #fff; padding: .7em 1.2em; }
.skip-link:focus { left: 0; top: 0; }

.fm-eyebrow { display: inline-block; font-family: var(--fm-body); font-weight: 800; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; color: var(--fm-accent-dark); margin-bottom: 1rem; }

/* ==========================================================================
   3. Top bar + header
   ========================================================================== */
.fm-topbar { background: var(--fm-ink); color: #fff; font-size: .78rem; }
.fm-topbar-inner { display: flex; align-items: center; justify-content: space-between; min-height: 40px; gap: 1rem; }
.fm-topbar-date { color: rgba(255,255,255,.7); letter-spacing: .04em; text-transform: uppercase; font-weight: 600; }
.fm-topbar-social { display: flex; gap: .3rem; }
.fm-topbar-social a { width: 30px; height: 30px; display: grid; place-items: center; color: rgba(255,255,255,.75); border-radius: 50%; }
.fm-topbar-social a:hover { color: #fff; background: rgba(255,255,255,.12); }
.fm-topbar-social svg { width: 15px; height: 15px; }

.fm-header { position: sticky; top: 0; z-index: 300; background: color-mix(in srgb, var(--fm-bg) 90%, transparent); backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid var(--fm-border); }
.fm-header-top { display: flex; align-items: center; justify-content: center; padding: 1.5rem 0 1.1rem; }
.fm-brand { display: inline-flex; align-items: center; gap: .7rem; }
.fm-brand-logo img { max-height: 56px; width: auto; }
.fm-brand-mark { width: 44px; height: 44px; border-radius: 10px; background: var(--fm-accent); display: grid; place-items: center; flex-shrink: 0; }
.fm-brand-mark span { display: block; width: 20px; height: 2.5px; background: #fff; box-shadow: 0 -6px 0 #fff, 0 6px 0 #fff; }
.fm-brand-text { line-height: 1; }
.fm-brand-title { font-family: var(--fm-display); font-weight: 900; font-size: 2rem; letter-spacing: -.01em; color: var(--fm-ink); }
.fm-brand-title span { color: var(--fm-accent); }
.fm-brand-tag { display: block; font-size: .62rem; font-weight: 800; letter-spacing: .35em; text-transform: uppercase; color: var(--fm-muted); margin-top: .3rem; }

.fm-navbar { border-top: 1px solid var(--fm-border); }
.fm-navbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; min-height: 62px; }
.fm-menu { display: flex; list-style: none; margin: 0; padding: 0; gap: .2rem; align-items: center; flex-wrap: wrap; }
.fm-menu > li { position: relative; }
.fm-menu > li > a { display: block; padding: .6rem .95rem; font-weight: 700; font-size: .82rem; letter-spacing: .07em; text-transform: uppercase; color: var(--fm-soft); transition: color .16s var(--fm-ease); position: relative; }
.fm-menu > li > a:hover { color: var(--fm-ink); }
.fm-menu > .current-menu-item > a { color: var(--fm-accent-dark); }
.fm-menu > li > a::after { content: ""; position: absolute; left: .95rem; right: .95rem; bottom: .35rem; height: 2px; background: var(--fm-accent); border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .22s var(--fm-ease); }
.fm-menu > li:hover > a::after, .fm-menu > .current-menu-item > a::after { transform: scaleX(1); }

.fm-menu .sub-menu { position: absolute; top: calc(100% + 6px); left: 0; min-width: 210px; list-style: none; margin: 0; padding: .4rem; background: var(--fm-surface); border: 1px solid var(--fm-border); border-radius: var(--fm-radius-sm); box-shadow: var(--fm-shadow); opacity: 0; visibility: hidden; transform: translateY(8px); transition: all .2s var(--fm-ease); z-index: 50; }
.fm-menu li:hover > .sub-menu { opacity: 1; visibility: visible; transform: none; }
.fm-menu .sub-menu a { display: block; padding: .55rem .7rem; font-size: .85rem; font-weight: 700; color: var(--fm-soft); border-radius: 7px; text-transform: none; letter-spacing: 0; }
.fm-menu .sub-menu a:hover { background: var(--fm-cream); color: var(--fm-ink); }

.fm-nav-actions { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.fm-searchbox { display: flex; align-items: center; background: var(--fm-cream); border: 1px solid var(--fm-border); border-radius: var(--fm-pill); padding: .15rem .15rem .15rem 1rem; transition: border-color .2s var(--fm-ease); }
.fm-searchbox:focus-within { border-color: var(--fm-accent); }
.fm-searchbox input { border: none; background: none; font-family: inherit; font-size: .9rem; color: var(--fm-ink); outline: none; width: 180px; }
.fm-searchbox input::placeholder { color: var(--fm-muted); }
.fm-searchbox button { width: 38px; height: 38px; border: none; background: var(--fm-accent); color: #fff; border-radius: 50%; display: grid; place-items: center; cursor: pointer; transition: background .18s var(--fm-ease); }
.fm-searchbox button:hover { background: var(--fm-accent-dark); }
.fm-searchbox svg { width: 17px; height: 17px; }
.fm-icon-btn { width: 42px; height: 42px; display: grid; place-items: center; background: transparent; border: none; border-radius: 50%; cursor: pointer; color: var(--fm-soft); }
.fm-icon-btn:hover { background: var(--fm-cream); color: var(--fm-ink); }
.fm-icon-btn svg { width: 22px; height: 22px; }
.fm-burger { display: none; }

/* live search dropdown */
.fm-live { position: absolute; top: calc(100% + 8px); right: 0; width: 360px; max-width: 86vw; background: var(--fm-surface); border: 1px solid var(--fm-border); border-radius: var(--fm-radius-sm); box-shadow: var(--fm-shadow); max-height: 60vh; overflow-y: auto; display: none; z-index: 400; }
.fm-live.is-open { display: block; }
.fm-live-item { display: flex; gap: .9rem; padding: .8rem; border-bottom: 1px solid var(--fm-border); align-items: center; }
.fm-live-item:last-child { border-bottom: none; }
.fm-live-item img { width: 58px; height: 42px; object-fit: cover; border-radius: 7px; flex-shrink: 0; }
.fm-live-item .t { font-family: var(--fm-display); font-weight: 700; font-size: 1rem; color: var(--fm-ink); line-height: 1.2; }
.fm-live-item .m { font-size: .74rem; color: var(--fm-muted); text-transform: uppercase; letter-spacing: .06em; }
.fm-live-loading, .fm-live-empty { padding: 1rem; color: var(--fm-muted); }
.fm-nav-actions { position: relative; }

/* ==========================================================================
   4. Featured hero (magazine)
   ========================================================================== */
.fm-hero { padding: clamp(1.8rem,3vw,2.6rem) 0 0; }
.fm-hero-grid { display: grid; grid-template-columns: 1.7fr 1fr; gap: 1.6rem; }
.fm-feat-main { position: relative; border-radius: var(--fm-radius); overflow: hidden; min-height: 480px; display: flex; align-items: flex-end; box-shadow: var(--fm-shadow); }
.fm-feat-main img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--fm-ease); }
.fm-feat-main:hover img { transform: scale(1.04); }
.fm-feat-main::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,12,18,0) 32%, rgba(20,12,18,.5) 60%, rgba(20,12,18,.9) 100%); }
.fm-feat-inner { position: relative; z-index: 2; padding: 2.2rem; }
.fm-badge { display: inline-block; padding: .35em 1em; background: var(--fm-accent); color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; border-radius: var(--fm-pill); margin-bottom: 1rem; }
.fm-feat-title { font-size: clamp(1.7rem,3.2vw,2.8rem); line-height: 1.1; margin: 0 0 .5rem; color: #fff; }
.fm-feat-title a { color: #fff; }
.fm-feat-title a:hover { color: var(--fm-accent-soft); }
.fm-feat-meta { display: flex; align-items: center; gap: .6rem; color: rgba(255,255,255,.78); font-size: .82rem; }
.fm-feat-meta img { width: 26px; height: 26px; border-radius: 50%; }

.fm-feat-side { display: grid; grid-template-rows: repeat(3,1fr); gap: 1.6rem; }
.fm-feat-mini { position: relative; border-radius: var(--fm-radius-sm); overflow: hidden; min-height: 148px; display: flex; align-items: flex-end; }
.fm-feat-mini img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--fm-ease); }
.fm-feat-mini:hover img { transform: scale(1.05); }
.fm-feat-mini::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(20,12,18,0) 36%, rgba(20,12,18,.88) 100%); }
.fm-feat-mini-inner { position: relative; z-index: 2; padding: 1rem 1.1rem; }
.fm-feat-mini .cat { font-size: .64rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--fm-accent-soft); }
.fm-feat-mini h3 { font-size: 1.05rem; line-height: 1.2; margin: .2rem 0 0; color: #fff; }
.fm-feat-mini h3 a { color: #fff; }

/* ==========================================================================
   5. Sections
   ========================================================================== */
.fm-section { padding: clamp(2.6rem,5vw,4rem) 0; }
.fm-section-cream { background: var(--fm-cream); }
.fm-section-head { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-bottom: 2.2rem; border-bottom: 2px solid var(--fm-ink); padding-bottom: .8rem; }
.fm-section-title { font-size: clamp(1.5rem,2.6vw,2rem); margin: 0; position: relative; }
.fm-section-title::before { content: ""; display: inline-block; width: 12px; height: 12px; background: var(--fm-accent); border-radius: 3px; margin-right: .6rem; transform: rotate(45deg); }
.fm-section-link { font-weight: 800; font-size: .74rem; letter-spacing: .08em; text-transform: uppercase; color: var(--fm-soft); display: inline-flex; align-items: center; gap: .4rem; flex-shrink: 0; }
.fm-section-link:hover { color: var(--fm-accent-dark); }
.fm-section-link svg { width: 15px; height: 15px; }

/* ==========================================================================
   6. Layout + cards
   ========================================================================== */
.fm-content-grid { display: grid; grid-template-columns: 1fr 320px; gap: 3rem; align-items: start; }

.fm-grid { display: grid; gap: 1.6rem; }
.fm-grid-3 { grid-template-columns: repeat(3,1fr); }
.fm-grid-2 { grid-template-columns: repeat(2,1fr); }

.fm-card { background: var(--fm-surface); border: 1px solid var(--fm-border); border-radius: var(--fm-radius); overflow: hidden; display: flex; flex-direction: column; height: 100%; transition: transform .26s var(--fm-ease), box-shadow .26s var(--fm-ease), border-color .26s var(--fm-ease); }
.fm-card:hover { transform: translateY(-5px); box-shadow: var(--fm-shadow); border-color: transparent; }
.fm-card-thumb { position: relative; aspect-ratio: 16/10; overflow: hidden; background: var(--fm-cream); display: block; }
.fm-card-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--fm-ease); }
.fm-card:hover .fm-card-thumb img { transform: scale(1.05); }
.fm-cat { position: absolute; top: 12px; left: 12px; padding: .3em .8em; background: var(--fm-accent); color: #fff !important; font-size: .66rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; border-radius: var(--fm-pill); }
.fm-card-body { padding: 1.3rem; display: flex; flex-direction: column; flex: 1; }
.fm-card-title { font-family: var(--fm-display); font-weight: 700; font-size: 1.28rem; line-height: 1.2; margin: 0 0 .5rem; }
.fm-card-title a { color: var(--fm-ink); }
.fm-card-title a:hover { color: var(--fm-accent-dark); }
.fm-card-excerpt { color: var(--fm-soft); font-size: .92rem; margin: 0 0 1rem; flex: 1; }
.fm-meta { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--fm-muted); margin-top: auto; }
.fm-meta .fm-avatar { width: 24px; height: 24px; border-radius: 50%; }
.fm-meta-sep::before { content: "•"; margin-right: .5rem; color: var(--fm-accent); }

/* ==========================================================================
   7. Sidebar + Latest Articles list
   ========================================================================== */
.fm-sidebar { position: sticky; top: 130px; }
.fm-widget { margin-bottom: 2rem; }
.fm-widget-card { background: var(--fm-surface); border: 1px solid var(--fm-border); border-radius: var(--fm-radius); padding: 1.5rem; }
.fm-widget-title { font-family: var(--fm-display); font-weight: 800; font-size: 1.25rem; margin: 0 0 .4rem; color: var(--fm-ink); }
.fm-widget-rule { height: 3px; width: 100%; background: var(--fm-ink); border-radius: 3px; margin-bottom: 1.2rem; position: relative; overflow: hidden; }
.fm-widget-rule::after { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 60px; background: var(--fm-accent); }
.fm-widget ul { list-style: none; padding: 0; margin: 0; }
.fm-widget > ul > li { padding: .55rem 0; border-bottom: 1px solid var(--fm-border); }
.fm-widget > ul > li:last-child { border-bottom: none; }
.fm-widget a { color: var(--fm-soft); font-weight: 700; font-size: .92rem; }
.fm-widget a:hover { color: var(--fm-accent-dark); }

.fm-list-item { display: flex; gap: .9rem; padding: .85rem 0; border-bottom: 1px solid var(--fm-border); }
.fm-list-item:last-child { border-bottom: none; padding-bottom: 0; }
.fm-list-item img { width: 78px; height: 64px; object-fit: cover; border-radius: 8px; flex-shrink: 0; background: var(--fm-cream); }
.fm-list-title { font-family: var(--fm-display); font-weight: 700; font-size: 1rem; line-height: 1.22; margin: 0 0 .35rem; }
.fm-list-title a { color: var(--fm-ink); }
.fm-list-title a:hover { color: var(--fm-accent-dark); }
.fm-list-meta { font-size: .72rem; color: var(--fm-muted); text-transform: uppercase; letter-spacing: .07em; font-weight: 700; }

.fm-ad { margin: 2rem auto; text-align: center; background: var(--fm-cream); border-radius: var(--fm-radius-sm); padding: .6rem; min-height: 90px; display: grid; place-items: center; overflow: hidden; }
.fm-ad::before { content: "Advertisement"; font-size: .62rem; letter-spacing: .14em; text-transform: uppercase; color: var(--fm-muted); }

/* ==========================================================================
   8. Buttons
   ========================================================================== */
.fm-btn { display: inline-flex; align-items: center; gap: .5rem; padding: .85rem 1.8rem; background: var(--fm-accent); color: #fff; font-weight: 700; font-size: .92rem; border: none; border-radius: var(--fm-pill); cursor: pointer; transition: all .2s var(--fm-ease); }
.fm-btn:hover { background: var(--fm-accent-dark); color: #fff; transform: translateY(-2px); box-shadow: var(--fm-shadow); }
.fm-btn-ghost { background: transparent; color: var(--fm-ink); border: 1px solid var(--fm-border-2); }
.fm-btn-ghost:hover { background: var(--fm-cream); color: var(--fm-ink); box-shadow: none; }
.fm-center { text-align: center; }

/* ==========================================================================
   9. Single
   ========================================================================== */
.fm-article { padding: clamp(1.8rem,3vw,2.6rem) 0; }
.fm-breadcrumbs { font-size: .8rem; color: var(--fm-muted); margin-bottom: 1.2rem; }
.fm-breadcrumbs a { color: var(--fm-soft); }
.fm-breadcrumbs a:hover { color: var(--fm-accent-dark); }
.fm-breadcrumbs span { margin: 0 .45rem; }

.fm-article-cat { display: inline-block; padding: .3em .9em; background: var(--fm-ink); color: #fff; font-size: .68rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; border-radius: 4px; margin-bottom: 1rem; }
.fm-article-title { font-size: clamp(2rem,4.6vw,3.2rem); margin: 0 0 1rem; line-height: 1.12; }
.fm-article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .55rem; color: var(--fm-muted); font-size: .88rem; margin-bottom: 1.6rem; }
.fm-article-meta .author { font-weight: 800; color: var(--fm-ink); }
.fm-article-feat { margin: 0 0 .6rem; border-radius: var(--fm-radius); overflow: hidden; }
.fm-article-caption { font-size: .8rem; color: var(--fm-muted); margin-bottom: 1.8rem; }

.fm-article-body { font-size: 1.14rem; line-height: 1.85; color: var(--fm-text); }
.fm-article-body > *:first-child { margin-top: 0; }
.fm-article-body h2 { font-size: 1.8rem; margin: 1.7em 0 .5em; scroll-margin-top: 110px; }
.fm-article-body h3 { font-size: 1.4rem; margin: 1.4em 0 .5em; scroll-margin-top: 110px; }
.fm-article-body img { border-radius: var(--fm-radius-sm); margin: 1.6em 0; }
.fm-article-body a { color: var(--fm-accent-dark); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.fm-article-body ul, .fm-article-body ol { padding-left: 1.3em; }
.fm-article-body li { margin-bottom: .5em; }
.fm-article-body li::marker { color: var(--fm-accent); }

.fm-toc { background: var(--fm-cream); border-radius: var(--fm-radius-sm); padding: 1.2rem 1.4rem; margin: 0 0 1.8rem; }
.fm-toc-head { display: flex; justify-content: space-between; align-items: center; font-family: var(--fm-display); font-weight: 800; font-size: 1.05rem; color: var(--fm-ink); }
.fm-toc-toggle { background: none; border: none; color: var(--fm-accent-dark); cursor: pointer; font-weight: 800; font-size: .74rem; letter-spacing: .07em; text-transform: uppercase; font-family: var(--fm-body); }
.fm-toc ol { margin: .8rem 0 0; padding-left: 1.2rem; }
.fm-toc li { margin-bottom: .4rem; }
.fm-toc a { color: var(--fm-soft); font-weight: 600; font-size: .92rem; }
.fm-toc a:hover { color: var(--fm-accent-dark); }
.fm-toc.is-collapsed ol { display: none; }
.fm-toc .lvl-3 { margin-left: 1rem; }

.fm-tags { display: flex; flex-wrap: wrap; gap: .5rem; margin: 2rem 0; }
.fm-tag { font-size: .8rem; padding: .35em .9em; background: var(--fm-cream); border-radius: var(--fm-pill); color: var(--fm-soft); font-weight: 600; }
.fm-tag:hover { background: var(--fm-accent); color: #fff; }

.fm-share { display: flex; gap: .5rem; align-items: center; margin: 2rem 0; flex-wrap: wrap; }
.fm-share-label { font-family: var(--fm-display); font-weight: 800; color: var(--fm-ink); }
.fm-share a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--fm-cream); color: var(--fm-soft); }
.fm-share a:hover { background: var(--fm-accent); color: #fff; }

.fm-author { display: flex; gap: 1.3rem; padding: 1.7rem; margin: 2rem 0; border: 1px solid var(--fm-border); border-radius: var(--fm-radius); background: var(--fm-cream); }
.fm-author img { width: 70px; height: 70px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.fm-author-name { font-size: 1.2rem; margin: 0 0 .3rem; }
.fm-author-bio { font-size: .92rem; color: var(--fm-soft); margin: 0; }

.fm-prevnext { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 2rem 0; }
.fm-prevnext a { display: block; padding: 1.2rem 1.4rem; border: 1px solid var(--fm-border); border-radius: var(--fm-radius); transition: all .2s var(--fm-ease); background: var(--fm-surface); }
.fm-prevnext a:hover { border-color: var(--fm-accent); transform: translateY(-2px); }
.fm-prevnext .lbl { font-weight: 800; font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--fm-accent-dark); }
.fm-prevnext .ttl { font-family: var(--fm-display); font-weight: 700; color: var(--fm-ink); font-size: 1rem; line-height: 1.25; margin-top: .3rem; }
.fm-prevnext .next { text-align: right; }

/* ==========================================================================
   10. Page head / pagination / comments
   ========================================================================== */
.fm-page-head { padding: clamp(2rem,4vw,3rem) 0 0; }
.fm-page-title { font-size: clamp(2rem,4.5vw,3.2rem); margin: .4rem 0 0; }
.fm-archive-desc { color: var(--fm-soft); margin-top: .7rem; max-width: 640px; }

.fm-pagination { margin: 3rem 0 1rem; }
.fm-pagination .nav-links { display: flex; justify-content: center; flex-wrap: wrap; gap: .4rem; }
.fm-pagination .page-numbers { min-width: 44px; height: 44px; display: grid; place-items: center; padding: 0 .6rem; border: 1px solid var(--fm-border); border-radius: var(--fm-radius-sm); color: var(--fm-soft); font-weight: 700; }
.fm-pagination .page-numbers:hover, .fm-pagination .page-numbers.current { background: var(--fm-accent); color: #fff; border-color: var(--fm-accent); }

.fm-loadmore-wrap { text-align: center; margin: 2.8rem 0; }
.fm-loadmore.is-loading { opacity: .6; pointer-events: none; }
.fm-infinite-sentinel { height: 1px; }

.fm-comments { margin: 2.6rem 0; }
.fm-comments .comment-list { list-style: none; padding: 0; }
.fm-comments .comment-body { padding: 1.2rem 0; border-bottom: 1px solid var(--fm-border); }
.fm-comments .children { list-style: none; padding-left: 1.8rem; }
.fm-comments .comment-author { font-family: var(--fm-display); font-weight: 700; color: var(--fm-ink); }
.fm-comments .comment-meta { font-size: .8rem; color: var(--fm-muted); margin-bottom: .5rem; }
.fm-comments input, .fm-comments textarea { width: 100%; padding: .8rem 1rem; border: 1px solid var(--fm-border-2); border-radius: var(--fm-radius-sm); background: var(--fm-bg); color: var(--fm-text); font-family: inherit; margin-bottom: 1rem; }

/* ==========================================================================
   11. Footer
   ========================================================================== */
.fm-footer { background: var(--fm-ink); color: rgba(255,255,255,.7); padding: 3.6rem 0 0; margin-top: 4rem; }
.fm-footer-grid { display: grid; grid-template-columns: 1.7fr 1fr 1fr 1fr; gap: 2.4rem; padding-bottom: 2.8rem; }
.fm-footer .fm-brand-title { color: #fff; }
.fm-footer h3 { font-family: var(--fm-display); font-weight: 700; font-size: 1.1rem; margin-bottom: 1rem; color: #fff; }
.fm-footer p { color: rgba(255,255,255,.62); font-size: .92rem; max-width: 320px; }
.fm-footer ul { list-style: none; padding: 0; margin: 0; }
.fm-footer li { padding: .3rem 0; }
.fm-footer a { color: rgba(255,255,255,.7); font-size: .92rem; }
.fm-footer a:hover { color: var(--fm-accent); }
.fm-footer-social { display: flex; gap: .5rem; margin-top: 1.2rem; }
.fm-footer-social a { width: 40px; height: 40px; display: grid; place-items: center; background: rgba(255,255,255,.08); border-radius: 50%; color: rgba(255,255,255,.8); }
.fm-footer-social a:hover { background: var(--fm-accent); color: #fff; }
.fm-footer-bottom { border-top: 1px solid rgba(255,255,255,.12); padding: 1.5rem 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; font-size: .82rem; color: rgba(255,255,255,.5); }

/* ==========================================================================
   12. Misc
   ========================================================================== */
.alignleft { float: left; margin: .3em 1.5em 1em 0; }
.alignright { float: right; margin: .3em 0 1em 1.5em; }
.aligncenter { display: block; margin: 1.4em auto; }
.wp-caption-text, .gallery-caption { font-size: .82rem; color: var(--fm-muted); text-align: center; }
.sticky .fm-card { border-color: var(--fm-accent); }
.fm-empty { text-align: center; padding: 4rem 1rem; grid-column: 1/-1; }
.fm-reveal { opacity: 0; transform: translateY(20px); transition: opacity .55s var(--fm-ease), transform .55s var(--fm-ease); }
.fm-reveal.is-visible { opacity: 1; transform: none; }

.fm-totop { position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 50%; background: var(--fm-accent); color: #fff; border: none; display: grid; place-items: center; cursor: pointer; opacity: 0; visibility: hidden; transform: translateY(12px); transition: all .3s var(--fm-ease); z-index: 200; box-shadow: var(--fm-shadow); }
.fm-totop.is-visible { opacity: 1; visibility: visible; transform: none; }

.fm-mobile-panel { position: fixed; top: 0; right: 0; width: min(330px,86%); height: 100%; background: var(--fm-bg); z-index: 700; padding: 1.6rem 1.4rem; transform: translateX(100%); transition: transform .34s var(--fm-ease); box-shadow: var(--fm-shadow-lg); overflow-y: auto; }
.fm-mobile-panel.is-open { transform: none; }
.fm-mobile-panel ul { list-style: none; padding: 0; margin: 1rem 0 0; }
.fm-mobile-panel li { border-bottom: 1px solid var(--fm-border); }
.fm-mobile-panel a { display: block; padding: .9rem .2rem; font-weight: 700; color: var(--fm-ink); text-transform: uppercase; letter-spacing: .05em; font-size: .88rem; }
.fm-backdrop { position: fixed; inset: 0; background: rgba(27,20,32,.45); z-index: 650; opacity: 0; visibility: hidden; transition: opacity .3s; }
.fm-backdrop.is-open { opacity: 1; visibility: visible; }

/* ==========================================================================
   13. Responsive
   ========================================================================== */
@media (max-width: 1024px) {
  .fm-hero-grid, .fm-content-grid { grid-template-columns: 1fr; }
  .fm-sidebar { position: static; }
  .fm-feat-side { grid-template-rows: none; grid-template-columns: repeat(3,1fr); }
  .fm-grid-3 { grid-template-columns: repeat(2,1fr); }
  .fm-footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 860px) {
  .fm-menu { display: none; }
  .fm-burger { display: grid; }
  .fm-searchbox input { width: 120px; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .fm-grid-3, .fm-grid-2 { grid-template-columns: 1fr; }
  .fm-feat-side { grid-template-columns: 1fr; }
  .fm-footer-grid { grid-template-columns: 1fr; }
  .fm-prevnext { grid-template-columns: 1fr; }
  .fm-feat-main { min-height: 380px; }
  .fm-searchbox { display: none; }
  .fm-section-head { flex-wrap: wrap; gap: .6rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
}
