/* HealthHealths – newspaper layout (header + homepage).
   Change the colours/fonts in :root to match your brand exactly. */
:root{
	--hf-accent:#b30000;
	--hf-ink:#111;
	--hf-muted:#666;
	--hf-line:#ddd;
	--hf-bg:#fff;
	--hf-nav-bg:#111;
	--hf-nav-ink:#fff;
	--hf-serif:"Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--hf-sans:"Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	--hf-max:1200px;
}
body{background:var(--hf-bg);color:var(--hf-ink);font-family:var(--hf-sans)}
.container{max-width:var(--hf-max);margin:0 auto;padding:0 16px}
a{color:inherit;text-decoration:none}
a:hover{color:var(--hf-accent)}

/* ---------- Header: animated masthead ----------
   At the top of the page : big logo centred, menu hidden.
   After a small scroll   : logo glides to the left, menu slides in on the right.
   A small script at the bottom of header.php only toggles the "hf-compact" class on <body>; everything else is CSS.
   Tweak the sizes and speed in the variables below. */
:root{
	--hf-topbar-h:30px;     /* date bar height (collapses on scroll) */
	--hf-mast-big:112px;    /* header height at the top of the page */
	--hf-mast-small:56px;   /* header height after scrolling */
	--hf-logo-big:80px;     /* logo height at the top */
	--hf-logo-small:36px;   /* logo height after scrolling */
	--hf-brand-reserve:76px; /* room kept for the small logo beside the menu (set automatically by the script) */
	--hf-wpbar:0px;
	--hf-dur:.6s;
	--hf-ease:cubic-bezier(.22,.61,.36,1);
}
body.admin-bar{--hf-wpbar:32px}
@media (max-width:782px){body.admin-bar{--hf-wpbar:46px}}
@media (max-width:1100px){
	:root{--hf-mast-big:92px;--hf-mast-small:52px;--hf-logo-big:60px;--hf-logo-small:34px}
}

/* The header is fixed, so the page needs room for its tallest state (no layout jump). */
body{padding-top:calc(var(--hf-topbar-h) + var(--hf-mast-big))}
html{scroll-padding-top:calc(var(--hf-mast-small) + 20px)}
body .post-layout>aside{top:calc(var(--hf-wpbar) + var(--hf-mast-small) + 24px);max-height:calc(100vh - var(--hf-wpbar) - var(--hf-mast-small) - 48px)}
.skip-link{z-index:100000}

