/* =============================================
   Weight Gain Solutions - Redesign 2026
   Fresh, natural, empowering design
   ============================================= */

/* --- Custom Properties --- */
:root {
  --color-primary: #2a4a1b;
  --color-primary-light: #4a653d;
  --color-accent: #6b9a4c;
  --color-accent-light: #81a967;
  --color-warm: #e8c87a;
  --color-bg: #f9faf7;
  --color-surface: #ffffff;
  --color-text: #2c2c2c;
  --color-text-light: #6b6b6b;
  --color-dark-bg: #1a300f;
  --color-dark-text: #d1d6cf;
  --color-border: #d5ddd0;
  --color-border-light: #e8ede4;
  --font-display: 'Bitter', Georgia, serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --base-size: 18px;
  --line-height: 1.7;
  --content-width: 720px;
  --page-width: 1200px;
  --nav-height: 72px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);
  --transition: 0.25s ease;
}

/* --- Reset & Base --- */
*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  font-size: var(--base-size);
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--nav-height) + 1rem);
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: var(--line-height);
  color: var(--color-text);
  background-color: var(--color-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--color-accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color var(--transition);
}

a:hover {
  color: var(--color-primary);
}

/* --- Skip Link --- */
.skip-link {
  position: absolute;
  top: -100%;
  left: 1rem;
  background: var(--color-primary);
  color: #fff;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  z-index: 10000;
  font-weight: 600;
  text-decoration: none;
}

.skip-link:focus {
  top: 1rem;
}

/* --- Typography --- */
h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-display);
  color: var(--color-primary);
  line-height: 1.25;
  margin-bottom: 0.75rem;
}

h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  margin-bottom: 1rem;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 700;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--color-border-light);
}

h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.5rem);
  font-weight: 600;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}

h4 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

p {
  margin-bottom: 1rem;
}

strong {
  font-weight: 600;
}

/* --- Lists (content only, NOT nav/footer) --- */
.content ul,
.content ol {
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.content ul {
  list-style: none;
  padding-left: 0;
}

.content ul li {
  position: relative;
  padding-left: 1.5rem;
  margin-bottom: 0.5rem;
}

.content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 8px;
  height: 8px;
  background: var(--color-accent);
  border-radius: 50%;
}

.content ol li {
  margin-bottom: 0.5rem;
}

/* --- Navigation --- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: rgba(249, 250, 247, 0.85);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--transition), box-shadow var(--transition);
  height: var(--nav-height);
}

.nav.scrolled {
  border-bottom-color: var(--color-border);
  box-shadow: var(--shadow-sm);
}

.nav-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
}

.nav-logo {
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
  text-decoration: none;
}

.nav-logo:hover {
  color: var(--color-primary);
}

.nav-links {
  display: flex;
  gap: 2rem;
  list-style: none;
  align-items: center;
}

.nav-links a {
  text-decoration: none;
  color: var(--color-text);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
  padding: 0.25rem 0;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--color-accent);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  width: 48px;
  height: 48px;
  padding: 12px;
  position: relative;
}

.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-primary);
  transition: transform var(--transition), opacity var(--transition);
  position: absolute;
  left: 12px;
}

.nav-toggle span:nth-child(1) { top: 16px; }
.nav-toggle span:nth-child(2) { top: 23px; }
.nav-toggle span:nth-child(3) { top: 30px; }

.nav-toggle[aria-expanded="true"] span:nth-child(1) {
  transform: rotate(45deg);
  top: 23px;
}

.nav-toggle[aria-expanded="true"] span:nth-child(2) {
  opacity: 0;
}

.nav-toggle[aria-expanded="true"] span:nth-child(3) {
  transform: rotate(-45deg);
  top: 23px;
}

/* --- Hero --- */
.hero {
  position: relative;
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--nav-height) + 3rem) 1.5rem 3rem;
  background: linear-gradient(135deg, rgba(42, 74, 27, 0.82), rgba(107, 154, 76, 0.65)),
              url('/images/hero-bg.webp') center/cover no-repeat;
  color: #fff;
  text-align: center;
}

.hero-content {
  max-width: 700px;
}

.hero h1 {
  color: #fff;
  margin-bottom: 1.25rem;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.hero-lead {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  line-height: 1.7;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.92);
}

.hero-cta {
  display: inline-block;
  background: var(--color-warm);
  color: var(--color-primary);
  padding: 0.85rem 2rem;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 1.05rem;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
}

