/*
 Theme Name:   Health World Web Child
 Theme URI:    https://healthworldweb.com
 Description:  Astra Child Theme for Health World Web — Evidence-Based Supplement Guides
 Author:       Health World Web
 Author URI:   https://healthworldweb.com
 Template:     astra
 Version:      1.0.0
 Text Domain:  hww-child
*/

/* ============================================================
   CSS VARIABLES
   ============================================================ */
:root {
  --hww-primary:       #1a6b3c;
  --hww-primary-light: #2d9d5c;
  --hww-primary-dark:  #0f4525;
  --hww-accent:        #f0a500;
  --hww-accent-light:  #ffd166;
  --hww-bg:            #f8faf9;
  --hww-white:         #ffffff;
  --hww-text:          #1a1a2e;
  --hww-text-muted:    #5a6a72;
  --hww-border:        #e2ece7;
  --hww-shadow:        0 4px 24px rgba(26,107,60,0.08);
  --hww-radius:        14px;
}

/* ============================================================
   GLOBAL RESETS & BASE
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--hww-bg);
  color: var(--hww-text);
  overflow-x: hidden;
}

/* ============================================================
   GOOGLE FONTS — loaded via functions.php
   ============================================================ */

/* ============================================================
   HEADER / NAVIGATION
   ============================================================ */
.site-header,
#masthead {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255,255,255,0.97) !important;
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hww-border) !important;
  box-shadow: 0 2px 16px rgba(0,0,0,0.06) !important;
  min-height: 68px;
}

/* Logo */
.site-logo-img,
.astra-logo-featured-image { max-height: 44px; width: auto; }

.site-title a {
  font-family: 'Playfair Display', Georgia, serif !important;
  font-size: 1.3rem !important;
  font-weight: 700 !important;
  color: var(--hww-primary-dark) !important;
  text-decoration: none !important;
}
.site-description {
  font-size: 0.65rem !important;
  letter-spacing: 0.1em !important;
  text-transform: uppercase !important;
  color: var(--hww-text-muted) !important;
}

/* Primary nav links */
.main-header-menu .menu-item > a,
.main-header-menu .menu-item > .ast-menu-toggle {
  font-size: 0.86rem !important;
  font-weight: 500 !important;
  color: var(--hww-text-muted) !important;
  padding: 0.5rem 0.85rem !important;
  border-radius: 8px !important;
  transition: all 0.2s !important;
}
.main-header-menu .menu-item > a:hover,
.main-header-menu .menu-item:hover > a,
.main-header-menu .current-menu-item > a {
  color: var(--hww-primary) !important;
  background: rgba(26,107,60,0.08) !important;
}

/* Dropdown sub-menus */
.main-header-menu .sub-menu {
  background: #fff !important;
  border: 1px solid var(--hww-border) !important;
  border-radius: 12px !important;
  box-shadow: 0 8px 32px rgba(0,0,0,0.12) !important;
  padding: 0.5rem !important;
  min-width: 220px !important;
}
.main-header-menu .sub-menu .menu-item > a {
  font-size: 0.84rem !important;
  border-radius: 8px !important;
  padding: 0.45rem 0.75rem !important;
  color: var(--hww-text) !important;
}
.main-header-menu .sub-menu .menu-item > a:hover {
  background: var(--hww-bg) !important;
  color: var(--hww-primary) !important;
  padding-left: 1rem !important;
}

/* CTA button in nav */
.menu-item.hww-nav-cta > a {
  background: var(--hww-primary) !important;
  color: #fff !important;
  border-radius: 8px !important;
  padding: 0.5rem 1.1rem !important;
  font-weight: 600 !important;
  margin-left: 0.3rem !important;
}
.menu-item.hww-nav-cta > a:hover {
  background: var(--hww-primary-light) !important;
}

/* ============================================================
   HEADER AD SLOT (468×60)
   ============================================================ */
