/*
Theme Name: Foodly Health
Theme URI: https://foodly.health
Author: Foodly Health
Description: A clean, editorial WordPress theme for a food & health publication. Built with fast-loading, ad-friendly, E-E-A-T-conscious layouts suitable for AdSense review.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 7.4
Text Domain: foodly-health
*/

/* -------------------------------------------------
   Design tokens
------------------------------------------------- */
:root{
  --fh-forest:   #2F4635;
  --fh-cream:    #FAF6EE;
  --fh-sage:     #EAF0E4;
  --fh-tomato:   #C1443C;
  --fh-honey:    #D9A441;
  --fh-ink:      #232323;
  --fh-ink-soft: #5B5B54;
  --fh-line:     #DCD5C4;
  --fh-white:    #FFFFFF;

  --fh-serif: "Fraunces", Georgia, "Times New Roman", serif;
  --fh-sans:  "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --fh-max: 1180px;
  --fh-measure: 68ch;
}

*, *::before, *::after{ box-sizing:border-box; }

html{ scroll-behavior:smooth; }

body{
  margin:0;
  background:var(--fh-cream);
  color:var(--fh-ink);
  font-family:var(--fh-sans);
  font-size:17px;
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
}

img{ max-width:100%; height:auto; display:block; }

a{ color:var(--fh-forest); text-decoration:none; }
a:hover{ text-decoration:underline; }

h1,h2,h3,h4{
  font-family:var(--fh-serif);
  color:var(--fh-forest);
  line-height:1.15;
  margin:0 0 0.5em;
  font-weight:600;
}

p{ margin:0 0 1.2em; max-width:var(--fh-measure); }

.fh-wrap{ max-width:var(--fh-max); margin:0 auto; padding:0 24px; }

/* -------------------------------------------------
   Skip link / accessibility
------------------------------------------------- */
.skip-link{
  position:absolute; left:-9999px; top:0; background:var(--fh-forest);
  color:var(--fh-white); padding:12px 18px; z-index:1000;
}
.skip-link:focus{ left:24px; top:24px; }

:focus-visible{ outline:3px solid var(--fh-honey); outline-offset:2px; }

@media (prefers-reduced-motion: reduce){
  *{ animation-duration:0.01ms !important; transition-duration:0.01ms !important; scroll-behavior:auto !important; }
}

/* -------------------------------------------------
   Header
------------------------------------------------- */
.fh-topbar{
  border-bottom:1px solid var(--fh-line);
  background:var(--fh-cream);
}
.fh-topbar-inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:22px 24px; max-width:var(--fh-max); margin:0 auto; gap:24px;
}
.fh-logo{
  font-family:var(--fh-serif); font-size:28px; font-weight:600;
  color:var(--fh-forest); letter-spacing:-0.01em;
}
.fh-logo span{ color:var(--fh-tomato); }
.fh-logo:hover{ text-decoration:none; }

.fh-nav ul{
  list-style:none; display:flex; gap:28px; margin:0; padding:0;
}
.fh-nav a{
  color:var(--fh-ink); font-size:15px; font-weight:500;
}
.fh-nav a:hover{ color:var(--fh-forest); }

.fh-menu-toggle{
  display:none; background:none; border:1px solid var(--fh-line);
  border-radius:6px; padding:8px 12px; font-family:var(--fh-sans);
  cursor:pointer;
}

@media (max-width:780px){
  .fh-nav{ display:none; width:100%; }
  .fh-nav.is-open{ display:block; }
  .fh-nav ul{ flex-direction:column; gap:2px; padding:16px 0; }
  .fh-nav a{ display:block; padding:10px 0; border-bottom:1px solid var(--fh-line); }
  .fh-topbar-inner{ flex-wrap:wrap; }
  .fh-menu-toggle{ display:block; }
}

/* -------------------------------------------------
   Hero (front page featured post)
------------------------------------------------- */
.fh-hero{
  border-bottom:1px solid var(--fh-line);
  padding:48px 0 56px;
}
.fh-hero-grid{
  display:grid; grid-template-columns:1.1fr 0.9fr; gap:48px; align-items:center;
}
.fh-hero-kicker{
  font-size:14px; color:var(--fh-tomato); font-weight:600; margin-bottom:14px;
  font-family:var(--fh-sans);
}
.fh-hero h1{
  font-size:clamp(32px, 4vw, 52px); margin-bottom:18px;
}
.fh-hero p.fh-dek{
  font-size:19px; color:var(--fh-ink-soft); max-width:56ch;
}
.fh-hero-media{
  aspect-ratio:4/3; background:var(--fh-sage); border-radius:4px; overflow:hidden;
}
.fh-hero-media img{ width:100%; height:100%; object-fit:cover; }

@media (max-width:860px){
  .fh-hero-grid{ grid-template-columns:1fr; }
  .fh-hero-media{ order:-1; }
}

/* -------------------------------------------------
   Post list (editorial, hairline-separated, no card soup)
------------------------------------------------- */
.fh-main{ padding:52px 0 72px; }
.fh-layout{ display:grid; grid-template-columns:1fr 320px; gap:56px; align-items:start; }

.fh-post-row{
  display:grid; grid-template-columns:200px 1fr; gap:28px;
  padding:32px 0; border-bottom:1px solid var(--fh-line);
}
.fh-post-row:first-child{ padding-top:0; }
.fh-post-thumb{
  aspect-ratio:1/1; background:var(--fh-sage); border-radius:4px; overflow:hidden;
}
.fh-post-thumb img{ width:100%; height:100%; object-fit:cover; }
.fh-post-category{
  font-size:13px; font-weight:600; color:var(--fh-tomato); margin-bottom:8px; display:inline-block;
}
.fh-post-row h2{ font-size:24px; margin-bottom:8px; }
.fh-post-row h2 a{ color:var(--fh-forest); }
.fh-post-excerpt{ color:var(--fh-ink-soft); font-size:15.5px; margin-bottom:10px; }
.fh-post-meta{
  font-size:13px; color:var(--fh-ink-soft); display:flex; gap:14px; flex-wrap:wrap;
}