.hero-cta:hover {
  background: #d4b55e;
  color: var(--color-primary);
  transform: translateY(-2px);
}

/* --- Subpage Hero --- */
.subpage-hero {
  position: relative;
  background: linear-gradient(135deg, rgba(42, 74, 27, 0.88), rgba(26, 48, 15, 0.82)),
              url('/images/hero-bg.webp') center/cover no-repeat;
  padding: calc(var(--nav-height) + 2.5rem) 1.5rem 2.5rem;
  color: #fff;
  text-align: center;
}

.subpage-hero h1 {
  color: #fff;
  margin-bottom: 0.75rem;
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.3;
}

.subpage-hero .hero-lead {
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

/* --- Content Area --- */
.content {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 2rem 1.5rem 4rem;
}

.content > p:first-of-type {
  font-size: 1.1rem;
  color: var(--color-text);
}

/* --- Topic Grid (Home) --- */
.topic-grid-section {
  padding: 4rem 1.5rem;
  background: var(--color-surface);
}

.topic-grid-section h2 {
  text-align: center;
  border-bottom: none;
  margin-bottom: 0.5rem;
}

.topic-grid-intro {
  text-align: center;
  max-width: 600px;
  margin: 0 auto 2.5rem;
  color: var(--color-text-light);
}

.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
  max-width: var(--page-width);
  margin: 0 auto;
}

.topic-card {
  background: var(--color-bg);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 2rem;
  text-decoration: none;
  color: var(--color-text);
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}

.topic-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  color: var(--color-text);
}

.topic-card-icon {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.topic-card h3 {
  font-size: 1.2rem;
  margin-top: 0;
  margin-bottom: 0.5rem;
  color: var(--color-primary);
}

.topic-card p {
  font-size: 0.95rem;
  color: var(--color-text-light);
  flex: 1;
}

.topic-card .card-link {
  font-weight: 600;
  color: var(--color-accent);
  font-size: 0.95rem;
  margin-top: 1rem;
}

/* --- Callout Boxes --- */
.callout {
  background: #edf5e8;
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1.25rem 1.5rem;
  margin: 1.5rem 0;
}

.callout-title {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.callout p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

.callout-warm {
  background: #fdf6e3;
  border-left-color: var(--color-warm);
}

.callout-warm .callout-title {
  color: #8b6914;
}

/* --- Disclaimer --- */
.disclaimer {
  background: #f3f5f1;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin: 2rem 0;
  line-height: 1.6;
}

.disclaimer strong {
  color: var(--color-text);
}

/* --- Tables --- */
.table-wrapper {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: var(--radius);
  border: 1px solid var(--color-border-light);
}

.content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
  min-width: 500px;
}

.content th {
  background: var(--color-primary);
  color: #fff;
  font-weight: 600;
  text-align: left;
  padding: 0.85rem 1rem;
  font-family: var(--font-display);
  font-size: 0.9rem;
}

.content td {
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--color-border-light);
  vertical-align: top;
}

.content tr:nth-child(even) td {
  background: #f5f7f3;
}

.content tr:last-child td {
  border-bottom: none;
}

/* --- FAQ Section --- */
.faq-section {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 2px solid var(--color-border-light);
}

.faq-section h2 {
  border-bottom: none;
  margin-top: 0;
}

details {
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius);
  margin-bottom: 0.75rem;
  background: var(--color-surface);
  transition: box-shadow var(--transition);
}

details[open] {
  box-shadow: var(--shadow-sm);
}

summary {
  padding: 1rem 1.25rem;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--color-primary);
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 48px;
}

summary::-webkit-details-marker {
  display: none;
}

summary::after {
  content: '+';
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--color-accent);
  flex-shrink: 0;
  transition: transform var(--transition);
}

details[open] summary::after {
  content: '-';
}

details .faq-answer {
  padding: 0 1.25rem 1.25rem;
  font-size: 0.95rem;
  color: var(--color-text);
  line-height: 1.7;
}

/* --- Help / Talk to Professional --- */
.help-section {
  background: var(--color-dark-bg);
  color: #e0e4de;
  padding: 3rem 1.5rem;
  margin-top: 3rem;
  border-radius: var(--radius-lg);
}

.help-section h2 {
  color: var(--color-warm);
  border-bottom: none;
  margin-top: 0;
  text-align: center;
}

.help-section h3 {
  color: #fff;
  margin-top: 0;
}

.help-section p {
  text-align: center;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
  color: #e0e4de;
}

.help-section a {
  color: var(--color-warm);
}