.hww-header-ad {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 6px 0;
  background: #fff;
  border-bottom: 1px solid var(--hww-border);
  min-height: 76px;
}
.hww-header-ad .hww-ad-placeholder {
  width: 468px;
  height: 60px;
  background: linear-gradient(135deg, #fff8e7, #fff0c0);
  border: 2px dashed #f0c040;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #9a7a00;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ============================================================
   HERO SLIDER
   ============================================================ */
.hww-hero {
  position: relative;
  overflow: hidden;
  background: var(--hww-primary-dark);
  min-height: 480px;
  display: flex;
  align-items: center;
}
.hww-slide {
  display: none;
  width: 100%;
  min-height: 480px;
  padding: 4rem 2rem;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  animation: hwwFadeIn 0.6s ease;
}
.hww-slide.active { display: flex; }
@keyframes hwwFadeIn { from { opacity:0; transform:translateY(10px); } to { opacity:1; transform:translateY(0); } }

.hww-slide-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--hww-accent-light);
  margin-bottom: 0.75rem;
}
.hww-slide-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.2;
  max-width: 700px;
  margin-bottom: 1rem;
}
.hww-slide-desc {
  font-size: 1rem;
  color: rgba(255,255,255,0.8);
  max-width: 560px;
  line-height: 1.65;
  margin-bottom: 1.75rem;
}
.hww-slide-btn {
  display: inline-block;
  background: var(--hww-accent);
  color: #fff;
  padding: 0.85rem 2.2rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s;
  box-shadow: 0 4px 16px rgba(240,165,0,0.35);
}
.hww-slide-btn:hover {
  background: var(--hww-accent-light);
  color: #fff;
  transform: translateY(-2px);
  text-decoration: none;
}
/* Slider dots */
.hww-dots {
  position: absolute;
  bottom: 1.2rem;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 8px;
}
.hww-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: rgba(255,255,255,0.4);
  cursor: pointer;
  transition: all 0.3s;
  border: none;
  padding: 0;
}
.hww-dot.active {
  background: #fff;
  width: 24px;
  border-radius: 4px;
}

/* ============================================================
   SECTION TITLES
   ============================================================ */
.hww-section-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 1.75rem;
  padding: 0 2rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.hww-section-header h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  color: var(--hww-text);
  font-weight: 700;
}
.hww-section-header h2 span {
  color: var(--hww-primary);
}
.hww-view-all {
  font-size: 0.84rem;
  color: var(--hww-primary);
  text-decoration: none;
  font-weight: 600;
  border: 1px solid var(--hww-primary);
  padding: 0.3rem 0.9rem;
  border-radius: 20px;
  transition: all 0.2s;
}
.hww-view-all:hover {
  background: var(--hww-primary);
  color: #fff;
  text-decoration: none;
}

/* ============================================================
   CATEGORIES GRID
   ============================================================ */
.hww-cats-section { padding: 3.5rem 0 2rem; }
.hww-cats-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1.2rem;
  padding: 0 2rem;
  max-width: 1200px;
  margin: 0 auto;
}
.hww-cat-card {
  background: #fff;
  border-radius: var(--hww-radius);
  padding: 1.6rem 1.2rem 1.3rem;
  text-align: center;
  text-decoration: none;
  box-shadow: var(--hww-shadow);
  border: 2px solid transparent;
  transition: all 0.25s;
  display: block;
}
.hww-cat-card:hover {
  border-color: var(--hww-primary);
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(26,107,60,0.15);
  text-decoration: none;
}
.hww-cat-icon {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
  display: block;
  line-height: 1;
}
.hww-cat-name {
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--hww-text);
  margin-bottom: 0.3rem;
}
.hww-cat-count {
  font-size: 0.75rem;
  color: var(--hww-text-muted);
}

/* ============================================================
   LATEST POSTS + SIDEBAR LAYOUT
   ============================================================ */
.hww-posts-section { padding: 3rem 0; }
.hww-content-wrap {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 2rem;
  padding: 0 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

/* Post cards */
.hww-posts-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  align-content: start;
}
.hww-post-card {
  background: #fff;
  border-radius: var(--hww-radius);
  overflow: hidden;
  box-shadow: var(--hww-shadow);
  transition: all 0.25s;
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.hww-post-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 32px rgba(26,107,60,0.15);
  text-decoration: none;
}
.hww-card-thumb {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  background: linear-gradient(135deg, var(--hww-primary), var(--hww-primary-light));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  min-height: 150px;
}
.hww-card-body { padding: 1.2rem; flex: 1; display: flex; flex-direction: column; }
.hww-card-cat {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--hww-primary);
  margin-bottom: 0.5rem;
}
.hww-card-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--hww-text);
  line-height: 1.4;
  margin-bottom: 0.5rem;
  flex: 1;
}
.hww-card-meta {
  font-size: 0.75rem;
  color: var(--hww-text-muted);
  display: flex;
  gap: 0.75rem;
  margin-top: auto;
}

/* ============================================================
   SIDEBAR
   ============================================================ */
