/*
Theme Name: Everyday Health
Theme URI: https://example.com/everyday-health
Author: Everyday Health Team
Author URI: https://example.com
Description: A modern health and wellness blog theme inspired by Healthline. Features health topics, product shop, newsletter signup, and responsive design.
Version: 2.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: everyday-health
Tags: blog, health, wellness, one-column, two-columns, responsive-layout, custom-header, custom-menu, featured-images
*/

/* ===== CSS Variables ===== */
:root {
  --primary: hsl(185, 62%, 34%);
  --primary-fg: #ffffff;
  --accent: hsl(207, 80%, 42%);
  --accent-fg: #ffffff;
  --background: #ffffff;
  --foreground: hsl(220, 20%, 15%);
  --secondary: hsl(195, 30%, 94%);
  --muted: hsl(220, 10%, 45%);
  --border: hsl(220, 13%, 90%);
  --footer-bg: hsl(20, 30%, 95%);
  --card: #ffffff;
  --radius: 0.5rem;
  --font-display: 'Playfair Display', serif;
  --font-body: 'Source Sans 3', sans-serif;
  --danger: hsl(0, 70%, 50%);
  --success: hsl(145, 60%, 40%);
}

/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body {
  font-family: var(--font-body);
  color: var(--foreground);
  background: var(--background);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
h1, h2, h3, h4, h5, h6 { font-family: var(--font-display); }
a { text-decoration: none; color: inherit; transition: color 0.2s; }
img { max-width: 100%; height: auto; display: block; }
ul { list-style: none; }

/* ===== Layout ===== */
.container { max-width: 1280px; margin: 0 auto; padding: 0 1rem; }

/* ===== Header ===== */
.site-header { background: var(--background); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 50; }
.header-widget-area { border-bottom: 1px solid var(--border); padding: 0.5rem 0; font-size: 0.85rem; background: var(--secondary); }
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 0.75rem 1rem; max-width: 1280px; margin: 0 auto; }
.site-logo { font-family: var(--font-display); font-size: 1.5rem; font-weight: 900; letter-spacing: -0.025em; }
.site-logo .heart { color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 1rem; }
.header-actions a { font-size: 0.875rem; font-weight: 600; color: var(--muted); transition: color 0.2s; }
.header-actions a:hover { color: var(--foreground); }

/* Hamburger icon */
.mobile-menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; position: relative; width: 2rem; height: 2rem; }
.hamburger-icon,
.hamburger-icon::before,
.hamburger-icon::after {
  display: block; width: 1.25rem; height: 2px; background: var(--foreground); border-radius: 2px;
  transition: all 0.3s;
}
.hamburger-icon { position: relative; }
.hamburger-icon::before, .hamburger-icon::after { content: ''; position: absolute; left: 0; }
.hamburger-icon::before { top: -6px; }
.hamburger-icon::after { top: 6px; }
.mobile-menu-toggle.active .hamburger-icon { background: transparent; }
.mobile-menu-toggle.active .hamburger-icon::before { top: 0; transform: rotate(45deg); }
.mobile-menu-toggle.active .hamburger-icon::after { top: 0; transform: rotate(-45deg); }

/* Nav */
.main-nav { border-top: 1px solid var(--border); }
.main-nav ul { display: flex; align-items: center; justify-content: center; gap: 1.5rem; padding: 0.5rem 1rem; max-width: 1280px; margin: 0 auto; flex-wrap: wrap; }
.main-nav a, .main-nav li a { font-size: 0.875rem; font-weight: 600; color: var(--foreground); transition: color 0.2s; white-space: nowrap; }
.main-nav a:hover, .main-nav li a:hover { color: var(--primary); }

/* Custom logo */
.custom-logo-link img { max-height: 56px; width: auto; }