.help-section a:hover {
  color: #f0d89e;
}

.help-resources {
  list-style: none;
  padding: 0;
  max-width: 500px;
  margin: 1.5rem auto 0;
}

.help-resources li {
  padding: 0.75rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  font-size: 0.95rem;
  color: #e0e4de;
}

.help-resources li:last-child {
  border-bottom: none;
}

.help-resources a {
  color: var(--color-warm);
}

.help-resources a:hover {
  color: #f0d89e;
}

.help-resources .resource-name {
  font-weight: 600;
  color: #fff;
  display: block;
  margin-bottom: 0.25rem;
}

/* Help cards (about page variant) */
.help-card {
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
  margin-bottom: 1rem;
}

.help-card h3 {
  color: #fff;
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.help-card p {
  text-align: left;
  color: #e0e4de;
  margin-bottom: 0;
  font-size: 0.95rem;
}

.help-card strong {
  color: #fff;
}

/* --- Trust Signals (Home) --- */
.trust-section {
  padding: 3rem 1.5rem;
  text-align: center;
  background: var(--color-bg);
}

.trust-section h2 {
  border-bottom: none;
  margin-bottom: 0.5rem;
}

.trust-grid {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  max-width: var(--page-width);
  margin: 1.5rem auto 0;
}

.trust-item {
  max-width: 200px;
}

.trust-icon {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.trust-item h3 {
  font-size: 1rem;
  margin-top: 0;
  margin-bottom: 0.25rem;
}

.trust-item p {
  font-size: 0.85rem;
  color: var(--color-text-light);
}

/* --- Reviewed Date --- */
.reviewed-date {
  font-size: 0.85rem;
  color: var(--color-text-light);
  margin-top: 2rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border-light);
}

/* --- Footer --- */
.footer {
  background: var(--color-dark-bg);
  color: var(--color-dark-text);
  padding: 3rem 1.5rem 2rem;
}

.footer-inner {
  max-width: var(--page-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  gap: 2rem;
}

.footer h4 {
  color: #fff;
  font-family: var(--font-display);
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1rem;
}

.footer p {
  font-size: 0.9rem;
  line-height: 1.6;
}

.footer-links {
  list-style: none;
  padding: 0;
}

.footer-links li {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: var(--color-dark-text);
  text-decoration: none;
  font-size: 0.9rem;
}

.footer-links a:hover {
  color: var(--color-warm);
}

.footer-bottom {
  max-width: var(--page-width);
  margin: 2rem auto 0;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
  font-size: 0.825rem;
  color: rgba(209, 214, 207, 0.7);
}

.footer-disclaimer {
  max-width: var(--page-width);
  margin: 1.5rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.8rem;
  color: rgba(209, 214, 207, 0.5);
  line-height: 1.5;
}

/* --- Meal Plan Card --- */
.meal-plan-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  margin-bottom: 1.5rem;
}

.meal-plan-card h4 {
  margin-top: 0;
  color: var(--color-primary);
}

/* --- Responsive --- */
@media (max-width: 768px) {
  :root {
    --nav-height: 64px;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: var(--nav-height);
    left: 0;
    right: 0;
    background: var(--color-surface);
    flex-direction: column;
    gap: 0;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
    box-shadow: var(--shadow-md);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: flex;
    padding: 0.85rem 1.5rem;
    min-height: 48px;
    align-items: center;
  }

  .hero {
    min-height: 50vh;
    padding-top: calc(var(--nav-height) + 2rem);
  }

  .topic-grid {
    grid-template-columns: 1fr;
  }

  .footer-inner {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .footer-bottom {
    flex-direction: column;
    text-align: center;
  }

  .trust-grid {
    gap: 2rem;
  }

  .content table {
    font-size: 0.85rem;
  }

  .content th,
  .content td {
    padding: 0.6rem 0.75rem;
  }
}

@media (max-width: 480px) {
  .hero h1 {
    font-size: 1.75rem;
  }

  .hero-lead {
    font-size: 1rem;
  }

  .content {
    padding: 1.5rem 1rem 3rem;
  }

  .help-section {
    padding: 2rem 1rem;
    border-radius: var(--radius);
  }
}

/* --- Print --- */
@media print {
  .nav, .footer, .skip-link, .nav-toggle {
    display: none;
  }

  body {
    font-size: 12pt;
    color: #000;
    background: #fff;
  }

  .hero {
    background: none;
    color: #000;
    min-height: auto;
    padding: 1rem;
  }

  .hero h1 {
    color: #000;
  }
}
