/*
Theme Name: Thrive After 50 — Premium Edition
Theme URI: https://thriveplus50.io
Author: Thrive After 50
Author URI: https://thriveplus50.io
Description: A premium, editorial-grade WordPress theme for Thrive After 50 — wellness, health and healthy-living content for Americans 50+. Sticky centered navigation, a top announcement bar, a single-slide auto-rotating carousel, product "bridge pages" for affiliate offers, media Recommendations cards, and an advanced built-in design panel.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: thrive-after-50
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
*/

/* =====================================================
   DESIGN TOKENS
   Palette redesigned to read as a trustworthy, official
   US health-and-wellness resource (navy authority blue +
   teal + a warm action color for CTAs), inspired by the
   clean, confidence-building layouts used by government
   and nonprofit health sites — tuned for a 55+ audience
   with larger, clearer type.
   ===================================================== */
:root{
  --color-primary:      #0B3556;   /* deep navy — headings, nav, authority */
  --color-primary-dark: #082740;   /* footer / hover-dark */
  --color-secondary:    #1D8A93;   /* teal — accents, tags, borders */
  --color-secondary-tint:#E4F3F3;  /* soft teal tint — badges, hovers */
  --color-cta:          #E0562F;   /* warm action orange — buttons, CTAs */
  --color-cta-dark:     #C4441F;
  --color-bg:           #FFFFFF;   /* page background */
  --color-bg-alt:       #F3F7F8;   /* alternating section background */
  --color-card:         #FFFFFF;
  --color-text:         #232F38;   /* body text */
  --color-text-60:      rgba(35,47,56,.64);
  --color-border:       #E2E9EC;
  --color-topbar-bg:    #082740;
  --color-topbar-text:  rgba(255,255,255,.9);

  --font-base: "Exo", "Segoe UI", Arial, sans-serif;
  --text-scale: 1;              /* overridden by Customizer: 0.95 / 1 / 1.1 */
  --heading-weight: 800;
  --h2-size: 24px;              /* article subtitle size, per spec */
  --p-size: 18px;               /* article paragraph size, per spec */

  --radius-sm: 10px;
  --radius-md: 18px;
  --radius-lg: 28px;
  --radius-scale: 1;            /* overridden by Customizer */
  --shadow-card: 0 6px 22px rgba(8,39,64,.08);
  --shadow-card-hover: 0 16px 36px rgba(8,39,64,.14);

  --topbar-height: 38px;
  --header-height: 88px;
  --content-width: 1200px;
  --logo-h-header: 56px;
  --logo-h-hamburger: 44px;
  --logo-h-footer: 60px;
  --gutter: 24px;
}

*,*::before,*::after{ box-sizing:border-box; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--color-bg);
  color:var(--color-text);
  font-family:var(--font-base);
  font-size:calc(18px * var(--text-scale));
  line-height:1.7;
  -webkit-font-smoothing:antialiased;
}
img{ max-width:100%; height:auto; display:block; }
a{ color:var(--color-primary); text-decoration:none; }
a:hover{ color:var(--color-cta-dark); }
h1,h2,h3,h4{
  font-family:var(--font-base);
  font-weight:var(--heading-weight);
  color:var(--color-primary);
  line-height:1.18;
  margin:0 0 .5em;
  letter-spacing:-.01em;
}
h1{ font-size:clamp(2rem,4vw,3.1rem); }
h2{ font-size:clamp(1.5rem,2.6vw,2.15rem); }
h3{ font-size:1.3rem; }
p{ margin:0 0 1.15em; }
.container{
  max-width:var(--content-width);
  margin:0 auto;
  padding:0 var(--gutter);
}
.visually-hidden{
  position:absolute !important;
  width:1px;height:1px;overflow:hidden;
  clip:rect(0,0,0,0);white-space:nowrap;
}
:focus-visible{ outline:3px solid var(--color-cta); outline-offset:2px; }
button{ font-family:inherit; cursor:pointer; }

