/* ═══════════════════════════════════════════════════════════
   MattTheGardenGuy — Professional Stylesheet
   ═══════════════════════════════════════════════════════════ */
:root {
  --green-dark: #2d5016;
  --green-mid: #4a7c23;
  --green-light: #7cb342;
  --white: #ffffff;
  --off-white: #f5f5f3;
  --text: #333333;
  --text-light: #666666;
  --brown: #5d4037;
  --shadow: 0 2px 12px rgba(0,0,0,0.08);
  --shadow-hover: 0 4px 20px rgba(0,0,0,0.12);
  --radius: 10px;
  --radius-sm: 6px;
  --max-width: 1200px;
  --sidebar-width: 280px;
  --transition: all 0.25s ease;
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }
body {
  font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
  color: var(--text); background: var(--white); line-height: 1.7; font-size: 16px;
}
a { color: var(--green-mid); text-decoration: none; transition: var(--transition); }
a:hover { color: var(--green-dark); }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ── NAVIGATION ── */
.site-header { background: var(--white); border-bottom: 1px solid #e8e8e8; position: sticky; top: 0; z-index: 1000; box-shadow: 0 1px 4px rgba(0,0,0,0.04); }
.nav-container { max-width: var(--max-width); margin: 0 auto; padding: 0.6rem 1.5rem; display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.site-logo { display: flex; align-items: center; gap: 0.5rem; color: var(--text); font-size: 0.95rem; font-weight: 700; white-space: nowrap; flex-shrink: 0; }
.site-logo:hover { color: var(--green-dark); }
.site-logo img { height: 50px; width: auto; border-radius: 0; }
.nav-links { display: flex; gap: 0.3rem; align-items: center; flex-wrap: wrap; justify-content: center; }
.nav-links a { color: var(--text); font-size: 0.75rem; font-weight: 500; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: #ccc; padding: 0.3rem 0.5rem; border-radius: 4px; transition: var(--transition); }
.nav-links a:hover { color: var(--green-dark); text-decoration-color: var(--green-dark); background: rgba(74,124,35,0.05); }
.nav-links a.active { color: var(--green-dark); font-weight: 700; text-decoration-color: var(--green-dark); }
.nav-right { display: flex; align-items: center; gap: 0.8rem; flex-shrink: 0; }
.nav-toggle { display: none; background: none; border: none; color: var(--text); font-size: 1.5rem; cursor: pointer; padding: 0.25rem; }

/* ── HERO — Homepage ── */
.hero { position: relative; min-height: 440px; display: flex; align-items: center; overflow: hidden; background: #1a3a0a; }
.hero-bg { position: absolute; inset: 0; background-size: cover; background-position: center; z-index: 0; opacity: 0.7; }
.hero-overlay { position: absolute; inset: 0; background: linear-gradient(135deg, rgba(20,40,10,0.65) 0%, rgba(20,40,10,0.3) 60%, transparent 100%); z-index: 1; }
.hero-inner { position: relative; z-index: 2; max-width: var(--max-width); margin: 0 auto; padding: 3rem 2rem; display: flex; align-items: center; justify-content: space-between; width: 100%; }
.hero-content { max-width: 520px; }
.hero h1 { font-family: Georgia, 'Times New Roman', serif; font-style: italic; font-size: 2.6rem; color: var(--white); line-height: 1.2; margin-bottom: 0.5rem; text-shadow: 1px 2px 6px rgba(0,0,0,0.4); }
.hero h1 .highlight { color: var(--green-light); }
.hero .subtitle { color: rgba(255,255,255,0.9); font-size: 1.05rem; margin-bottom: 1.8rem; text-shadow: 1px 1px 3px rgba(0,0,0,0.4); line-height: 1.6; }
.hero-photo { width: 200px; height: 200px; border-radius: 50%; object-fit: cover; border: 4px solid rgba(255,255,255,0.3); box-shadow: 0 4px 20px rgba(0,0,0,0.3); flex-shrink: 0; }
.hero-icons { position: absolute; bottom: 1.2rem; left: 50%; transform: translateX(-50%); display: flex; gap: 3rem; z-index: 2; }
.hero-icons .icon-item { text-align: center; color: var(--white); font-weight: 600; font-size: 0.85rem; text-shadow: 1px 1px 3px rgba(0,0,0,0.4); }
.hero-icons .icon-item .emoji { font-size: 1.5rem; display: block; margin-bottom: 0.2rem; }

/* ── HERO — Subpage ── */
.subpage-hero { padding: 2.5rem 1.5rem; text-align: center; }
.subpage-hero-banner { max-width: 900px; margin: 0 auto; border-radius: var(--radius); overflow: hidden; position: relative; min-height: 280px; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--green-dark), var(--green-mid)); }
.subpage-hero-banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0.35; }
.subpage-hero-content { position: relative; z-index: 1; padding: 3rem 2rem; max-width: 600px; text-align: center; }
.subpage-hero-content .category-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 2px; color: rgba(255,255,255,0.8); margin-bottom: 0.5rem; }
.subpage-hero-content h1 { font-family: Georgia, serif; font-size: 2.2rem; color: var(--white); margin-bottom: 0.8rem; line-height: 1.2; }
.subpage-hero-content h1 .highlight { color: var(--green-light); }
.subpage-hero-content p { color: rgba(255,255,255,0.9); font-size: 1rem; margin-bottom: 1.5rem; line-height: 1.6; }