/* ===== Hero ===== */
.hero { background: var(--secondary); padding: 3rem 0 4rem; position: relative; overflow: hidden; }
.hero h1 { font-size: 2.5rem; font-weight: 700; line-height: 1.2; max-width: 650px; }
.hero h1 em { color: var(--primary); font-style: italic; }
.hero-subtitle { margin-top: 0.75rem; color: var(--muted); font-size: 1.05rem; max-width: 500px; line-height: 1.6; }
.hero-stats { display: flex; flex-wrap: wrap; gap: 2.5rem; margin-top: 1.5rem; }
.hero-stat { display: flex; align-items: center; gap: 0.5rem; }
.hero-stat .num { font-weight: 700; color: var(--primary); }
.hero-stat .label { color: var(--muted); font-weight: 500; }
.hero-circle { position: absolute; right: 2.5rem; top: 50%; transform: translateY(-50%); width: 10rem; height: 10rem; border-radius: 50%; background: hsla(185, 62%, 34%, 0.1); }

/* ===== About ===== */
.about { padding: 4rem 0; }
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 3rem; align-items: center; }
.about-images { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; position: relative; }
.about-images img { border-radius: 1rem; object-fit: cover; width: 100%; }
.about-images .wide { grid-column: span 2; height: 16rem; }
.about-images .half { height: 12rem; }
.about-badge { position: absolute; bottom: 5rem; left: 50%; transform: translateX(-50%); background: var(--card); box-shadow: 0 4px 12px rgba(0,0,0,0.1); border-radius: 0.75rem; padding: 0.75rem 1rem; display: flex; align-items: center; gap: 0.75rem; white-space: nowrap; }
.about-badge .avatar { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: var(--secondary); display: flex; align-items: center; justify-content: center; color: var(--primary); font-weight: 700; font-size: 0.875rem; flex-shrink: 0; }
.about-badge .name { font-weight: 700; font-size: 0.875rem; }
.about-badge .specialty { color: var(--primary); font-size: 0.75rem; font-weight: 500; }
.about-content .tag { display: inline-block; background: var(--accent); color: var(--accent-fg); font-size: 0.875rem; font-weight: 600; padding: 0.375rem 1rem; border-radius: 9999px; margin-bottom: 1rem; }
.about-content h2 { font-size: 2rem; font-weight: 700; line-height: 1.2; }
.about-content h2 span { color: var(--accent); }
.about-content p { margin-top: 1rem; color: var(--muted); line-height: 1.7; }
.about-features { margin-top: 1.5rem; }
.about-features li { display: flex; align-items: flex-start; gap: 0.75rem; margin-bottom: 0.75rem; font-size: 0.95rem; }
.about-features .icon { color: var(--accent); font-size: 1.2rem; flex-shrink: 0; margin-top: 0.1rem; }
.btn-accent { display: inline-block; margin-top: 2rem; background: var(--accent); color: var(--accent-fg); font-weight: 600; padding: 0.75rem 2rem; border-radius: 0.5rem; border: none; cursor: pointer; transition: opacity 0.2s; }
.btn-accent:hover { opacity: 0.9; }
.btn-primary { display: inline-block; background: var(--primary); color: var(--primary-fg); font-weight: 700; padding: 1rem 2rem; border-radius: 0.75rem; border: none; cursor: pointer; transition: opacity 0.2s; font-size: 1.1rem; width: 100%; text-align: center; }
.btn-primary:hover { opacity: 0.9; }

/* ===== Health Topics ===== */
.health-topics { padding: 4rem 0; }
.section-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2rem; }
.section-header h2 { font-size: 1.75rem; font-weight: 700; }
.section-header a { color: var(--primary); font-weight: 600; font-size: 0.875rem; }
.topics-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 1rem; }
.topic-card { display: block; transition: transform 0.3s; }
.topic-card:hover { transform: translateY(-4px); }
.topic-card .img-wrap { border-radius: 1rem; overflow: hidden; aspect-ratio: 3/4; background: var(--secondary); }
.topic-card img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.3s; }
.topic-card:hover img { transform: scale(1.05); }
.topic-card .name { margin-top: 0.75rem; text-align: center; font-size: 0.875rem; font-weight: 600; }