body .site-header{position:fixed;top:var(--hf-wpbar);left:0;right:0;z-index:1000;background:#fff;border-bottom:0;box-shadow:0 1px 0 var(--hf-line);transition:box-shadow .4s ease}
body.hf-compact .site-header{box-shadow:0 1px 0 var(--hf-line),0 8px 24px rgba(0,0,0,.07)}

/* Date bar */
body .site-header .topbar{height:var(--hf-topbar-h);overflow:hidden;border-bottom:1px solid var(--hf-line);transition:height var(--hf-dur) var(--hf-ease),opacity .3s ease}
body .site-header .topbar-inner{height:100%;align-items:center;padding-top:0;padding-bottom:0}
body.hf-compact .site-header .topbar{height:0;opacity:0;border-bottom-width:0}

/* Masthead row */
body .site-header .masthead{position:relative;display:flex;align-items:center;justify-content:flex-end;gap:8px;max-width:1400px;height:var(--hf-mast-big);padding:0 20px;transition:height var(--hf-dur) var(--hf-ease)}
body.hf-compact .site-header .masthead{height:var(--hf-mast-small)}

/* Logo: centred + large -> left + small */
body .site-header .brand{position:absolute;top:50%;left:50%;margin:0;text-align:left;transform:translate(-50%,-50%);transition:left var(--hf-dur) var(--hf-ease),transform var(--hf-dur) var(--hf-ease)}
body.hf-compact .site-header .brand{left:20px;transform:translate(0,-50%)}
body .site-header .brand .custom-logo-link{display:block;line-height:0}
body .site-header .brand img,
body .site-header .brand .custom-logo{display:block;height:var(--hf-logo-big);width:auto;max-height:none;max-width:none;transition:height var(--hf-dur) var(--hf-ease)}
body.hf-compact .site-header .brand img,
body.hf-compact .site-header .brand .custom-logo{height:var(--hf-logo-small)}
/* Text fallback when no logo image is set */
body .site-header .brand .site-title{font-family:var(--hf-serif);font-weight:800;font-size:clamp(34px,5vw,56px);line-height:1;letter-spacing:-.5px;margin:0;white-space:nowrap;transition:font-size var(--hf-dur) var(--hf-ease)}
body.hf-compact .site-header .brand .site-title{font-size:26px}

/* Icon buttons */
body .site-header .icon-btn{flex:none;width:40px;height:40px;padding:9px;border:0;border-radius:50%;background:none;color:var(--hf-ink);cursor:pointer;transition:background .2s ease}
body .site-header .icon-btn:hover{background:#f2f2f2;border:0}
body .site-header .icon-btn svg{width:100%;height:100%;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
body .site-header .nav-toggle{display:none}

/* Menu: hidden at the top, slides in from the right after scrolling */
body .site-header .primary-nav{position:static;z-index:auto;display:block;flex:1 1 auto;min-width:0;height:100%;margin:0 4px 0 var(--hf-brand-reserve);background:none;border:0;
	opacity:0;visibility:hidden;pointer-events:none;transform:translateX(32px);
	transition:opacity .3s ease,transform .4s var(--hf-ease),visibility 0s linear .4s}
body.hf-compact .site-header .primary-nav{opacity:1;visibility:visible;pointer-events:auto;transform:none;
	transition:opacity .45s ease .2s,transform .6s var(--hf-ease) .2s,visibility 0s}
body .site-header .primary-nav ul{list-style:none;margin:0;padding:0;display:flex;flex-wrap:nowrap;justify-content:flex-end;gap:0;height:100%}
body .site-header .primary-nav li{position:relative;display:flex;align-items:center;height:100%;margin:0}
body .site-header .primary-nav a{display:flex;align-items:center;height:100%;padding:0 9px;border:0;background:none;white-space:nowrap;color:var(--hf-ink);font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;box-shadow:inset 0 -3px 0 transparent;transition:color .2s ease,box-shadow .2s ease}
body .site-header .primary-nav a:hover,
body .site-header .primary-nav li:focus-within>a,
body .site-header .primary-nav .current-menu-item>a,
body .site-header .primary-nav .current-menu-ancestor>a{background:none;color:var(--hf-accent);box-shadow:inset 0 -3px 0 var(--hf-accent)}

/* Dropdowns */
body .site-header .primary-nav .sub-menu{display:none;position:absolute;left:0;top:100%;min-width:220px;height:auto;margin:0;padding:0;flex-direction:column;background:#fff;border:1px solid var(--hf-line);border-top:3px solid var(--hf-accent);box-shadow:0 8px 20px rgba(0,0,0,.12)}
body .site-header .primary-nav li:nth-last-child(-n+3)>.sub-menu{left:auto;right:0}
body .site-header .primary-nav li:hover>.sub-menu,
body .site-header .primary-nav li:focus-within>.sub-menu{display:flex}
body .site-header .primary-nav .sub-menu li{display:block;height:auto}
body .site-header .primary-nav .sub-menu a{display:block;height:auto;padding:10px 14px;color:var(--hf-ink);text-transform:none;font-weight:500;font-size:14px;letter-spacing:0;border-bottom:1px solid #f0f0f0;box-shadow:none;white-space:normal}
body .site-header .primary-nav .sub-menu a:hover{background:#f6f6f6;color:var(--hf-accent);box-shadow:none}

.search-panel{background:#f6f6f6;border-bottom:1px solid var(--hf-line);padding:14px 0}

/* No animation on first paint only (e.g. page reloaded half-way down) */
body.hf-no-anim .site-header,
body.hf-no-anim .site-header *{transition:none!important}

/* Menu laid out as a button + full-width panel ("burger" layout):
   - automatically under 1100px (pure CSS), and
   - at any width when theme.js finds the menu is too long to fit beside the logo (adds body.hf-burger).
   After scrolling: logo left, menu button + search right. At the top: logo centred. */
@media (max-width:1100px){
	body .site-header .nav-toggle{display:block;position:absolute;top:50%;left:20px;margin-top:-20px;transition:left var(--hf-dur) var(--hf-ease)}
	body.hf-compact .site-header .nav-toggle{left:calc(100% - 104px)}
	body .site-header .search-toggle{position:absolute;top:50%;right:20px;margin-top:-20px}

	body .site-header .primary-nav,
	body.hf-compact .site-header .primary-nav{display:none;position:fixed;left:0;right:0;top:calc(var(--hf-wpbar) + var(--hf-mast-small));height:auto;max-height:calc(100vh - var(--hf-wpbar) - var(--hf-mast-small));overflow-y:auto;margin:0;background:var(--hf-nav-bg);border-top:3px solid var(--hf-accent);opacity:1;visibility:visible;pointer-events:auto;transform:none;transition:none}
	body .site-header .primary-nav.is-open,
	body.hf-compact .site-header .primary-nav.is-open{display:block}
	body .site-header .primary-nav ul{flex-direction:column;height:auto}
	body .site-header .primary-nav li{display:block;height:auto}
	body .site-header .primary-nav a{display:block;height:auto;padding:13px 20px;color:#fff;border-bottom:1px solid #2a2a2a;box-shadow:none;white-space:normal;font-size:12.5px}
	body .site-header .primary-nav a:hover,
	body .site-header .primary-nav .current-menu-item>a{background:var(--hf-accent);color:#fff;box-shadow:none}
	body .site-header .primary-nav .sub-menu,
	body .site-header .primary-nav li:hover>.sub-menu,
	body .site-header .primary-nav li:focus-within>.sub-menu{display:block;position:static;min-width:0;border:0;box-shadow:none;background:#1c1c1c}
	body .site-header .primary-nav .sub-menu a{color:#ddd;border-bottom-color:#2a2a2a;padding-left:36px;font-size:13px}
	body .site-header .primary-nav .sub-menu a:hover{background:#2a2a2a;color:#fff}
}
	body.hf-burger .site-header .nav-toggle{display:block;position:absolute;top:50%;left:20px;margin-top:-20px;transition:left var(--hf-dur) var(--hf-ease)}
	body.hf-burger.hf-compact .site-header .nav-toggle{left:calc(100% - 104px)}
	body.hf-burger .site-header .search-toggle{position:absolute;top:50%;right:20px;margin-top:-20px}

	body.hf-burger .site-header .primary-nav,
	body.hf-burger.hf-compact .site-header .primary-nav{display:none;position:fixed;left:0;right:0;top:calc(var(--hf-wpbar) + var(--hf-mast-small));height:auto;max-height:calc(100vh - var(--hf-wpbar) - var(--hf-mast-small));overflow-y:auto;margin:0;background:var(--hf-nav-bg);border-top:3px solid var(--hf-accent);opacity:1;visibility:visible;pointer-events:auto;transform:none;transition:none}
	body.hf-burger .site-header .primary-nav.is-open,
	body.hf-burger.hf-compact .site-header .primary-nav.is-open{display:block}
	body.hf-burger .site-header .primary-nav ul{flex-direction:column;height:auto}
	body.hf-burger .site-header .primary-nav li{display:block;height:auto}
	body.hf-burger .site-header .primary-nav a{display:block;height:auto;padding:13px 20px;color:#fff;border-bottom:1px solid #2a2a2a;box-shadow:none;white-space:normal;font-size:12.5px}
	body.hf-burger .site-header .primary-nav a:hover,
	body.hf-burger .site-header .primary-nav .current-menu-item>a{background:var(--hf-accent);color:#fff;box-shadow:none}
	body.hf-burger .site-header .primary-nav .sub-menu,
	body.hf-burger .site-header .primary-nav li:hover>.sub-menu,
	body.hf-burger .site-header .primary-nav li:focus-within>.sub-menu{display:block;position:static;min-width:0;border:0;box-shadow:none;background:#1c1c1c}
	body.hf-burger .site-header .primary-nav .sub-menu a{color:#ddd;border-bottom-color:#2a2a2a;padding-left:36px;font-size:13px}
	body.hf-burger .site-header .primary-nav .sub-menu a:hover{background:#2a2a2a;color:#fff}

/* ---------- Homepage ---------- */
.front{padding:24px 0 40px}
.story-thumb{display:block;overflow:hidden;background:#eee;aspect-ratio:16/10}
.story-thumb img{width:100%;height:100%;object-fit:cover;display:block}
.story-title{font-family:var(--hf-serif);font-weight:800;line-height:1.2;margin:8px 0 6px;font-size:18px}
.story-excerpt{color:var(--hf-muted);font-size:14px;line-height:1.5;margin:0}
.kicker{display:inline-block;color:var(--hf-accent);font-size:12px;font-weight:700;text-transform:uppercase;letter-spacing:.6px}

.block-title{font-family:var(--hf-serif);font-weight:800;font-size:20px;margin:0 0 14px;padding-bottom:8px;border-bottom:2px solid var(--hf-ink);position:relative}
.block-title::before{content:"";position:absolute;left:0;bottom:-2px;width:56px;height:2px;background:var(--hf-accent)}

/* Top stories: lead | two medium | headline list */
.top-stories{display:grid;grid-template-columns:5fr 3fr 4fr;gap:28px;padding-bottom:28px;border-bottom:1px solid var(--hf-line);margin-bottom:28px}
.ts-lead .story-title{font-size:clamp(26px,3vw,36px)}
.ts-lead .story-excerpt{font-size:16px}
.ts-side{display:flex;flex-direction:column;gap:22px}
.ts-list{border-left:1px solid var(--hf-line);padding-left:24px}
.story--row{padding:12px 0;border-bottom:1px solid var(--hf-line)}
.story--row:last-child{border-bottom:0}
.story--row .story-title{font-size:16px;margin:0 0 4px}
.story--row .story-thumb{display:none}

/* Category blocks */
.two-up{display:grid;grid-template-columns:1fr 1fr;gap:32px;margin-bottom:32px}
.three-up{display:grid;grid-template-columns:repeat(3,1fr);gap:28px;margin-bottom:32px}
.four-up{display:grid;grid-template-columns:repeat(4,1fr);gap:24px;margin-bottom:32px}
.block--cards .block-grid{display:grid;gap:18px}
.four-up .story-title{font-size:16px}
.block--feature .story--media{margin-bottom:6px}
.block--feature .story--media .story-title{font-size:22px}

.more-link-wrap{text-align:center;margin-top:12px}
.btn-more{display:inline-block;background:var(--hf-ink);color:#fff;padding:12px 28px;font-weight:700;font-size:13px;text-transform:uppercase;letter-spacing:.5px}
.btn-more:hover{background:var(--hf-accent);color:#fff}

@media (max-width:1000px){
	.top-stories{grid-template-columns:1fr 1fr}
	.ts-lead{grid-column:1/-1}
	.ts-list{grid-column:1/-1;border-left:0;padding-left:0}
	.three-up{grid-template-columns:1fr 1fr}
	.four-up{grid-template-columns:1fr 1fr}
}
@media (max-width:640px){
	.top-stories,.two-up,.three-up,.four-up{grid-template-columns:1fr}
	.topbar-tag{display:none}
}

/* ---------- Hero category panel ---------- */
.hero-cats{display:flex;flex-wrap:wrap;gap:20px 36px;padding:0 0 18px;margin-bottom:24px;border-bottom:1px solid var(--hf-line)}
.hero-cat{min-width:120px}
.hero-cat-parent{display:inline-block;font-size:13px;font-weight:800;text-transform:uppercase;letter-spacing:.06em;color:var(--hf-ink);padding-bottom:4px;border-bottom:2px solid var(--hf-accent)}
.hero-cat-parent:hover{color:var(--hf-accent)}
.hero-cat-children{list-style:none;margin:8px 0 0;padding:0}
.hero-cat-children li{margin:0 0 4px}
.hero-cat-children a{font-size:13px;color:var(--hf-muted)}
.hero-cat-children a:hover{color:var(--hf-accent)}
@media (max-width:640px){
	.hero-cats{gap:16px 24px}
	.hero-cat{min-width:calc(50% - 12px)}
}