.eyebrow{
  font-family:var(--font-base);
  font-size:.74rem;
  letter-spacing:.13em;
  text-transform:uppercase;
  font-weight:700;
  color:var(--color-secondary);
}

/* =====================================================
   TOP BAR
   ===================================================== */
.top-bar{
  background:var(--color-topbar-bg);
  color:var(--color-topbar-text);
  font-size:.85rem;
}
.top-bar .container{
  height:var(--topbar-height);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
}
.top-bar-message{ font-weight:600; }
.top-bar-social{ display:flex; gap:8px; }
.top-bar-social a{
  width:26px; height:26px;
  border-radius:50%;
  background:rgba(255,255,255,.12);
  color:#fff;
  display:flex; align-items:center; justify-content:center;
  transition:background .15s ease;
}
.top-bar-social a:hover{ background:var(--color-cta); }
.top-bar-social svg{ width:13px; height:13px; }

/* =====================================================
   SITE HEADER — sticky, logo left, nav centered
   ===================================================== */
.site-header{
  position:sticky; top:0; z-index:500;
  background:var(--color-bg);
  border-bottom:1px solid var(--color-border);
}
.site-header.is-scrolled{ box-shadow:0 4px 20px rgba(18,51,49,.08); }
.header-inner{
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:20px;
  height:var(--header-height);
}
.site-branding{ grid-column:1; justify-self:start; display:flex; align-items:center; }
.site-branding a{ display:inline-flex; align-items:center; }
.site-branding img.header-logo-img{ height:var(--logo-h-header); width:auto; }

.primary-navigation{ grid-column:2; justify-self:center; }
.primary-menu{
  display:flex; align-items:center; gap:4px;
  list-style:none; margin:0; padding:0;
}
.primary-menu > li{ position:relative; }
.primary-menu > li > a{
  display:inline-block;
  padding:11px 16px;
  font-weight:800;
  letter-spacing:.01em;
  font-size:.96rem;
  color:var(--color-primary);
  border-radius:999px;
  transition:background .15s ease;
}
.primary-menu > li > a:hover,
.primary-menu > li.current-menu-item > a{
  background:var(--color-secondary-tint);
}
.primary-menu .sub-menu{
  list-style:none; margin:0; padding:10px;
  position:absolute; top:calc(100% + 8px); left:0;
  min-width:250px;
  background:var(--color-card);
  border:1px solid var(--color-border);
  border-radius:var(--radius-sm);
  box-shadow:var(--shadow-card-hover);
  opacity:0; visibility:hidden; transform:translateY(6px);
  transition:opacity .15s ease, transform .15s ease, visibility .15s;
}
.primary-menu li.menu-item-has-children:hover > .sub-menu,
.primary-menu li.menu-item-has-children:focus-within > .sub-menu{
  opacity:1; visibility:visible; transform:translateY(0);
}
.primary-menu .sub-menu li a{
  display:block; padding:10px 12px; border-radius:8px;
  font-weight:600; font-size:.95rem; color:var(--color-text);
}
.primary-menu .sub-menu li a:hover{ background:var(--color-secondary-tint); color:var(--color-primary); }
.menu-item-has-children > a::after{ content:"▾"; font-size:.65em; margin-left:6px; color:var(--color-secondary); }

.menu-toggle{
  grid-column:3; justify-self:end;
  display:none;
  background:none; border:2px solid var(--color-primary);
  border-radius:12px; padding:9px 11px;
}
.menu-toggle span{ display:block; width:22px; height:2px; background:var(--color-primary); margin:4px 0; border-radius:2px; }

.hamburger-panel-branding{ display:none; }

/* =====================================================
   MOBILE / TABLET HAMBURGER PANEL
   ===================================================== */