/* ===== Shop ===== */
.shop { padding: 4rem 0; }
.shop .section-title { text-align: center; }
.shop .section-title h2 { font-size: 1.75rem; font-weight: 700; }
.shop .section-title p { margin-top: 0.5rem; color: var(--muted); max-width: 36rem; margin-left: auto; margin-right: auto; }
.shop-tabs { display: flex; justify-content: center; gap: 0.75rem; margin: 2rem 0; flex-wrap: wrap; }
.shop-tab { padding: 0.5rem 1.5rem; border-radius: 9999px; font-size: 0.875rem; font-weight: 700; border: 1px solid var(--primary); color: var(--primary); background: none; cursor: pointer; transition: all 0.2s; }
.shop-tab.active { background: var(--primary); color: var(--primary-fg); }
.shop-tab:hover { background: var(--primary); color: var(--primary-fg); }
.products-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; position: relative; }
.product-card { display: block; transition: box-shadow 0.3s; }
.product-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.product-card .img-wrap { background: var(--card); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1rem; aspect-ratio: 1; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.product-card img { max-height: 100%; max-width: 100%; object-fit: contain; transition: transform 0.3s; }
.product-card:hover img { transform: scale(1.05); }
.product-card .info { margin-top: 0.75rem; text-align: center; }
.product-card .info .name { font-size: 0.875rem; color: var(--muted); }
.product-card .info .price { font-size: 0.875rem; font-weight: 700; margin-top: 0.25rem; }

/* ===== Single Article (Healthline-style) ===== */
.article-page { max-width: 800px; margin: 0 auto; padding: 2rem 1rem; }
.article-breadcrumb { font-size: 0.875rem; color: var(--muted); margin-bottom: 1.5rem; }
.article-breadcrumb a { color: var(--primary); }
.article-header h1 { font-family: var(--font-display); font-size: 2.25rem; font-weight: 700; line-height: 1.3; margin-bottom: 1rem; }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; font-size: 0.875rem; color: var(--muted); margin-bottom: 1.5rem; }
.medical-review { background: var(--secondary); border-radius: 0.75rem; padding: 1rem; display: flex; align-items: center; gap: 0.75rem; margin-bottom: 2rem; }
.medical-review .badge { width: 2.5rem; height: 2.5rem; border-radius: 50%; background: hsla(185, 62%, 34%, 0.1); display: flex; align-items: center; justify-content: center; color: var(--primary); font-weight: 700; font-size: 0.875rem; flex-shrink: 0; }
.medical-review .info { font-size: 0.875rem; }
.medical-review .info strong { display: block; color: var(--foreground); }
.medical-review .info span { color: var(--muted); font-size: 0.8rem; }
.share-buttons { display: flex; gap: 0.75rem; margin-bottom: 2rem; flex-wrap: wrap; }
.share-btn { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border: 1px solid var(--border); border-radius: 0.5rem; font-size: 0.875rem; color: var(--muted); background: none; cursor: pointer; transition: all 0.2s; }
.share-btn:hover { color: var(--primary); border-color: var(--primary); }
.article-body { font-size: 1.05rem; line-height: 1.8; color: var(--foreground); }
.article-body h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin: 2.5rem 0 1rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.article-body h2:first-child { border-top: none; }
.article-body p { margin-bottom: 1.25rem; }
.article-body img { border-radius: var(--radius); margin: 1.5rem 0; }
.article-body ul, .article-body ol { margin: 1rem 0 1.25rem 1.5rem; }
.article-body li { margin-bottom: 0.5rem; }
.article-toc { position: sticky; top: 5rem; background: var(--card); border: 1px solid var(--border); border-radius: 0.75rem; padding: 1.5rem; }
.article-toc h3 { font-family: var(--font-display); font-size: 1.1rem; font-weight: 700; margin-bottom: 1rem; }
.article-toc a { display: block; font-size: 0.875rem; color: var(--muted); padding: 0.375rem 0; padding-left: 0.75rem; border-left: 2px solid transparent; transition: all 0.2s; }
.article-toc a:hover { color: var(--primary); border-left-color: var(--primary); }