/* ── BUTTONS ── */
.btn { display: inline-block; padding: 0.75rem 1.8rem; border-radius: var(--radius-sm); font-weight: 600; font-size: 0.95rem; transition: var(--transition); border: none; cursor: pointer; text-align: center; }
.btn-primary { background: var(--green-mid); color: var(--white); }
.btn-primary:hover { background: var(--green-light); color: var(--white); transform: translateY(-1px); box-shadow: 0 4px 12px rgba(74,124,35,0.3); }
.btn-outline { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-outline:hover { background: var(--white); color: var(--green-dark); }
.btn-dark { background: var(--text); color: var(--white); }
.btn-dark:hover { background: #555; color: var(--white); }


/* ── MAIN LAYOUT: Content + Sidebar ── */
.main-layout { max-width: var(--max-width); margin: 0 auto; padding: 2.5rem 1.5rem; display: grid; grid-template-columns: 1fr var(--sidebar-width); gap: 2.5rem; }
.main-content { min-width: 0; }

/* ── TOOLKIT / CTA SECTION ── */
.toolkit-section { display: flex; gap: 1.5rem; align-items: stretch; margin-bottom: 2.5rem; }
.toolkit-card { flex: 1; background: var(--off-white); border-radius: var(--radius); padding: 1.8rem; display: flex; flex-direction: column; }
.toolkit-card img { border-radius: var(--radius-sm); margin-bottom: 1rem; }
.toolkit-card h2 { font-size: 1.3rem; color: var(--text); margin-bottom: 0.5rem; }
.toolkit-card p { color: var(--text-light); margin-bottom: 1rem; font-size: 0.95rem; flex: 1; }
.subscribe-card { background: var(--white); border: 1px solid #e0e0e0; border-radius: var(--radius); padding: 1.5rem; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; min-width: 240px; }
.subscribe-card h3 { font-size: 1.1rem; margin-bottom: 0.3rem; }
.subscribe-card p { font-size: 0.85rem; color: var(--text-light); margin-bottom: 1rem; }

/* ── SECTION TITLES ── */
.section-title { font-size: 1.4rem; color: var(--text); margin-bottom: 1.2rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--text); display: inline-block; }

/* ── BLOG CARDS ROW ── */
.blog-row { display: flex; gap: 1.2rem; overflow-x: auto; padding-bottom: 0.8rem; margin-bottom: 1.5rem; scroll-snap-type: x mandatory; }
.blog-row::-webkit-scrollbar { height: 4px; }
.blog-row::-webkit-scrollbar-thumb { background: #ccc; border-radius: 2px; }
.blog-card { min-width: 160px; max-width: 180px; flex-shrink: 0; scroll-snap-align: start; }
.blog-card img { width: 100%; height: 110px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 0.5rem; }
.blog-card h3 { font-size: 0.85rem; color: var(--green-dark); margin-bottom: 0.3rem; line-height: 1.35; }
.blog-card .read-more { font-size: 0.8rem; font-weight: 600; color: var(--green-mid); }
.blog-card .read-more:hover { color: var(--green-dark); }
.view-all-btn { text-align: center; margin: 1rem 0 2.5rem; }
.view-all-btn .btn { font-size: 0.85rem; padding: 0.6rem 2rem; }

/* ── VIDEO CARDS ── */
.video-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 2rem; }
.video-card { position: relative; border-radius: var(--radius); overflow: hidden; background: #2a2a2a; min-height: 200px; display: flex; flex-direction: column; justify-content: flex-end; padding: 1.5rem; color: var(--white); transition: var(--transition); }
.video-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); }
.video-card .video-bg { position: absolute; inset: 0; background-size: cover; background-position: center; opacity: 0.4; transition: var(--transition); }
.video-card:hover .video-bg { opacity: 0.5; }
.video-card-content { position: relative; z-index: 1; }
.video-card .watch-label { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px; opacity: 0.8; margin-bottom: 0.3rem; }
.video-card h3 { font-size: 1.05rem; margin-bottom: 0.3rem; line-height: 1.3; }
.video-card p { font-size: 0.85rem; opacity: 0.85; line-height: 1.4; }
.play-btn { position: absolute; right: 1.2rem; bottom: 1.2rem; width: 48px; height: 48px; background: #e67e22; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.1rem; color: var(--white); z-index: 1; cursor: pointer; border: none; transition: var(--transition); }
.play-btn:hover { background: #d35400; transform: scale(1.08); }

/* ── THUMBNAIL ROW ── */
.thumb-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
.thumb-card { border-radius: var(--radius-sm); overflow: hidden; transition: var(--transition); }
.thumb-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.thumb-card img { width: 100%; height: 160px; object-fit: cover; }
.thumb-card h3 { font-size: 0.85rem; color: var(--green-dark); padding: 0.6rem 0.3rem; line-height: 1.3; }

/* ── CATEGORY CARDS (Subpage) ── */
.category-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.2rem; margin-bottom: 2.5rem; }
.category-card { border: 1px solid #e0e0e0; border-radius: var(--radius); padding: 1.8rem 1.2rem; text-align: center; transition: var(--transition); background: var(--white); }
.category-card:hover { border-color: var(--green-mid); box-shadow: var(--shadow); transform: translateY(-2px); }
.category-card img { width: 100%; height: 140px; object-fit: cover; border-radius: var(--radius-sm); margin-bottom: 1rem; }
.category-card h3 { font-size: 1rem; color: var(--green-dark); margin-bottom: 0.5rem; }
.category-card p { font-size: 0.85rem; color: var(--text-light); line-height: 1.5; }

/* ── SIDEBAR ── */
.sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.sidebar-card { background: var(--off-white); border-radius: var(--radius); padding: 1.2rem; }
.sidebar-card h3 { font-size: 0.95rem; color: var(--text); margin-bottom: 0.8rem; font-weight: 700; }
.sidebar-card img { border-radius: var(--radius-sm); margin-bottom: 0.5rem; }
.sidebar-card p { font-size: 0.85rem; color: var(--text-light); line-height: 1.5; }
.sidebar-card a { font-size: 0.85rem; font-weight: 600; }
.merch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0.5rem; margin-bottom: 0.5rem; }
.merch-item { text-align: center; font-size: 0.75rem; color: var(--text-light); }
.merch-item img { width: 100%; height: 80px; object-fit: contain; margin-bottom: 0.3rem; border-radius: 4px; background: var(--white); padding: 4px; }
.sidebar-banner { border-radius: var(--radius); overflow: hidden; }
.sidebar-banner img { width: 100%; }
.qr-row { display: flex; gap: 0.8rem; justify-content: center; margin-top: 0.5rem; }
.qr-row img { width: 80px; height: 80px; }


/* ── FOOTER ── */
.site-footer { border-top: 1px solid #e0e0e0; background: var(--off-white); }
.footer-inner { max-width: var(--max-width); margin: 0 auto; padding: 3rem 1.5rem 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr 1fr; gap: 2.5rem; margin-bottom: 2rem; }
.footer-brand h3 { font-size: 1.1rem; color: var(--text); margin-bottom: 0.3rem; }
.footer-brand .tagline { color: var(--green-mid); font-weight: 600; font-size: 0.9rem; margin-bottom: 0.8rem; }
.footer-brand p { font-size: 0.85rem; color: var(--text-light); margin-bottom: 0.3rem; line-height: 1.6; }
.footer-brand .llc { font-size: 0.8rem; color: var(--text-light); margin-top: 0.5rem; }
.footer-brand .llc strong { color: var(--text); }
.footer-col h4 { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 1.5px; color: var(--text); margin-bottom: 0.8rem; font-weight: 700; }
.footer-col ul li { margin-bottom: 0.4rem; }
.footer-col ul li::before { content: "●"; color: var(--green-mid); margin-right: 0.5rem; font-size: 0.5rem; vertical-align: middle; }
.footer-col ul li a { color: var(--text); font-size: 0.85rem; }
.footer-col ul li a:hover { color: var(--green-mid); }
.footer-bottom { text-align: center; padding-top: 1.5rem; border-top: 1px solid #ddd; font-size: 0.8rem; color: var(--text-light); }

/* ── BLOG POST ARTICLE ── */
.article-layout { max-width: 760px; margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }
.article-header { margin-bottom: 2rem; }
.article-header h1 { font-size: 2rem; color: var(--text); line-height: 1.3; margin-bottom: 0.5rem; }
.article-meta { font-size: 0.85rem; color: var(--text-light); margin-bottom: 1.5rem; }
.article-featured-img { width: 100%; border-radius: var(--radius); margin-bottom: 2rem; }
.article-body h2 { font-size: 1.4rem; color: var(--green-dark); margin: 2rem 0 0.8rem; }
.article-body h3 { font-size: 1.2rem; color: var(--green-dark); margin: 1.5rem 0 0.6rem; }
.article-body p { margin-bottom: 1.2rem; font-size: 1.05rem; line-height: 1.8; }
.article-body img { border-radius: var(--radius-sm); margin: 1.5rem 0; }
.article-body ul, .article-body ol { margin: 1rem 0 1.2rem 1.5rem; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 0.5rem; font-size: 1.05rem; line-height: 1.7; }
.article-body a { text-decoration: underline; text-underline-offset: 2px; }
.article-body blockquote { border-left: 4px solid var(--green-mid); padding: 1rem 1.5rem; margin: 1.5rem 0; background: var(--off-white); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; font-style: italic; color: var(--text-light); }
.article-body iframe { width: 100%; border-radius: var(--radius-sm); margin: 1.5rem 0; min-height: 350px; }

/* ── PAGE HERO (generic) ── */
.page-hero { background: linear-gradient(135deg, var(--green-dark), var(--green-mid)); color: var(--white); text-align: center; padding: 3rem 1.5rem; }
.page-hero h1 { font-size: 2rem; margin-bottom: 0.5rem; }
.page-hero p { opacity: 0.9; }

/* ── ABOUT / GENERIC CONTENT ── */
.about-content { max-width: 760px; margin: 0 auto; padding: 2.5rem 1.5rem; }
.about-content h2 { font-size: 1.4rem; color: var(--green-dark); margin: 2rem 0 0.8rem; }
.about-content h3 { font-size: 1.2rem; color: var(--green-dark); margin: 1.5rem 0 0.6rem; }
.about-content p { margin-bottom: 1.2rem; font-size: 1.05rem; line-height: 1.8; }
.about-content img { border-radius: var(--radius-sm); margin: 1.5rem 0; }
.about-content ul, .about-content ol { margin: 1rem 0 1.2rem 1.5rem; }
.about-content ul { list-style: disc; }
.about-content ol { list-style: decimal; }
.about-content li { margin-bottom: 0.5rem; line-height: 1.7; }
.about-content a { text-decoration: underline; text-underline-offset: 2px; }
.about-content iframe { width: 100%; border-radius: var(--radius-sm); margin: 1.5rem 0; min-height: 350px; }

/* ── CONTACT ── */
.contact-section { max-width: 600px; margin: 0 auto; padding: 3rem 1.5rem; }
.contact-form label { display: block; font-weight: 600; margin-bottom: 0.3rem; margin-top: 1rem; }
.contact-form input, .contact-form textarea { width: 100%; padding: 0.75rem; border: 1px solid #ccc; border-radius: var(--radius-sm); font-size: 1rem; font-family: inherit; transition: var(--transition); }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--green-mid); box-shadow: 0 0 0 3px rgba(74,124,35,0.1); }
.contact-form textarea { min-height: 150px; resize: vertical; }
.contact-form button { margin-top: 1.2rem; }

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .main-layout { grid-template-columns: 1fr; }
  .sidebar { flex-direction: row; flex-wrap: wrap; gap: 1rem; }
  .sidebar-card { flex: 1; min-width: 220px; }
  .category-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); padding: 1rem 1.5rem; gap: 0.5rem; border-bottom: 1px solid #e0e0e0; box-shadow: 0 4px 12px rgba(0,0,0,0.08); z-index: 999; }
  .nav-links.open { display: flex; }
  .nav-toggle { display: block; }
  .hero h1 { font-size: 1.8rem; }
  .hero-inner { flex-direction: column; text-align: center; gap: 1.5rem; padding: 2rem 1.5rem; }
  .hero-photo { width: 140px; height: 140px; }
  .hero-icons { gap: 1.5rem; }
  .toolkit-section { flex-direction: column; }
  .video-row { grid-template-columns: 1fr; }
  .thumb-row { grid-template-columns: 1fr 1fr; }
  .category-cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; text-align: center; }
  .footer-col ul li::before { display: none; }
  .subpage-hero-content h1 { font-size: 1.6rem; }
  .article-header h1 { font-size: 1.5rem; }
  .sidebar { flex-direction: column; }
}
@media (max-width: 480px) {
  .blog-card { min-width: 140px; }
  .hero h1 { font-size: 1.5rem; }
  .hero .subtitle { font-size: 0.9rem; }
}


/* ── MTGG Start Here Section (ChatGPT design) ── */
.mtgg-start-here {
  display: flex;
  gap: 1.5rem;
  align-items: stretch;
  margin-bottom: 2.5rem;
  background: #f5f0e8;
  border-radius: 16px;
  padding: 2.5rem;
}
.mtgg-start-card { flex: 1.2; }
.mtgg-start-card h2 { font-size: 1.8rem; color: var(--text); margin-bottom: 0.5rem; line-height: 1.3; }
.mtgg-start-card p { color: var(--text-light); margin-bottom: 1.2rem; font-size: 0.95rem; }
.mtgg-btn-primary {
  display: inline-block; padding: 0.75rem 1.8rem; background: var(--green-mid);
  color: var(--white); border-radius: 25px; font-weight: 600; font-size: 0.95rem; transition: var(--transition);
}
.mtgg-btn-primary:hover { background: var(--green-dark); color: var(--white); }
.mtgg-checklist-card { flex: 0.8; display: flex; align-items: center; }
.mtgg-subscribe {
  background: var(--white); border-radius: 14px; padding: 2rem 1.5rem;
  text-align: center; box-shadow: 0 2px 12px rgba(0,0,0,0.06); width: 100%;
}
.mtgg-subscribe h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.mtgg-subscribe p { font-size: 0.85rem; color: var(--text-light); margin-bottom: 1rem; line-height: 1.5; }
.mtgg-subscribe-btn {
  display: inline-block; padding: 0.6rem 1.8rem; background: var(--text);
  color: var(--white); border-radius: 25px; font-weight: 700; font-size: 0.85rem;
  text-transform: uppercase; letter-spacing: 0.5px; transition: var(--transition);
}
.mtgg-subscribe-btn:hover { background: #555; color: var(--white); }

/* ── MTGG Video Cards (ChatGPT design) ── */
.mtgg-video-card {
  position: relative; display: flex; align-items: flex-end; min-height: 220px;
  border-radius: var(--radius); overflow: hidden;
  background: linear-gradient(135deg, #2a3a1a 0%, #3d5a2a 100%);
  color: var(--white); text-decoration: none; transition: var(--transition);
}
.mtgg-video-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-hover); color: var(--white); }
.mtgg-video-overlay { position: absolute; inset: 0; background: rgba(0,0,0,0.3); z-index: 1; }
.mtgg-video-content { position: relative; z-index: 2; padding: 1.5rem; flex: 1; }
.mtgg-video-eyebrow { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 1.5px; opacity: 0.7; margin-bottom: 0.3rem; }
.mtgg-video-content h3 { font-size: 1.1rem; line-height: 1.3; margin-bottom: 0.3rem; color: var(--white); }
.mtgg-video-content h3 .accent { color: var(--green-light); }
.mtgg-video-content p { font-size: 0.85rem; opacity: 0.85; }
.mtgg-play-btn {
  position: absolute; right: 1.2rem; bottom: 1.2rem; width: 48px; height: 48px;
  background: #e67e22; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 1.1rem; color: var(--white); z-index: 2; transition: var(--transition);
}
.mtgg-play-btn:hover { background: #d35400; transform: scale(1.08); }

@media (max-width: 768px) {
  .mtgg-start-here { flex-direction: column; padding: 1.5rem; }
  .mtgg-start-card h2 { font-size: 1.4rem; }
}

/* ── MTGGWS-11: Mobile Improvements ── */
/* Prevent horizontal scroll on all viewports */
html, body { overflow-x: hidden; max-width: 100%; }

/* nav-toggle base: keep hidden on desktop, shown in media query below */

@media (max-width: 768px) {
  .nav-toggle { display: block; order: 3; }
  .nav-links { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; right: 0; background: var(--white); padding: 1rem 1.5rem; gap: 0.8rem; border-bottom: 1px solid #e0e0e0; box-shadow: 0 4px 12px rgba(0,0,0,0.1); z-index: 999; }
  .nav-links.open { display: flex; }
  .nav-links a { font-size: 0.95rem; padding: 0.6rem 0; border-bottom: 1px solid #f0f0f0; }
  .nav-links a:last-child { border-bottom: none; }
  .nav-container { position: relative; flex-wrap: nowrap; justify-content: space-between; }
  .nav-right { gap: 0; } /* keep nav-right for hamburger button, hide only social icons */
  .nav-right a[aria-label] { display: none; } /* hide social icon links on mobile */

  /* Touch-friendly minimum sizes */
  .mtgg-btn-primary, .btn, .btn-primary { min-height: 44px; padding: 0.85rem 1.8rem; }

  /* Images don't overflow */
  img { max-width: 100%; height: auto; }
  iframe { max-width: 100%; }

  /* Prevent wide tables/pre from causing horizontal scroll */
  table, pre, code { max-width: 100%; overflow-x: auto; display: block; }

  /* Hero photo — hide on very small screens to prevent overflow */
  .mtgg-hero-photo { display: none; }

  /* Sidebar stacks below content */
  .main-layout { padding: 1.5rem 1rem; }

  /* Footer single column */
  .mtgg-footer-inner { flex-direction: column; gap: 1.5rem; text-align: center; }
}

@media (max-width: 400px) {
  .nav-container { padding: 0.5rem 1rem; }
  .site-logo { font-size: 0.85rem; }
  .site-logo img { height: 38px; }
}

/* ── MTGG Mobile Override — force single column on all subpage layouts ── */
@media (max-width: 900px) {
  /* Shell layout used by category pages (growthefoodyoueat etc) */
  .shell-layout { grid-template-columns: 1fr !important; }
  .gfy-hub { width: 100% !important; max-width: 100% !important; }
  /* Blog cards in rows - allow them to shrink */
  .blog-card { min-width: 140px !important; max-width: 160px !important; }
}
@media (max-width: 600px) {
  /* Prevent any wide fixed-width container from overflowing */
  .shell-layout, .gfy-hub, .gfy-hero, .mtgg-start-here, .main-layout, .video-row { max-width: 100vw !important; overflow-x: hidden !important; }
  /* Blog cards even narrower */
  .blog-card { min-width: 120px !important; max-width: 140px !important; }
  /* Category pill row should scroll horizontally */
  .gfy-pills { flex-wrap: nowrap !important; overflow-x: auto !important; }
  /* All images constrained */
  img, video, iframe, table { max-width: 100% !important; }
}

/* ── Shell Sidebar (used by includes-based subpages) ── */
.shell-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}
.shell-sidebar .sidebar-card {
  background: var(--off-white);
  border-radius: var(--radius);
  padding: 1.2rem;
}
.shell-sidebar .sidebar-card img {
  width: 100%;
  border-radius: var(--radius-sm);
  margin-bottom: 0.5rem;
  display: block;
}
.shell-sidebar .sidebar-card h3 {
  font-size: 0.95rem;
  color: var(--text);
  margin-bottom: 0.5rem;
  font-weight: 700;
}
.shell-sidebar .sidebar-card p {
  font-size: 0.82rem;
  color: var(--text-light);
  line-height: 1.5;
}
.shell-sidebar .sidebar-card a {
  color: var(--green-mid);
  font-size: 0.85rem;
  font-weight: 600;
}
.shell-sidebar .sidebar-banner {
  text-align: center;
  padding: 1.5rem;
}

/* ── Mobile Padding Fix ── */
@media (max-width: 768px) {
  /* Hero sections: reduce side padding */
  .gfy-hero__content { padding: 2rem 1.2rem !important; }
  .gfy-hero { margin: 1rem 0.8rem !important; border-radius: 12px !important; }
  /* Prevent text overflow on all sections */
  .gfy-hub, .shell-layout, .main-layout, [class*="content"] { padding-left: 1rem !important; padding-right: 1rem !important; box-sizing: border-box !important; }
  /* Content cards — don't clip */
  .gfy-content, .gfy-grid { padding: 0 0.8rem !important; }
  /* All text elements */
  p, h1, h2, h3, h4, li { word-break: break-word; overflow-wrap: break-word; }
}

/* ── FINAL Mobile Overflow Fix — gfy category pages ── */
@media (max-width: 900px) {
  /* Constrain hub and all children to available width */
  .gfy-hub, .gfy-hub * { box-sizing: border-box; max-width: 100%; }
  .gfy-hub { width: 100% !important; padding: 0 !important; }
  .gfy-hero { margin: 0 !important; border-radius: 0 !important; max-width: 100% !important; }
  .gfy-pills { padding: 0.8rem 1rem !important; max-width: 100% !important; }
  .gfy-pills__inner { overflow-x: auto !important; flex-wrap: nowrap !important; gap: 0.5rem !important; padding-bottom: 4px; }
  .gfy-loaded { padding: 0 1rem !important; max-width: 100% !important; }
  /* Shell layout on mobile — full width, no padding leak */
  .shell-layout { padding: 0 0 2rem !important; }
  /* Sidebar cards */
  .shell-sidebar, .shell-sidebar * { box-sizing: border-box; max-width: 100%; }
}