.hww-sidebar { display: flex; flex-direction: column; gap: 1.5rem; }
.hww-widget {
  background: #fff;
  border-radius: var(--hww-radius);
  padding: 1.4rem;
  box-shadow: var(--hww-shadow);
}
.hww-widget-title {
  font-weight: 700;
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--hww-text-muted);
  border-bottom: 2px solid var(--hww-border);
  padding-bottom: 0.7rem;
  margin-bottom: 1rem;
}
/* Sidebar ad slots */
.hww-sidebar-ad {
  background: linear-gradient(135deg, #fff8e7, #fff0c0);
  border: 2px dashed #f0c040;
  border-radius: var(--hww-radius);
  padding: 1.5rem;
  text-align: center;
  min-height: 250px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}
.hww-sidebar-ad-label {
  font-size: 0.7rem;
  color: #9a7a00;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.hww-sidebar-ad-size { font-size: 0.75rem; color: #8a6a00; }

/* ============================================================
   PRODUCT BANNER (mid-page)
   ============================================================ */
.hww-product-banner {
  background: linear-gradient(135deg, var(--hww-primary-dark) 0%, var(--hww-primary) 100%);
  border-radius: var(--hww-radius);
  padding: 2.5rem 3rem;
  display: flex;
  align-items: center;
  gap: 3rem;
  margin: 0 2rem 4rem;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}
.hww-banner-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--hww-accent-light);
  margin-bottom: 0.5rem;
}
.hww-banner-title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.8rem;
  color: #fff;
  margin-bottom: 0.6rem;
}
.hww-banner-desc { font-size: 0.9rem; color: rgba(255,255,255,0.82); line-height: 1.6; }
.hww-banner-cta { margin-left: auto; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.hww-banner-btn {
  background: var(--hww-accent);
  color: #fff;
  padding: 0.85rem 2rem;
  border-radius: 10px;
  font-weight: 700;
  font-size: 1rem;
  text-decoration: none;
  transition: all 0.2s;
  white-space: nowrap;
}
.hww-banner-btn:hover { background: var(--hww-accent-light); transform: translateY(-2px); text-decoration: none; color: #fff; }
.hww-banner-note { font-size: 0.72rem; color: rgba(255,255,255,0.6); text-align: center; }

/* ============================================================
   NEWSLETTER SECTION
   ============================================================ */
.hww-newsletter {
  background: linear-gradient(135deg, var(--hww-primary) 0%, var(--hww-primary-light) 100%);
  padding: 4rem 2rem;
  text-align: center;
  margin-bottom: 3rem;
}
.hww-newsletter h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.9rem;
  color: #fff;
  margin-bottom: 0.6rem;
}
.hww-newsletter p { color: rgba(255,255,255,0.85); margin-bottom: 1.5rem; }
.hww-newsletter-form {
  display: flex;
  gap: 0.75rem;
  max-width: 480px;
  margin: 0 auto;
  justify-content: center;
}
.hww-newsletter-form input[type="email"] {
  flex: 1;
  padding: 0.85rem 1.2rem;
  border-radius: 10px;
  border: none;
  font-size: 0.95rem;
  outline: none;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.hww-newsletter-form button {
  background: var(--hww-accent);
  color: #fff;
  border: none;
  padding: 0.85rem 1.8rem;
  border-radius: 10px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s;
  white-space: nowrap;
}
.hww-newsletter-form button:hover { background: var(--hww-accent-light); transform: translateY(-1px); }

/* ============================================================
   FOOTER
   ============================================================ */
.hww-footer-ad {
  display: flex;
  justify-content: center;
  padding: 1rem 0;
  background: #fff;
  border-top: 1px solid var(--hww-border);
}
.hww-footer-ad .hww-ad-placeholder {
  width: 728px;
  height: 90px;
  background: linear-gradient(135deg, #fff8e7, #fff0c0);
  border: 2px dashed #f0c040;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: #9a7a00;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  max-width: 100%;
}

/* Footer bottom */
.site-footer,
#colophon {
  background: #0f1a14 !important;
  color: rgba(255,255,255,0.7) !important;
}
.site-footer a { color: rgba(255,255,255,0.7) !important; }
.site-footer a:hover { color: var(--hww-primary-light) !important; }

/* ============================================================
   LANGUAGE SWITCHER
   ============================================================ */
.hww-lang-switcher { display: flex; gap: 4px; align-items: center; }
.hww-lang-btn {
  background: none;
  border: 1px solid var(--hww-border);
  border-radius: 6px;
  padding: 3px 9px;
  font-size: 0.75rem;
  cursor: pointer;
  color: var(--hww-text-muted);
  transition: all 0.2s;
  font-family: inherit;
}
.hww-lang-btn.active,
.hww-lang-btn:hover { background: var(--hww-primary); color: #fff; border-color: var(--hww-primary); }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1050px) {
  .hww-cats-grid { grid-template-columns: repeat(3, 1fr); }
  .hww-content-wrap { grid-template-columns: 1fr; }
  .hww-sidebar { display: grid; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 768px) {
  .hww-cats-grid { grid-template-columns: repeat(2, 1fr); }
  .hww-posts-grid { grid-template-columns: 1fr; }
  .hww-product-banner { flex-direction: column; text-align: center; padding: 2rem; }
  .hww-banner-cta { margin-left: 0; }
  .hww-newsletter-form { flex-direction: column; }
}
@media (max-width: 480px) {
  .hww-cats-grid { grid-template-columns: repeat(2, 1fr); }
  .hww-header-ad { display: none; }
}