@media (max-width:640px){
  .fh-post-row{ grid-template-columns:1fr; }
  .fh-post-thumb{ aspect-ratio:16/9; }
}

/* -------------------------------------------------
   Sidebar
------------------------------------------------- */
.fh-sidebar section{
  margin-bottom:40px; padding-bottom:32px; border-bottom:1px solid var(--fh-line);
}
.fh-sidebar h3{
  font-size:14px; text-transform:none; letter-spacing:0; font-family:var(--fh-sans);
  font-weight:700; color:var(--fh-ink); margin-bottom:16px;
}
.fh-sidebar ul{ list-style:none; margin:0; padding:0; }
.fh-sidebar li{ margin-bottom:12px; font-size:14.5px; }
.fh-sidebar .widget{ margin-bottom:0; }

/* AdSense-friendly widget slot */
.fh-ad-slot{
  background:var(--fh-sage); border:1px dashed var(--fh-line);
  border-radius:4px; padding:18px; text-align:center; font-size:12px;
  color:var(--fh-ink-soft); margin-bottom:40px;
}

/* -------------------------------------------------
   Single post / page content
------------------------------------------------- */
.fh-article-header{ padding:52px 0 28px; border-bottom:1px solid var(--fh-line); }
.fh-article-header h1{ font-size:clamp(30px,4vw,44px); max-width:22ch; }
.fh-article-meta{
  display:flex; gap:16px; flex-wrap:wrap; align-items:center;
  color:var(--fh-ink-soft); font-size:14px; margin-top:18px;
}
.fh-byline-avatar{
  width:32px; height:32px; border-radius:50%; background:var(--fh-sage); overflow:hidden;
}
.fh-byline-avatar img{ width:100%; height:100%; object-fit:cover; }

.fh-article-body{ padding:40px 0; max-width:720px; }
.fh-article-body p, .fh-article-body ul, .fh-article-body ol{ font-size:18px; line-height:1.75; }
.fh-article-body h2{ font-size:26px; margin-top:1.6em; }
.fh-article-body h3{ font-size:21px; margin-top:1.4em; }
.fh-article-body img{ border-radius:4px; margin:1.6em 0; }
.fh-article-body blockquote{
  border-left:3px solid var(--fh-tomato); margin:1.8em 0; padding:4px 0 4px 22px;
  font-family:var(--fh-serif); font-size:21px; color:var(--fh-forest);
}

.fh-author-box{
  display:flex; gap:18px; background:var(--fh-sage); border-radius:6px;
  padding:24px; margin:40px 0;
}
.fh-author-box img{ width:64px; height:64px; border-radius:50%; object-fit:cover; }
.fh-author-box h4{ margin-bottom:6px; font-size:16px; }
.fh-author-box p{ font-size:14.5px; color:var(--fh-ink-soft); margin:0; }

.fh-medical-note{
  border:1px solid var(--fh-line); border-left:4px solid var(--fh-honey);
  padding:16px 20px; font-size:14.5px; color:var(--fh-ink-soft); margin:28px 0; border-radius:2px;
}

/* -------------------------------------------------
   Footer
------------------------------------------------- */
.fh-footer{
  background:var(--fh-forest); color:var(--fh-sage); padding:52px 0 28px; margin-top:64px;
}
.fh-footer a{ color:var(--fh-white); }
.fh-footer-grid{
  display:grid; grid-template-columns:1.4fr 1fr 1fr 1fr; gap:32px; margin-bottom:40px;
}
.fh-footer h4{
  color:var(--fh-white); font-family:var(--fh-sans); font-size:14px; margin-bottom:14px;
}
.fh-footer ul{ list-style:none; margin:0; padding:0; }
.fh-footer li{ margin-bottom:10px; font-size:14px; }
.fh-footer p{ font-size:14.5px; color:#C9D3C6; max-width:38ch; }
.fh-footer-bottom{
  border-top:1px solid rgba(255,255,255,0.15); padding-top:20px;
  font-size:13px; color:#9FAF9B; display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px;
}

@media (max-width:780px){
  .fh-layout{ grid-template-columns:1fr; }
  .fh-footer-grid{ grid-template-columns:1fr 1fr; }
}

/* -------------------------------------------------
   Buttons / forms (comments, search)
------------------------------------------------- */
.fh-btn{
  display:inline-block; background:var(--fh-forest); color:var(--fh-white) !important;
  padding:11px 20px; border-radius:4px; font-size:14.5px; font-weight:600; border:none;
  cursor:pointer; text-decoration:none !important;
}
.fh-btn:hover{ background:#233A2A; }

input[type="text"], input[type="email"], input[type="url"], textarea{
  width:100%; padding:11px 14px; border:1px solid var(--fh-line); border-radius:4px;
  font-family:var(--fh-sans); font-size:15px; background:var(--fh-white); color:var(--fh-ink);
}

.fh-search-form{ display:flex; gap:8px; }

/* -------------------------------------------------
   Pagination
------------------------------------------------- */
.fh-pagination{ display:flex; gap:10px; margin-top:32px; }
.fh-pagination a, .fh-pagination span{
  padding:8px 14px; border:1px solid var(--fh-line); border-radius:4px; font-size:14px;
}
.fh-pagination .current{ background:var(--fh-forest); color:var(--fh-white); border-color:var(--fh-forest); }