/* Related articles grid */
.related-articles { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.related-articles h2 { font-family: var(--font-display); font-size: 1.5rem; font-weight: 700; margin-bottom: 1.5rem; }
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1.5rem; }
.related-card { border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; display: block; transition: box-shadow 0.3s; }
.related-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
.related-card img { width: 100%; height: 160px; object-fit: cover; }
.related-card .card-body { padding: 1rem; }
.related-card h3 { font-family: var(--font-display); font-size: 1rem; margin-bottom: 0.25rem; }
.related-card p { font-size: 0.8rem; color: var(--muted); }

/* ===== Footer ===== */
.site-footer { background: var(--footer-bg); }
.footer-inner { max-width: 1280px; margin: 0 auto; padding: 3rem 1rem; }
.footer-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 2.5rem; }
.footer-socials { display: flex; gap: 1rem; }
.footer-socials a { color: var(--foreground); transition: color 0.2s; font-size: 1.25rem; }
.footer-socials a:hover { color: var(--primary); }
.footer-grid { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 2.5rem; }
.newsletter h3 { font-family: var(--font-display); font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.newsletter p { color: var(--muted); font-size: 0.875rem; margin-bottom: 1rem; }
.newsletter-form { display: flex; }
.newsletter-form input { flex: 1; padding: 0.625rem 1rem; border-radius: 0.5rem 0 0 0.5rem; border: 1px solid var(--border); font-size: 0.875rem; outline: none; font-family: inherit; }
.newsletter-form input:focus { border-color: var(--primary); box-shadow: 0 0 0 2px hsla(185, 62%, 34%, 0.2); }
.newsletter-form button { background: var(--primary); color: var(--primary-fg); font-weight: 700; font-size: 0.875rem; padding: 0.625rem 1.5rem; border: none; border-radius: 0 0.5rem 0.5rem 0; cursor: pointer; transition: opacity 0.2s; font-family: inherit; }
.newsletter-form button:hover { opacity: 0.9; }
.newsletter .privacy { font-size: 0.75rem; color: var(--muted); margin-top: 0.5rem; }
.newsletter .privacy a { text-decoration: underline; }
.footer-links a { display: block; font-size: 0.875rem; font-weight: 500; color: var(--foreground); margin-bottom: 0.75rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary); }
.footer-bottom { margin-top: 2.5rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.footer-bottom p { font-size: 0.75rem; color: var(--muted); line-height: 1.6; max-width: 42rem; }

/* ===== Footer widgets ===== */
.footer-widget-area .footer-widget h3 {
  font-family: var(--font-display);
  font-size: 1rem;
  margin-bottom: 0.75rem;
}
.footer-widget-area ul,
.footer-widget-area ol,
.footer-widget-area .menu {
  list-style: none;
  margin: 0;
  padding: 0;
}
.footer-widget-area li { margin-bottom: 0.6rem; }
.footer-widget-area a {
  color: var(--foreground);
  font-size: 0.875rem;
  font-weight: 500;
}
.footer-widget-area a:hover { color: var(--primary); }
.footer-widget-full { margin-top: 1.5rem; }

/* Footer links with bullets */
.footer-links-bullets a { display: flex; align-items: center; gap: 0.5rem; }
.footer-links-bullets a::before { content: '•'; font-size: 1.2rem; color: var(--foreground); }

/* ===== Health Topic Hub Page (Healthline-style) ===== */
.topic-subnav-bar {
  border-bottom: 1px solid var(--border);
  background: var(--card);
  position: sticky;
  top: 0;
  z-index: 40;
}
.topic-subnav-bar .container {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  padding: 0.65rem 1rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.topic-subnav-label {
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--primary);
  letter-spacing: 0.05em;
  white-space: nowrap;
  flex-shrink: 0;
}
.topic-subnav-links {
  display: flex;
  gap: 1.25rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.topic-subnav-links a {
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
  white-space: nowrap;
}
.topic-subnav-links a:hover { color: var(--foreground); }

.topic-breadcrumb {
  font-size: 0.875rem;
  color: var(--muted);
  margin-bottom: 0.5rem;
}
.topic-breadcrumb a { color: var(--primary); }

.topic-hero {
  background: var(--secondary);
  padding: 2rem 0 2.5rem;
}
.topic-hero-inner {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: center;
}
.topic-title {
  font-family: var(--font-display);
  font-size: 2.5rem;
  line-height: 1.2;
  font-weight: 700;
}
.topic-excerpt {
  margin-top: 0.9rem;
  max-width: 42rem;
  color: var(--muted);
  font-size: 1.05rem;
}
.topic-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin-top: 1.25rem;
}
.topic-subnav a {
  display: inline-block;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  padding: 0.55rem 1rem;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.2s;
}
.topic-subnav a:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.topic-hero-image {
  border-radius: 1rem;
  overflow: hidden;
  min-height: 260px;
  background: var(--border);
}
.topic-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.topic-intro {
  padding: 2rem 1rem 0;
}
.topic-intro .entry-content {
  max-width: 900px;
  color: var(--muted);
  line-height: 1.8;
}

.topic-sections {
  padding: 2.5rem 1rem 4rem;
}

.topic-section {
  margin-top: 2.5rem;
}
.topic-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.5rem;
}
.topic-section-header h2 {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--foreground);
}
.topic-section-header a {
  color: var(--primary);
  font-size: 0.875rem;
  font-weight: 600;
  white-space: nowrap;
}
.topic-section-divider {
  border: none;
  border-top: 3px solid var(--primary);
  margin-bottom: 1.25rem;
}