@media (max-width:960px){
  .menu-toggle{ display:inline-block; }
  .primary-navigation{
    grid-column:1 / -1;
    position:fixed;
    top:var(--topbar-height, 0px);
    margin-top:var(--header-height);
    left:0; right:0; bottom:0;
    background:var(--color-bg);
    max-height:0;
    overflow-y:auto;
    transition:max-height .28s ease;
    z-index:400;
  }
  .primary-navigation.is-open{ max-height:calc(100vh - var(--header-height)); box-shadow:0 12px 30px rgba(18,51,49,.15); }
  .hamburger-panel-branding{
    display:flex; align-items:center;
    padding:20px var(--gutter) 6px;
    border-bottom:1px solid var(--color-border);
    margin-bottom:8px;
  }
  .hamburger-panel-branding img{ height:var(--logo-h-hamburger); width:auto; }
  .primary-menu{ flex-direction:column; align-items:stretch; padding:16px var(--gutter) 32px; gap:2px; }
  .primary-menu > li > a{ padding:14px 12px; font-size:1.05rem; border-radius:12px; }
  .primary-menu .sub-menu{
    position:static; opacity:1; visibility:visible; transform:none;
    box-shadow:none; border:none; padding-left:14px; display:none;
  }
  .primary-menu li.menu-item-has-children.submenu-open > .sub-menu{ display:block; }
}

/* =====================================================
   HERO CAROUSEL — one slide at a time, auto-rotating
   ===================================================== */
