/*
Theme Name: GutHealthLab
Description: Responsive editorial WordPress theme based on the supplied GutHealthLab prototype.
Version: 1.0.0
Requires at least: 6.4
Requires PHP: 7.4
Author: GutHealthLab
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: guthealthlab
*/

:root {
  --primary: #1a5f7a;
  --primary-dark: #124455;
  --accent: #2e9e6b;
  --light-bg: #f4f8fb;
  --border: #dde6ec;
  --text: #1c2b35;
  --muted: #5a7282;
  --white: #ffffff;
  --radius: 3px;
}
* { margin:0; padding:0; box-sizing:border-box; }
body { font-family:'Inter', sans-serif; color:var(--text); background:#fff; }

/* HEADER */
.top-bar { background:var(--primary-dark); color:#fff; font-size:12px; padding:6px 0; text-align:center; letter-spacing:0.3px; }
.top-bar a { color:#a8d8ea; text-decoration:none; }
header { background:#fff; border-bottom:2px solid var(--primary); position:sticky; top:0; z-index:100; }
.header-inner { max-width:1200px; margin:0 auto; padding:0 20px; display:flex; align-items:center; justify-content:space-between; height:64px; }
.logo { display:flex; align-items:center; gap:10px; text-decoration:none; }
.logo-icon { width:38px; height:38px; background:var(--primary); border-radius:var(--radius); display:flex; align-items:center; justify-content:center; }
.logo-icon svg { width:22px; height:22px; fill:#fff; }
.logo-text { font-family:'Merriweather', serif; font-size:20px; font-weight:700; color:var(--primary); }
.logo-text span { color:var(--accent); }
nav { display:flex; gap:0; }
nav a { padding:0 16px; height:64px; display:flex; align-items:center; font-size:14px; font-weight:500; color:var(--text); text-decoration:none; border-bottom:3px solid transparent; transition:all .2s; }
nav a:hover, nav a.active { color:var(--primary); border-bottom-color:var(--primary); }
.nav-cta { background:var(--accent); color:#fff !important; border-radius:var(--radius); padding:8px 18px !important; height:auto !important; border-bottom:none !important; margin-left:12px; }
.nav-cta:hover { background:#237a54 !important; }

/* HERO */
.hero { background:linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%); color:#fff; padding:64px 20px; }
.hero-inner { max-width:1100px; margin:0 auto; display:grid; grid-template-columns:1fr 1fr; gap:60px; align-items:center; }
.hero-label { font-size:11px; font-weight:600; letter-spacing:2px; text-transform:uppercase; color:#a8d8ea; margin-bottom:12px; }
.hero h1 { font-family:'Merriweather', serif; font-size:38px; line-height:1.25; margin-bottom:20px; }
.hero p { font-size:17px; line-height:1.7; color:#c8dfe9; margin-bottom:28px; }
.hero-cta { display:flex; gap:12px; flex-wrap:wrap; }
.btn-primary { background:var(--accent); color:#fff; padding:14px 28px; border-radius:var(--radius); font-weight:600; font-size:15px; text-decoration:none; }
.btn-outline { border:2px solid rgba(255,255,255,0.5); color:#fff; padding:12px 24px; border-radius:var(--radius); font-weight:500; font-size:15px; text-decoration:none; }
.hero-visual { background:rgba(255,255,255,0.05); border:1px solid rgba(255,255,255,0.15); border-radius:var(--radius); padding:28px; }
.hero-visual h3 { font-size:14px; font-weight:600; color:#a8d8ea; margin-bottom:16px; letter-spacing:0.5px; }
.stool-chart { display:flex; flex-direction:column; gap:8px; }
.stool-row { display:flex; align-items:center; gap:12px; padding:8px 12px; background:rgba(255,255,255,0.06); border-radius:var(--radius); }
.stool-type { font-size:12px; font-weight:700; color:#a8d8ea; width:56px; }
.stool-bar-wrap { flex:1; background:rgba(255,255,255,0.1); height:6px; border-radius:2px; }
.stool-bar { height:6px; border-radius:2px; }
.bar-hard { background:#e05; width:15%; }
.bar-lumpy { background:#e84; width:30%; }
.bar-normal { background:#2e9e6b; width:100%; }
.bar-soft { background:#f5b; width:40%; }
.bar-liquid { background:#e05; width:20%; }
.stool-label { font-size:11px; color:#c8dfe9; width:90px; }

/* TRUST BAR */
.trust-bar { background:var(--light-bg); border-bottom:1px solid var(--border); padding:14px 20px; }
.trust-inner { max-width:1200px; margin:0 auto; display:flex; align-items:center; justify-content:center; gap:36px; flex-wrap:wrap; }
.trust-item { display:flex; align-items:center; gap:8px; font-size:13px; color:var(--muted); }
.trust-icon { color:var(--accent); font-size:16px; }

/* TOPICS GRID */
.section { padding:60px 20px; }
.section-inner { max-width:1200px; margin:0 auto; }
.section-header { margin-bottom:36px; }
.section-label { font-size:11px; font-weight:600; letter-spacing:2px; text-transform:uppercase; color:var(--accent); margin-bottom:8px; }
.section-header h2 { font-family:'Merriweather', serif; font-size:28px; color:var(--text); }
.section-header p { margin-top:10px; font-size:15px; color:var(--muted); max-width:600px; }
.topics-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:20px; }
.topic-card { border:1px solid var(--border); border-radius:var(--radius); padding:24px; text-decoration:none; color:var(--text); transition:all .2s; background:#fff; }
.topic-card:hover { border-color:var(--primary); box-shadow:0 4px 16px rgba(26,95,122,0.1); transform:translateY(-2px); }
.topic-icon { width:44px; height:44px; background:var(--light-bg); border-radius:var(--radius); display:flex; align-items:center; justify-content:center; margin-bottom:14px; font-size:22px; }
.topic-card h3 { font-size:16px; font-weight:600; margin-bottom:8px; }
.topic-card p { font-size:13px; color:var(--muted); line-height:1.6; }
.topic-count { margin-top:12px; font-size:12px; color:var(--accent); font-weight:500; }

/* FEATURED ARTICLES */
.section-alt { background:var(--light-bg); }
.articles-grid { display:grid; grid-template-columns:2fr 1fr 1fr; gap:24px; }
.article-main { border-radius:var(--radius); overflow:hidden; background:#fff; border:1px solid var(--border); }
.article-img { background:linear-gradient(135deg, #1a5f7a, #2e9e6b); height:200px; display:flex; align-items:center; justify-content:center; font-size:56px; }
.article-body { padding:24px; }
.article-tag { font-size:11px; font-weight:600; letter-spacing:1px; text-transform:uppercase; color:var(--accent); }
.article-main h3 { font-family:'Merriweather', serif; font-size:20px; margin:8px 0 10px; line-height:1.4; }
.article-main p { font-size:14px; color:var(--muted); line-height:1.6; }
.article-meta { margin-top:16px; display:flex; align-items:center; gap:12px; font-size:12px; color:var(--muted); }
.author-mini { display:flex; align-items:center; gap:6px; }
.avatar-mini { width:24px; height:24px; border-radius:50%; background:var(--primary); color:#fff; font-size:10px; font-weight:700; display:flex; align-items:center; justify-content:center; }
.article-side { display:flex; flex-direction:column; gap:16px; }
.article-small { background:#fff; border:1px solid var(--border); border-radius:var(--radius); padding:16px; text-decoration:none; color:var(--text); transition:all .2s; }
.article-small:hover { border-color:var(--primary); }
.article-small .article-tag { display:block; margin-bottom:6px; }
.article-small h4 { font-size:14px; font-weight:600; line-height:1.4; margin-bottom:6px; }
.article-small p { font-size:12px; color:var(--muted); line-height:1.5; }

/* STOOL GUIDE */
.stool-guide { max-width:1200px; margin:0 auto; }
.bristol-scale { display:grid; grid-template-columns:repeat(7, 1fr); gap:12px; }
.bristol-card { border:1px solid var(--border); border-radius:var(--radius); padding:16px 12px; text-align:center; }
.bristol-card.normal { border-color:var(--accent); background:#f0faf5; }
.bristol-num { font-size:28px; font-weight:700; color:var(--primary); margin-bottom:8px; }
.bristol-shape { font-size:32px; margin-bottom:8px; }
.bristol-name { font-size:12px; font-weight:600; color:var(--text); margin-bottom:4px; }
.bristol-desc { font-size:11px; color:var(--muted); line-height:1.4; }
.bristol-status { margin-top:8px; font-size:10px; font-weight:700; letter-spacing:1px; padding:3px 8px; border-radius:2px; display:inline-block; }
.status-bad { background:#fde8e8; color:#c0392b; }
.status-ok { background:#fff3cd; color:#856404; }
.status-good { background:#d4edda; color:#155724; }

/* RESEARCH */
.research-list { display:flex; flex-direction:column; gap:16px; }
.research-item { display:grid; grid-template-columns:80px 1fr; gap:20px; padding:20px; background:#fff; border:1px solid var(--border); border-radius:var(--radius); align-items:start; }
.research-year { font-size:12px; font-weight:700; color:var(--accent); text-align:center; padding:6px; background:var(--light-bg); border-radius:var(--radius); }
.research-journal { font-size:11px; color:var(--muted); margin-bottom:4px; }
.research-item h4 { font-size:15px; font-weight:600; margin-bottom:6px; line-height:1.4; }
.research-item p { font-size:13px; color:var(--muted); line-height:1.6; }
.research-link { font-size:12px; color:var(--primary); text-decoration:none; font-weight:500; margin-top:8px; display:inline-block; }

/* EXPERT PANEL */
.experts-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:24px; }
.expert-card { border:1px solid var(--border); border-radius:var(--radius); padding:28px; text-align:center; background:#fff; }
.expert-avatar { width:80px; height:80px; border-radius:50%; background:linear-gradient(135deg, var(--primary), var(--accent)); color:#fff; font-size:28px; font-weight:700; display:flex; align-items:center; justify-content:center; margin:0 auto 16px; }
.expert-card h3 { font-size:17px; font-weight:700; margin-bottom:4px; }
.expert-title { font-size:13px; color:var(--accent); font-weight:600; margin-bottom:6px; }
.expert-creds { font-size:12px; color:var(--muted); line-height:1.5; margin-bottom:14px; }
.expert-spec { display:flex; flex-wrap:wrap; justify-content:center; gap:6px; }
.spec-tag { font-size:11px; padding:3px 10px; background:var(--light-bg); border-radius:var(--radius); color:var(--text); }

/* BLOG */
.blog-grid { display:grid; grid-template-columns:repeat(3, 1fr); gap:24px; }
.blog-card { border:1px solid var(--border); border-radius:var(--radius); overflow:hidden; background:#fff; text-decoration:none; color:var(--text); transition:all .2s; }
.blog-card:hover { box-shadow:0 4px 20px rgba(0,0,0,0.08); transform:translateY(-2px); }
.blog-img { height:140px; display:flex; align-items:center; justify-content:center; font-size:48px; }
.bg1 { background:linear-gradient(135deg, #e8f4f8, #c8e6f0); }
.bg2 { background:linear-gradient(135deg, #e8f5ed, #c8e8d8); }
.bg3 { background:linear-gradient(135deg, #f5f0e8, #e8d8c0); }
.bg4 { background:linear-gradient(135deg, #f0e8f5, #d8c0e8); }
.bg5 { background:linear-gradient(135deg, #f5e8e8, #e8c0c0); }
.bg6 { background:linear-gradient(135deg, #e8f0f5, #c0d8e8); }
.blog-body { padding:18px; }
.blog-tag { font-size:11px; font-weight:600; letter-spacing:1px; text-transform:uppercase; color:var(--accent); margin-bottom:6px; display:block; }
.blog-card h4 { font-size:15px; font-weight:600; line-height:1.4; margin-bottom:8px; }
.blog-card p { font-size:13px; color:var(--muted); line-height:1.5; }
.blog-footer { padding:12px 18px; border-top:1px solid var(--border); font-size:12px; color:var(--muted); display:flex; justify-content:space-between; }

/* NEWSLETTER */
.newsletter { background:linear-gradient(135deg, var(--primary-dark), var(--primary)); color:#fff; padding:60px 20px; }
.newsletter-inner { max-width:600px; margin:0 auto; text-align:center; }
.newsletter h2 { font-family:'Merriweather', serif; font-size:28px; margin-bottom:12px; }
.newsletter p { font-size:15px; color:#c8dfe9; margin-bottom:28px; line-height:1.6; }
.newsletter-form { display:flex; gap:10px; max-width:460px; margin:0 auto; }
.newsletter-form input { flex:1; padding:12px 16px; border:none; border-radius:var(--radius); font-size:14px; }
.newsletter-form button { background:var(--accent); color:#fff; border:none; padding:12px 24px; border-radius:var(--radius); font-weight:600; cursor:pointer; white-space:nowrap; }
.newsletter-disclaimer { font-size:11px; color:#8ab4c4; margin-top:12px; }

/* FOOTER */
footer { background:#0e2530; color:#8ab4c4; padding:48px 20px 24px; }
.footer-inner { max-width:1200px; margin:0 auto; }
.footer-grid { display:grid; grid-template-columns:2fr 1fr 1fr 1fr; gap:40px; margin-bottom:40px; }
.footer-brand h3 { color:#fff; font-family:'Merriweather', serif; font-size:18px; margin-bottom:12px; }
.footer-brand p { font-size:13px; line-height:1.6; }
.footer-col h4 { color:#c8dfe9; font-size:13px; font-weight:600; letter-spacing:0.5px; margin-bottom:14px; }
.footer-col a { display:block; color:#8ab4c4; text-decoration:none; font-size:13px; margin-bottom:8px; }
.footer-col a:hover { color:#fff; }
.footer-bottom { border-top:1px solid #1e3a4a; padding-top:20px; display:flex; justify-content:space-between; align-items:center; font-size:12px; flex-wrap:wrap; gap:10px; }
.footer-disclaimer { max-width:700px; line-height:1.5; }
.medical-disclaimer { background:#0a1e28; border:1px solid #1e3a4a; border-radius:var(--radius); padding:16px 20px; margin-bottom:24px; font-size:12px; line-height:1.6; color:#6a9ab0; }
.medical-disclaimer strong { color:#a8d8ea; }

/* MOBILE */
@media (max-width:900px) {
  .header-inner { flex-wrap:wrap; height:auto; padding:12px 16px; }
  nav { display:none; }
  .hero-inner { grid-template-columns:1fr; gap:32px; }
  .hero h1 { font-size:26px; }
  .topics-grid { grid-template-columns:repeat(2,1fr); }
  .articles-grid { grid-template-columns:1fr; }
  .article-side { }
  .bristol-scale { grid-template-columns:repeat(4,1fr); }
  .experts-grid { grid-template-columns:1fr; }
  .blog-grid { grid-template-columns:repeat(2,1fr); }
  .footer-grid { grid-template-columns:1fr 1fr; }
  .trust-inner { gap:16px; }
  .newsletter-form { flex-direction:column; }
}
@media (max-width:600px) {
  .topics-grid { grid-template-columns:1fr; }
  .blog-grid { grid-template-columns:1fr; }
  .bristol-scale { grid-template-columns:repeat(2,1fr); }
  .footer-grid { grid-template-columns:1fr; }
}

/* WordPress integration and interior templates */
body {font-family:Inter,Arial,sans-serif;overflow-wrap:break-word}
a {color:var(--primary)}
img {max-width:100%;height:auto} button,input,textarea,select {font:inherit}
:focus-visible {outline:3px solid #d58b24;outline-offset:4px}
.screen-reader-text,.skip-link {position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}
.skip-link:focus {position:fixed;top:10px;left:10px;clip-path:none;width:auto;height:auto;z-index:1000;background:white;padding:15px}
.menu-toggle {display:none;background:var(--primary);color:white;border:0;padding:10px 14px;border-radius:3px}
.primary-menu {display:flex;list-style:none;align-items:center}.primary-menu .sub-menu {display:none;position:absolute;list-style:none;background:white;border:1px solid var(--border);min-width:180px;z-index:10}
.primary-menu li {position:relative}.primary-menu li:hover>.sub-menu,.primary-menu li:focus-within>.sub-menu {display:block}.primary-menu .sub-menu a {height:auto;padding:14px}
.current-menu-item>a {color:var(--primary);border-bottom-color:var(--primary)}
.custom-logo {max-width:190px;max-height:48px;width:auto;object-fit:contain}
.articles-grid {grid-template-columns:minmax(0,1.2fr) minmax(0,1fr)}
.article-meta {flex-wrap:wrap}.article-img img,.blog-img img {width:100%;height:100%;object-fit:cover}
.article-main {text-decoration:none;color:var(--text)}.blog-card {display:flex;flex-direction:column}.blog-body {flex:1}
.page-hero {background:var(--light-bg);border-bottom:1px solid var(--border);padding:48px 20px}
.page-hero>div {max-width:1200px;margin:auto}.page-hero h1 {font-family:Merriweather,Georgia,serif;font-size:clamp(28px,4vw,42px);line-height:1.3;max-width:900px;margin:14px 0}
.breadcrumb {font-size:13px;color:var(--muted)}.breadcrumb a {text-decoration:none}.archive-description {max-width:760px;line-height:1.7;color:var(--muted)}
.content-layout {display:grid;grid-template-columns:minmax(0,780px) minmax(220px,300px);gap:60px;align-items:start}
.entry-content {line-height:1.8;min-width:0}.entry-content>*+* {margin-top:1.3em}.entry-content h2,.entry-content h3 {font-family:Merriweather,Georgia,serif;line-height:1.4}.entry-content ul,.entry-content ol {padding-left:1.5em}.entry-content blockquote {border-left:4px solid var(--accent);padding:15px 24px;background:var(--light-bg)}
.entry-content table {border-collapse:collapse;width:100%}.entry-content td,.entry-content th {padding:10px;border:1px solid var(--border)}.entry-content iframe {max-width:100%}
.entry-content .alignwide {width:100%}.wp-caption,.wp-block-image {max-width:100%}.wp-caption-text,figcaption {font-size:13px;color:var(--muted)}
.entry-cover {width:100%;max-height:480px;object-fit:cover;margin-bottom:28px;border-radius:3px}
.sidebar-box {padding:24px;background:var(--light-bg);border:1px solid var(--border);margin-bottom:24px}.sidebar-box h2 {font-size:18px;margin-bottom:16px}.sidebar-box ul {list-style:none}.sidebar-box li+li {margin-top:12px}.sidebar-box a {text-decoration:none}
.pagination,.post-navigation {margin-top:36px}.nav-links {display:flex;flex-wrap:wrap;gap:12px;justify-content:space-between}.page-numbers {padding:10px 15px;border:1px solid var(--border);text-decoration:none}.page-numbers.current {background:var(--primary);color:white}
.search-form {display:flex;gap:8px;flex-wrap:wrap}.search-form label {flex:1;min-width:140px}.search-field {padding:12px;border:1px solid var(--border);width:100%;min-width:0}.search-submit,.submit {padding:12px 20px;background:var(--accent);color:white;border:0;cursor:pointer}
.empty-state {padding:48px 24px;background:var(--light-bg);border:1px solid var(--border)}.empty-state h2 {margin-bottom:14px}.empty-state p {line-height:1.7;margin-bottom:20px}.error-code {font-size:100px;font-weight:700;color:var(--primary);line-height:1}.error-page {max-width:760px;margin:auto;text-align:center}.error-page h1 {margin:20px 0}.error-page .search-form {margin:28px 0}.error-page p {line-height:1.8}.error-page .btn-primary {display:inline-block}
.section-heading-link {display:flex;justify-content:space-between;gap:20px;align-items:end;margin-bottom:30px}.section-heading-link .section-header {margin:0}
.comment-list {padding-left:20px}.comment-body {padding:20px 0;border-bottom:1px solid var(--border)}.comment-form textarea,.comment-form input:not([type=checkbox]):not([type=submit]) {width:100%;padding:12px;border:1px solid var(--border)}.comment-form p {margin:16px 0}.comments-area {margin-top:48px}.comments-area h2 {font-size:22px}.comment-metadata {font-size:12px}.avatar {border-radius:50%}
.newsletter a {color:white}.newsletter-form input {min-width:0}.notice {padding:20px;background:var(--light-bg);line-height:1.7}.founder-layout {max-width:820px;margin:auto;display:grid;grid-template-columns:180px 1fr;gap:48px;padding:40px;border:1px solid var(--border)}
.admin-bar header {top:32px}.sticky {border-color:var(--accent)}.bypostauthor>.comment-body {border-left:3px solid var(--accent);padding-left:15px}.alignleft {float:left;margin-right:20px}.alignright {float:right;margin-left:20px}.aligncenter {margin-left:auto;margin-right:auto;display:block}
@media(max-width:1100px){nav a {padding:0 9px;font-size:13px}}
@media(max-width:900px){.menu-toggle {display:block}.header-inner {gap:12px}#site-navigation {width:100%}#site-navigation.is-open {display:block}.primary-menu {display:block}.primary-menu a {height:auto;padding:13px 0}.primary-menu .sub-menu {display:block;position:static;border:0;padding-left:20px}.content-layout {grid-template-columns:1fr;gap:36px}.articles-grid {grid-template-columns:1fr}.section {padding:40px 20px}.founder-layout {grid-template-columns:1fr;gap:24px;padding:24px}}
@media(max-width:600px){.page-hero {padding:30px 20px}.section-heading-link {display:block}.section-heading-link>a {display:inline-block;margin-top:14px}.trust-inner {justify-content:flex-start}.hero {padding:40px 20px}.stool-row {gap:6px;padding:8px}.stool-type {width:52px;flex-shrink:0}.stool-label {width:78px}.admin-bar header {top:0}}
@media(prefers-reduced-motion:reduce){*{transition:none!important;scroll-behavior:auto!important}}