/* Healthline-style horizontal article rows */
.topic-article-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
.topic-article-row {
  border-bottom: 1px solid var(--border);
  padding-bottom: 1rem;
}
.topic-article-row-inner {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
}
.topic-article-thumb {
  flex-shrink: 0;
  width: 110px;
  height: 80px;
  border-radius: 0.5rem;
  overflow: hidden;
  background: var(--secondary);
}
.topic-article-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.topic-article-info h3 {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 0.25rem;
  transition: color 0.2s;
}
.topic-article-row:hover .topic-article-info h3 { color: var(--primary); }
.topic-article-info p {
  font-size: 0.82rem;
  color: var(--muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.topic-article-meta {
  display: block;
  margin-top: 0.35rem;
  font-size: 0.74rem;
  color: var(--muted);
}
.topic-no-articles { color: var(--muted); padding: 1rem 0; }

/* Alt section */
.topic-section-alt {
  background: var(--secondary);
  padding: 1.5rem;
  border-radius: var(--radius);
  margin-bottom: 1rem;
}

/* ===== Slider Controls ===== */
.slider-controls { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 2rem; }
.dots { display: flex; gap: 0.375rem; }
.dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; background: var(--border); }
.dot.active { background: var(--primary); }
.slider-btn { width: 2.5rem; height: 2.5rem; border-radius: 50%; border: 1px solid var(--primary); color: var(--primary); background: none; display: flex; align-items: center; justify-content: center; cursor: pointer; transition: all 0.2s; font-size: 1.2rem; }
.slider-btn:hover { background: var(--primary); color: var(--primary-fg); }
.slider-btn:disabled { opacity: 0.3; cursor: default; }

/* Sticky sidebar */
.sticky-sidebar { position: sticky; top: 5rem; }

/* ===== Entry Content Formatting ===== */
.entry-content h2 { font-family: var(--font-display); font-size: 1.5rem; margin: 2rem 0 0.75rem; }
.entry-content h3 { font-family: var(--font-display); font-size: 1.25rem; margin: 1.5rem 0 0.5rem; }
.entry-content p { margin-bottom: 1rem; line-height: 1.7; }
.entry-content img { border-radius: var(--radius); margin: 1.5rem 0; }
.entry-content ul, .entry-content ol { margin: 1rem 0 1rem 1.5rem; list-style: disc; }
.entry-content ol { list-style: decimal; }
.entry-content li { margin-bottom: 0.5rem; }
.entry-content blockquote { border-left: 4px solid var(--primary); padding: 1rem 1.5rem; margin: 1.5rem 0; background: var(--secondary); border-radius: 0 var(--radius) var(--radius) 0; }

/* ===== Pagination ===== */
.nav-links { display: flex; justify-content: center; gap: 0.5rem; flex-wrap: wrap; }
.nav-links a, .nav-links span { padding: 0.5rem 0.75rem; border: 1px solid var(--border); border-radius: var(--radius); font-size: 0.875rem; }
.nav-links .current { background: var(--primary); color: var(--primary-fg); border-color: var(--primary); }
.nav-links a:hover { border-color: var(--primary); color: var(--primary); }

/* ===== Responsive ===== */
@media (max-width: 1024px) {
  .topic-hero-inner { grid-template-columns: 1fr; }
  .topic-article-list { grid-template-columns: 1fr; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
  .hero h1 { font-size: 1.75rem; }
  .hero-circle { display: none; }
  .about-grid { grid-template-columns: 1fr; }
  .topics-grid { grid-template-columns: repeat(3, 1fr); }
  .products-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .footer-top { flex-direction: column; align-items: flex-start; gap: 1rem; }
  .related-grid { grid-template-columns: 1fr; }

  /* Mobile menu */
  .mobile-menu-toggle { display: flex; align-items: center; justify-content: center; }
  .header-actions { display: none; }
  .main-nav { display: none; }
  .main-nav.open { display: block; border-top: 1px solid var(--border); }
  .main-nav.open ul { flex-direction: column; align-items: flex-start; padding: 1rem; gap: 0; }
  .main-nav.open li { width: 100%; }
  .main-nav.open a, .main-nav.open li a { display: block; padding: 0.75rem 0; border-bottom: 1px solid var(--border); font-size: 1rem; }

  /* Topic page */
  .topic-title { font-size: 1.9rem; }
  .topic-subnav-bar { position: relative; }

  /* Article sidebar */
  .article-sidebar { display: none !important; }
  .container > div[style*="grid-template-columns: 1fr 300px"] { grid-template-columns: 1fr !important; }

  /* Single product */
  div[style*="grid-template-columns: 1fr 1fr"] { grid-template-columns: 1fr !important; }
}

@media (max-width: 480px) {
  .topics-grid { grid-template-columns: repeat(2, 1fr); }
  .products-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 1rem; }
  .hero-stat { flex: 0 0 calc(50% - 0.5rem); }
  .newsletter-form { flex-direction: column; }
  .newsletter-form input { border-radius: 0.5rem; }
  .newsletter-form button { border-radius: 0.5rem; margin-top: 0.5rem; }
}

/* ===== Print Styles ===== */
@media print {
  .site-header, .site-footer, .share-buttons, .article-toc, .related-articles { display: none; }
  .article-body { font-size: 12pt; }
}

/* ===== Accessibility ===== */
.screen-reader-text {
  clip: rect(1px, 1px, 1px, 1px);
  position: absolute;
  height: 1px;
  width: 1px;
  overflow: hidden;
}
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; border-radius: 2px; }

/* ===== Article sidebar on desktop ===== */
@media (min-width: 769px) {
  .article-sidebar { display: block !important; }
}
.article-main-grid {
    display: flex;
    gap: 30px;
    max-width: 1100px;
    margin: 0 auto;
}

.article-content {
    flex: 0 0 70%;
    max-width: 70%;
}

.article-sidebar {
    flex: 0 0 30%;
    max-width: 30%;
}

@media (max-width: 980px) {
    .article-main-grid {
        flex-direction: column;
    }

    .article-content,
    .article-sidebar {
        max-width: 100%;
        flex: 100%;
    }
}
/* Sidebar sticky fix */
.sticky-sidebar {
    position: sticky;
    top: 100px; /* header ke hisaab se adjust karo */
}

/* Ensure sidebar full height le */
.article-sidebar {
    align-self: flex-start;
}