.hero-slider{ position:relative; background:var(--color-bg-alt); }
.hero-viewport{
  display:flex;
  overflow-x:auto;
  scroll-snap-type:x mandatory;
  scroll-behavior:smooth;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none; -ms-overflow-style:none;
}
.hero-viewport::-webkit-scrollbar{ display:none; }
.hero-slide{
  position:relative;
  flex:0 0 100%;
  scroll-snap-align:start;
  aspect-ratio:16/7;
  min-height:320px;
  overflow:hidden;
}
.hero-slide img{ width:100%; height:100%; object-fit:cover; }
.hero-slide .slide-overlay{
  position:absolute; inset:0;
  background:linear-gradient(90deg, rgba(18,51,49,.88) 0%, rgba(18,51,49,.42) 48%, rgba(18,51,49,.05) 80%);
}
.hero-slide .slide-copy{
  position:absolute; left:0; bottom:0; top:0;
  display:flex; flex-direction:column; justify-content:center;
  max-width:620px;
  padding:0 6vw;
  color:#fff;
}
.hero-slide .eyebrow{ color:var(--color-cta); }
.hero-slide h2{ color:#fff; font-size:clamp(1.5rem,3vw,2.4rem); margin:.3em 0 .35em; }
.hero-slide p{ color:rgba(255,255,255,.86); font-size:1.05rem; max-width:520px; }
.hero-slide .slide-cta{
  display:inline-flex; align-items:center; gap:8px;
  margin-top:8px; font-weight:700; color:#fff;
  border-bottom:2px solid var(--color-cta);
  padding-bottom:3px; width:max-content;
}

.hero-arrow{
  position:absolute; top:50%; transform:translateY(-50%);
  width:46px; height:46px; border-radius:50%;
  background:rgba(255,255,255,.94); border:none;
  box-shadow:var(--shadow-card);
  font-size:1.4rem; color:var(--color-primary);
  display:flex; align-items:center; justify-content:center;
  z-index:5; transition:background .15s ease;
}
.hero-arrow:hover{ background:var(--color-cta); color:#fff; }
.hero-arrow-prev{ left:16px; } .hero-arrow-next{ right:16px; }

.hero-dots{
  position:absolute; bottom:16px; left:50%; transform:translateX(-50%);
  display:flex; gap:8px; z-index:5;
}
.hero-dots button{
  width:9px; height:9px; border-radius:50%;
  background:rgba(255,255,255,.5); border:none; padding:0;
}
.hero-dots button.is-active{ background:var(--color-cta); width:22px; border-radius:6px; transition:width .2s ease; }

@media (max-width:600px){
  .hero-slide{ aspect-ratio:auto; min-height:420px; }
  .hero-slide .slide-copy{ max-width:100%; padding:0 24px; }
}

/* =====================================================
   SECTIONS / GRIDS
   ===================================================== */
.section{ padding:60px 0; }
.section-alt{ background:var(--color-bg-alt); }
.section-heading{
  display:flex; align-items:baseline; justify-content:space-between; gap:16px;
  margin-bottom:30px; border-bottom:3px solid var(--color-primary); padding-bottom:14px;
}
.section-heading h2{ margin:0; }
.section-heading a.view-all{ font-weight:700; font-size:.88rem; color:var(--color-secondary); white-space:nowrap; }

.post-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:32px; }
@media (max-width:900px){ .post-grid{ grid-template-columns:repeat(2,1fr); gap:24px; } }
@media (max-width:600px){ .post-grid{ grid-template-columns:1fr; } }

.post-card{
  background:var(--color-card);
  border-radius:calc(var(--radius-md) * var(--radius-scale));
  overflow:hidden;
  box-shadow:var(--shadow-card);
  transition:transform .18s ease, box-shadow .18s ease;
  display:flex; flex-direction:column;
}
.post-card:hover{ transform:translateY(-4px); box-shadow:var(--shadow-card-hover); }
.post-card .post-thumb{ aspect-ratio:16/11; overflow:hidden; background:var(--color-secondary-tint); }
.post-card .post-thumb img{ width:100%; height:100%; object-fit:cover; }
.post-card .post-card-body{ padding:22px 24px 26px; display:flex; flex-direction:column; gap:9px; flex:1; }
.post-card h3{ font-size:1.18rem; margin:0; }
.post-card h3 a{ color:var(--color-primary); }
.post-card p.excerpt{ color:var(--color-text-60); font-size:.96rem; margin:0; }
.post-meta{ font-size:.78rem; color:var(--color-text-60); text-transform:uppercase; letter-spacing:.06em; font-weight:600; }

/* =====================================================
   SIDEBAR / WIDGETS
   ===================================================== */
.content-layout{ display:grid; grid-template-columns:1fr 320px; gap:48px; align-items:start; }
@media (max-width:960px){ .content-layout{ grid-template-columns:1fr; } }
.widget{
  background:var(--color-card);
  border-radius:calc(var(--radius-md) * var(--radius-scale));
  padding:26px; margin-bottom:24px;
  box-shadow:var(--shadow-card);
}
.widget h4{
  font-size:1rem; text-transform:uppercase; letter-spacing:.06em;
  color:var(--color-primary); border-bottom:2px solid var(--color-secondary-tint); padding-bottom:12px;
}
.widget ul{ list-style:none; margin:0; padding:0; }
.widget ul li{ padding:9px 0; border-bottom:1px dashed var(--color-border); }
.widget ul li:last-child{ border-bottom:none; }

.social-row{ display:flex; gap:10px; flex-wrap:wrap; margin-top:14px; }
.social-row a{
  width:40px; height:40px; border-radius:50%;
  display:flex; align-items:center; justify-content:center;
  transition:background .15s ease, color .15s ease, transform .15s ease;
}
.social-row a:hover{ transform:translateY(-2px); }
.footer-grid .social-row a{ background:rgba(255,255,255,.1); color:#fff; }
.footer-grid .social-row a:hover{ background:var(--color-cta); color:var(--color-primary-dark); }
.widget .social-row a{ background:var(--color-secondary-tint); color:var(--color-primary); }
.widget .social-row a:hover{ background:var(--color-cta); color:#fff; }

/* =====================================================
   HOMEPAGE EXTRA WIDGETS
   ===================================================== */
.home-widgets-row{
  display:grid; grid-template-columns:repeat(auto-fit, minmax(260px,1fr)); gap:24px; margin:8px 0 52px;
}
.home-widgets-row .widget{ margin-bottom:0; }

/* =====================================================
   SINGLE POST
   ===================================================== */
.entry-header{ margin-bottom:26px; }
.entry-header .eyebrow{ display:block; margin-bottom:10px; }
.entry-thumbnail{
  border-radius:calc(var(--radius-lg) * var(--radius-scale));
  overflow:hidden; margin:26px 0 34px; box-shadow:var(--shadow-card);
}
.entry-content{ font-size:calc(var(--p-size) * var(--text-scale)); }
.entry-content p{ font-size:calc(var(--p-size) * var(--text-scale)); }
.entry-content h2,
.entry-content h3,
.entry-content h4{ font-size:calc(var(--h2-size) * var(--text-scale)); margin-top:1.4em; }
.entry-content blockquote{
  margin:30px 0; padding:20px 26px;
  background:var(--color-secondary-tint);
  border-left:5px solid var(--color-secondary);
  border-radius:var(--radius-sm);
  font-style:italic; color:var(--color-primary-dark);
}
.entry-footer{ margin-top:38px; padding-top:22px; border-top:1px solid var(--color-border); display:flex; gap:10px; flex-wrap:wrap; }
.tag-pill{
  display:inline-block; padding:7px 15px; border-radius:999px;
  background:var(--color-secondary-tint); color:var(--color-primary);
  font-size:.8rem; font-weight:700;
}
.wellness-disclaimer{
  margin-top:34px; padding:18px 22px;
  background:#FBF3E2; border:1px solid #F0DDAE; border-radius:var(--radius-sm);
  font-size:.88rem; color:var(--color-text-60);
}
.related-posts{ margin-top:56px; padding-top:44px; border-top:1px solid var(--color-border); }

/* =====================================================
   PRODUCT BRIDGE PAGE
   ===================================================== */
/* Product bridge hero: single featured image with title overlay */
.bridge-media-hero{ margin-bottom:38px; }
.bridge-media-image{
  position:relative;
  border-radius:calc(var(--radius-lg) * var(--radius-scale));
  overflow:hidden;
  aspect-ratio:16/8;
  background:var(--color-secondary-tint);
  box-shadow:var(--shadow-card);
}
.bridge-media-image img{ width:100%; height:100%; object-fit:cover; }
.bridge-media-overlay{
  position:absolute; inset:0;
  background:linear-gradient(0deg, rgba(18,51,49,.9) 0%, rgba(18,51,49,.35) 50%, rgba(18,51,49,0) 78%);
}
.bridge-media-copy{
  position:absolute; left:0; right:0; bottom:0;
  padding:30px 34px;
  color:#fff;
}
.bridge-media-copy .eyebrow{ color:var(--color-cta); }
.bridge-media-copy h1{ color:#fff; margin:.3em 0 0; font-size:clamp(1.5rem,3.2vw,2.3rem); }
.bridge-media-sub{ margin-top:22px; color:var(--color-text-60); font-size:1.06rem; }
@media (max-width:600px){
  .bridge-media-image{ aspect-ratio:auto; min-height:280px; }
  .bridge-media-copy{ padding:22px 22px; }
}

.trust-badges{ display:flex; flex-wrap:wrap; gap:10px; margin:6px 0 26px; }
.trust-badge{
  background:var(--color-secondary-tint);
  border:1px solid var(--color-border);
  color:var(--color-primary);
  padding:8px 15px; border-radius:999px; font-size:.8rem; font-weight:700;
}
.cta-note{ margin-top:13px; font-size:.82rem; color:var(--color-text-60); }

.cta-button{
  display:inline-flex; align-items:center; gap:10px;
  background:var(--color-cta); color:var(--color-primary-dark) !important;
  font-weight:800; font-size:1.06rem;
  padding:17px 32px; border-radius:999px;
  box-shadow:0 10px 26px rgba(226,166,59,.35);
  transition:transform .15s ease, background .15s ease;
}
.cta-button:hover{ background:var(--color-cta-dark); transform:translateY(-2px); color:#fff !important; }

.bridge-reasons{ position:relative; padding-left:28px; margin:38px 0; list-style:none; }
.bridge-reasons::before{
  content:""; position:absolute; left:9px; top:6px; bottom:6px; width:2px;
  background:repeating-linear-gradient(to bottom, var(--color-secondary) 0 6px, transparent 6px 12px);
}
.bridge-reasons li{ position:relative; padding:0 0 24px 24px; }
.bridge-reasons li::before{
  content:""; position:absolute; left:-28px; top:4px; width:15px; height:15px;
  background:var(--color-cta); border:3px solid var(--color-bg); border-radius:50%;
  box-shadow:0 0 0 2px var(--color-secondary);
}
.bridge-reasons h4{ margin:0 0 4px; color:var(--color-primary); font-size:1.12rem; }
.bridge-reasons p{ margin:0; color:var(--color-text-60); }

.bridge-cta-repeat{
  text-align:center; padding:42px 22px;
  background:var(--color-secondary-tint);
  border-radius:calc(var(--radius-lg) * var(--radius-scale));
  margin:42px 0;
}
.bridge-cta-repeat p{ font-size:1.22rem; color:var(--color-primary); font-weight:700; }
.affiliate-disclosure{ margin-top:42px; padding:18px 22px; border-top:1px solid var(--color-border); font-size:.82rem; color:var(--color-text-60); }

/* product / recommendation archive grids */
.product-grid{ display:grid; grid-template-columns:repeat(3,1fr); gap:28px; }
@media (max-width:900px){ .product-grid{ grid-template-columns:repeat(2,1fr); gap:22px; } }
@media (max-width:600px){ .product-grid{ grid-template-columns:1fr; } }
.product-card{
  background:var(--color-card);
  border-radius:calc(var(--radius-md) * var(--radius-scale));
  box-shadow:var(--shadow-card); overflow:hidden;
  display:flex; flex-direction:column;
  transition:transform .18s ease, box-shadow .18s ease;
}
.product-card:hover{ transform:translateY(-4px); box-shadow:var(--shadow-card-hover); }
.product-card .product-thumb{
  aspect-ratio:4/3; background:var(--color-secondary-tint);
  display:flex; align-items:center; justify-content:center; padding:20px;
}
.product-card .product-thumb img{ max-height:100%; object-fit:contain; }
.product-card .product-card-body{ padding:20px 22px 24px; flex:1; display:flex; flex-direction:column; gap:9px; }
.product-card .mini-cta{
  margin-top:auto; text-align:center; background:var(--color-primary); color:#fff !important;
  padding:11px 16px; border-radius:999px; font-weight:700; font-size:.85rem;
}
.product-card .mini-cta:hover{ background:var(--color-cta-dark); }

/* =====================================================
   RECOMMENDATION PAGE (movies / series / docs / books)
   ===================================================== */
.rec-hero{
  display:grid; grid-template-columns:240px 1fr; gap:36px; align-items:start; margin-bottom:38px;
}
@media (max-width:700px){ .rec-hero{ grid-template-columns:1fr; } }
.rec-hero .rec-poster{
  border-radius:var(--radius-md); overflow:hidden; box-shadow:var(--shadow-card);
  aspect-ratio:2/3; background:var(--color-secondary-tint);
}
.rec-hero .rec-poster img{ width:100%; height:100%; object-fit:cover; }
.rec-media-type{
  display:inline-block; background:var(--color-secondary-tint); color:var(--color-primary);
  padding:6px 14px; border-radius:999px; font-size:.78rem; font-weight:700; text-transform:uppercase; letter-spacing:.05em;
  margin-bottom:12px;
}
.rec-rating{ display:flex; gap:4px; margin:10px 0 18px; font-size:1.3rem; color:var(--color-cta); }
.rec-rating .star-empty{ color:var(--color-border); }
.rec-watch-link{
  display:inline-flex; align-items:center; gap:8px; margin-top:6px;
  background:var(--color-primary); color:#fff !important; font-weight:700;
  padding:13px 26px; border-radius:999px;
}
.rec-watch-link:hover{ background:var(--color-primary-dark); }

.rec-card{
  background:var(--color-card);
  border-radius:calc(var(--radius-md) * var(--radius-scale));
  box-shadow:var(--shadow-card); overflow:hidden;
  display:flex; flex-direction:column;
  transition:transform .18s ease, box-shadow .18s ease;
}
.rec-card:hover{ transform:translateY(-4px); box-shadow:var(--shadow-card-hover); }
.rec-card .rec-card-poster{ aspect-ratio:2/3; background:var(--color-secondary-tint); overflow:hidden; }
.rec-card .rec-card-poster img{ width:100%; height:100%; object-fit:cover; }
.rec-card .rec-card-body{ padding:18px 20px 22px; display:flex; flex-direction:column; gap:7px; flex:1; }
.rec-card .rec-rating{ font-size:.95rem; margin:2px 0 4px; }

/* =====================================================
   FOOTER
   ===================================================== */
.site-footer{ background:var(--color-primary-dark); color:rgba(255,255,255,.78); margin-top:64px; padding:58px 0 28px; }
.footer-grid{ display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:36px; margin-bottom:42px; }
@media (max-width:800px){ .footer-grid{ grid-template-columns:1fr 1fr; } }
.footer-grid h4{ color:#fff; font-size:.85rem; text-transform:uppercase; letter-spacing:.08em; margin-bottom:14px; }
.footer-grid ul{ list-style:none; margin:0; padding:0; }
.footer-grid ul li{ margin-bottom:9px; }
.footer-grid a{ color:rgba(255,255,255,.78); font-size:.93rem; }
.footer-grid a:hover{ color:var(--color-cta); }
.footer-brand img.footer-logo-img{ height:var(--logo-h-footer); width:auto; margin-bottom:14px; display:block; }
.footer-brand p{ color:rgba(255,255,255,.66); font-size:.93rem; max-width:320px; }
.footer-bottom{
  border-top:1px solid rgba(255,255,255,.12); padding-top:20px;
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px;
  font-size:.82rem; color:rgba(255,255,255,.55);
}

/* =====================================================
   PAGINATION
   ===================================================== */
.pagination{ display:flex; gap:8px; justify-content:center; margin-top:42px; }
.pagination a, .pagination span{
  display:inline-flex; align-items:center; justify-content:center;
  min-width:42px; height:42px; padding:0 10px; border-radius:12px;
  font-weight:700; font-size:.9rem; color:var(--color-primary);
  background:var(--color-card); border:1px solid var(--color-border);
}
.pagination .current{ background:var(--color-primary); color:#fff; border-color:var(--color-primary); }

/* generic helpers */
.narrow{ max-width:760px; margin:0 auto; }

/* =====================================================
   BACK TO TOP BUTTON
   Appears once the reader nears the bottom of the page.
   ===================================================== */
.back-to-top{
  position:fixed;
  right:22px; bottom:22px;
  width:50px; height:50px;
  border-radius:50%;
  background:var(--color-primary);
  color:#fff;
  border:none;
  display:flex; align-items:center; justify-content:center;
  font-size:1.3rem;
  box-shadow:0 8px 22px rgba(8,39,64,.28);
  opacity:0; visibility:hidden; transform:translateY(12px);
  transition:opacity .25s ease, transform .25s ease, background .15s ease;
  z-index:600;
}
.back-to-top.is-visible{ opacity:1; visibility:visible; transform:translateY(0); }
.back-to-top:hover{ background:var(--color-cta); }

/* =====================================================
   CATEGORY INVITE BLOCKS (homepage sidebar)
   Four cards inviting readers into News / Blog / Products
   / Recommendations, each showing that category's most
   recent entry — encourages exploring beyond a single post,
   the "community" browsing feel requested.
   ===================================================== */
.category-invites{ display:flex; flex-direction:column; gap:18px; }
.category-invite{
  display:block;
  background:var(--color-card);
  border:1px solid var(--color-border);
  border-radius:calc(var(--radius-md) * var(--radius-scale));
  overflow:hidden;
  box-shadow:var(--shadow-card);
  transition:transform .18s ease, box-shadow .18s ease;
}
.category-invite:hover{ transform:translateY(-3px); box-shadow:var(--shadow-card-hover); }
.category-invite .ci-thumb{ aspect-ratio:16/9; background:var(--color-secondary-tint); overflow:hidden; }
.category-invite .ci-thumb img{ width:100%; height:100%; object-fit:cover; }
.category-invite .ci-body{ padding:16px 18px 18px; }
.category-invite .ci-label{
  display:inline-block;
  background:var(--color-primary);
  color:#fff;
  font-size:.72rem;
  font-weight:800;
  letter-spacing:.06em;
  text-transform:uppercase;
  padding:4px 10px;
  border-radius:999px;
  margin-bottom:10px;
}
.category-invite h4{
  margin:0 0 6px;
  font-size:1.02rem;
  color:var(--color-primary);
  border:none; padding:0;
  text-transform:none; letter-spacing:0;
}
.category-invite p.ci-title{ margin:0; font-size:.94rem; color:var(--color-text); font-weight:600; }
.category-invite .ci-meta{ display:block; margin-top:8px; font-size:.78rem; color:var(--color-text-60); text-transform:uppercase; letter-spacing:.05em; }

/* =====================================================
   CATEGORY ARCHIVE CARDS — no photo, no author, date only
   ===================================================== */
.post-card-plain{
  background:var(--color-card);
  border-radius:calc(var(--radius-md) * var(--radius-scale));
  border:1px solid var(--color-border);
  padding:24px 26px;
  box-shadow:var(--shadow-card);
  transition:transform .18s ease, box-shadow .18s ease;
}
.post-card-plain:hover{ transform:translateY(-3px); box-shadow:var(--shadow-card-hover); }
.post-card-plain h3{ font-size:1.18rem; margin:0 0 9px; }
.post-card-plain h3 a{ color:var(--color-primary); }
.post-card-plain p.excerpt{ color:var(--color-text-60); font-size:.96rem; margin:0 0 12px; }

/* =====================================================
   FULL RESPONSIVE RANGE
   ===================================================== */
@media (min-width:1440px){
  :root{ --content-width:1320px; }
  body{ font-size:calc(19px * var(--text-scale)); }
}
@media (max-width:820px){
  .bridge-media-copy{ padding:24px 26px; }
  .footer-grid{ grid-template-columns:1fr 1fr; }
}

/* Single entries (articles, product bridge pages, recommendations)
   keep a small comfortable margin on tablets/phones even though the
   rest of the site goes near-edge-to-edge at small widths. */
@media (max-width:960px){
  div.container.entry-wrap{ padding-left:28px; padding-right:28px; }
}
@media (max-width:480px){
  div.container.entry-wrap{ padding-left:18px; padding-right:18px; }
}
@media (max-width:480px){
  :root{ --header-height:70px; --gutter:1px; }
  .container{ padding:0 1px; }
  .top-bar .container{ padding:0 10px; }
  .site-branding img.header-logo-img{ height:calc(var(--logo-h-header) * .84); }
  .footer-brand img.footer-logo-img{ height:calc(var(--logo-h-footer) * .84); }
  h1{ font-size:1.7rem; }
  .section{ padding:38px 0; }
  .post-card, .product-card{ border-radius:var(--radius-sm); }
  .post-card .post-card-body, .product-card .product-card-body{ padding:16px 14px 20px; }
  .bridge-media-copy{ padding:20px 20px; }
  .cta-button{ width:100%; justify-content:center; padding:16px 20px; font-size:.98rem; }
  .footer-grid{ grid-template-columns:1fr; gap:28px; }
  .footer-bottom{ flex-direction:column; }
  .primary-menu > li > a{ padding:14px 10px; }
}
