/* ============================================
   Clenzara.com — Global Stylesheet
   Fonts: Playfair Display (headings), Inter (body)
   ============================================ */

/* --- Reset & Variables --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --primary: #2d4f35;
  --primary-light: #8daa91;
  --dark: #1a2e1a;
  --light: #f9fbf9;
  --accent: #d4a843;
  --text: #2d2d2d;
  --text-light: #6c757d;
  --font-serif: 'Playfair Display', serif;
  --font-sans: 'Inter', sans-serif;
}

body {
  font-family: var(--font-sans);
  color: var(--text);
  line-height: 1.6;
  background: var(--light);
}

h1, h2, h3, h4, .section-title, .product-name {
  font-family: var(--font-serif);
  font-weight: 700;
}

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

/* --- Medical Banner --- */
.med-disclaimer {
  background: #1a1a2e;
  color: rgba(255,255,255,.9);
  text-align: center;
  padding: .6rem 5%;
  font-size: .78rem;
  line-height: 1.4;
}
.med-disclaimer p { margin: 0; }
.med-disclaimer a { color: #ffd700; text-decoration: underline; }

/* --- Navigation --- */
nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1rem 5%;
  background: #fff;
  box-shadow: 0 2px 10px rgba(0,0,0,.05);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-logo { height: 36px; width: auto; }
.nav-links a {
  text-decoration: none;
  color: var(--text);
  font-size: .9rem;
  font-weight: 500;
  margin-left: 2rem;
}
.nav-cta {
  background: var(--primary);
  color: #fff;
  padding: .5rem 1.25rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: .9rem;
}

/* --- Hero Section --- */
.hero {
  background: linear-gradient(160deg, var(--dark) 0%, #0f1f0f 100%);
  color: #fff;
  padding: 4rem 5% 3.5rem;
  text-align: center;
}
.hero-badge {
  display: inline-block;
  background: rgba(45,122,79,.2);
  color: #5dbe80;
  padding: .35rem 1rem;
  border-radius: 50px;
  font-size: .8rem;
  font-weight: 600;
  margin-bottom: 1rem;
  border: 1px solid rgba(45,122,79,.4);
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.15;
  color: #fff;
  margin-bottom: 1rem;
}
.hero p {
  font-size: 1.1rem;
  color: rgba(255,255,255,.75);
  max-width: 580px;
  margin: 0 auto 2rem;
}

/* --- Buttons --- */
.btn-primary {
  background: var(--primary);
  color: #fff;
  padding: .9rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  display: inline-block;
}
.btn-secondary {
  background: transparent;
  color: #fff;
  padding: .9rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid rgba(255,255,255,.25);
  display: inline-block;
}

/* --- Social Proof --- */
.social-proof {
  background: #fff;
  padding: 1.5rem 5%;
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.proof-item { text-align: center; }
.proof-number { font-size: 1.8rem; font-weight: 800; color: var(--primary); }
.proof-label { font-size: .75rem; color: var(--text-light); text-transform: uppercase; letter-spacing: 1px; }

/* --- Quiz Section --- */
.quiz-section { padding: 3rem 5%; background: var(--light); text-align: center; }
.section-title { font-size: 2rem; margin-bottom: .5rem; color: var(--dark); }
.section-subtitle { color: var(--text-light); margin-bottom: 2rem; text-align: center; }

/* Risk Meter */
.risk-meter {
  width: 160px; height: 160px;
  margin: 0 auto 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.risk-meter.high { background-image: url('assets/quiz/risk_meter_high.png'); box-shadow: none; }
.risk-meter.moderate { background-image: url('assets/quiz/risk_meter_moderate.png'); box-shadow: none; }
.risk-meter.low { background-image: url('assets/quiz/risk_meter_low.png'); box-shadow: none; }
.risk-meter .pct {
  background: transparent; width: 100%; height: 100%;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  font-size: 2rem; font-weight: 800; color: var(--dark);
  padding-top: 20px;
}
.risk-meter .pct .label {
  font-size: .7rem; font-weight: 600;
  text-transform: uppercase; color: var(--text-light);
  letter-spacing: 1px; margin-top: 2px;
}
.protocol-phase { display: flex; gap: 6px; margin-bottom: 1.25rem; }
.phase-dot {
  flex: 1; border-radius: 8px;
  padding: .4rem .3rem; text-align: center;
  font-size: .65rem; font-weight: 600; color: #fff;
  line-height: 1.2;
}
.phase-dot.fill1 { background: var(--primary-light); }
.phase-dot.fill2 { background: var(--primary); }
.phase-dot.fill3 { background: var(--dark); }
.phase-dot.empty { background: #e0e0e0; color: #999; }
.protocol-strip { display: flex; gap: 3px; margin-bottom: .75rem; }
.protocol-day {
  width: 100%; height: 18px; border-radius: 4px;
  font-size: .55rem; font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
}
.protocol-day.d1 { background: #81c784; }
.protocol-day.d2 { background: #66bb6a; }
.protocol-day.d3 { background: var(--primary); }

/* Spinner */
.spinner {
  width: 40px; height: 40px;
  border: 4px solid #f3f3f3;
  border-top: 4px solid var(--primary);
  border-radius: 50%;
  animation: spin 1s linear infinite;
  margin: 0 auto;
}
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.pulse-btn { animation: pulse 2s infinite; }

/* --- Product Grid --- */
.products { padding: 4rem 5%; background: #fff; }
.product-grid {
  display: flex; gap: 1.5rem;
  justify-content: center; flex-wrap: wrap;
  max-width: 1200px; margin: 0 auto;
}
.product-card {
  background: #fff; border-radius: 16px; padding: 1.5rem;
  flex: 1; min-width: 260px; max-width: 320px;
  box-shadow: 0 4px 20px rgba(0,0,0,.07);
  text-align: left; border: 1px solid rgba(0,0,0,.06);
  transition: transform .3s;
  display: flex; flex-direction: column;
}
.product-image {
  width: 100%; height: 180px; object-fit: contain;
  margin-bottom: 1rem; background: #f9f9f9;
  border-radius: 8px; padding: .5rem;
}
.mini-image {
  width: 100%; height: 100px; object-fit: contain;
  margin-bottom: .5rem; background: #f9f9f9;
  border-radius: 6px; padding: .25rem;
}
.product-card:hover { transform: translateY(-5px); }
.product-badge {
  display: inline-block; background: var(--accent);
  color: #fff; padding: .2rem .65rem;
  border-radius: 50px; font-size: .68rem;
  font-weight: 700; text-transform: uppercase;
}
.product-name { font-size: 1.05rem; font-weight: 700; margin: .4rem 0; color: var(--dark); }
.product-desc { font-size: .85rem; color: var(--text-light); margin-bottom: 1rem; line-height: 1.5; }
.product-price { font-size: 1.3rem; font-weight: 800; color: var(--primary); margin-bottom: .75rem; }
.product-btn {
  display: block; width: 100%; background: var(--primary);
  color: #fff; padding: .75rem; border-radius: 50px;
  text-align: center; text-decoration: none;
  font-weight: 600; font-size: .9rem; transition: background .3s;
}
.product-btn:hover { background: var(--primary-light); }
.affiliate-note { font-size: .65rem; color: #999; display: block; text-align: center; margin-top: .5rem; }

/* --- Scroll Product Section --- */
.all-products { padding: 4rem 5%; background: var(--light); }
.all-product-scroll {
  display: flex; gap: 1rem; overflow-x: auto;
  padding-bottom: 1rem; max-width: 1200px; margin: 0 auto;
  scroll-snap-type: x mandatory;
}
.mini-card {
  flex: 0 0 210px; background: #fff; border-radius: 12px;
  padding: 1rem; border: 1px solid rgba(0,0,0,.06);
  display: flex; flex-direction: column; gap: .3rem;
  scroll-snap-align: start;
}
.mini-badge {
  display: inline-block; background: var(--primary);
  color: #fff; padding: .15rem .5rem;
  border-radius: 50px; font-size: .62rem; font-weight: 700;
  width: fit-content;
}
.mini-name { font-weight: 700; font-size: .85rem; color: var(--dark); }
.mini-desc { font-size: .72rem; color: var(--text-light); line-height: 1.4; flex: 1; }
.mini-price { font-size: 1rem; font-weight: 800; color: var(--primary); }
.mini-btn {
  display: block; width: 100%; background: var(--primary);
  color: #fff; padding: .45rem; border-radius: 50px;
  text-align: center; text-decoration: none;
  font-weight: 600; font-size: .75rem;
}

/* --- Blog Cards --- */
.blog-section { padding: 4rem 5%; background: #fff; text-align: center; }
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem; max-width: 1200px; margin: 2rem auto 0;
}
.blog-card {
  background: var(--light); border-radius: 16px;
  overflow: hidden; text-align: left;
  box-shadow: 0 4px 15px rgba(0,0,0,.05);
  display: flex; flex-direction: column;
}
.blog-card-img { height: 160px; background: #e8e8e8; display: flex; align-items: center; justify-content: center; font-size: 2.5rem; }
.blog-card-body { padding: 1.5rem; flex: 1; display: flex; flex-direction: column; }
.blog-tag {
  color: var(--primary); font-weight: 700;
  font-size: .7rem; text-transform: uppercase;
  letter-spacing: 1px; margin-bottom: .5rem;
}
.blog-card h3 { font-size: 1.1rem; margin-bottom: .5rem; color: var(--dark); }
.blog-card p { font-size: .82rem; color: var(--text-light); margin-bottom: 1rem; flex: 1; }
.blog-link { color: var(--primary); font-weight: 700; font-size: .82rem; text-decoration: none; }

/* --- Waitlist --- */
.waitlist {
  background: linear-gradient(160deg, var(--dark) 0%, #0f1f0f 100%);
  padding: 4rem 5%; text-align: center; color: #fff;
}
.waitlist-form { max-width: 450px; margin: 0 auto; display: flex; flex-direction: column; gap: .75rem; }
.form-row { display: flex; gap: .75rem; }
.waitlist-form input {
  flex: 1; padding: .9rem 1.25rem; border-radius: 50px;
  border: 2px solid transparent; font-size: 1rem; outline: none;
}
.waitlist-form input:focus { border-color: var(--primary); }
.waitlist-form button {
  background: var(--accent); color: #fff;
  padding: .9rem 1.75rem; border-radius: 50px;
  border: none; font-size: 1rem; font-weight: 700;
  cursor: pointer; white-space: nowrap;
}
.form-success {
  background: rgba(45,122,79,.2);
  border: 1px solid var(--primary);
  color: #5dbe80; padding: 1rem; border-radius: 12px;
  font-weight: 600; display: none;
}

/* --- AI Coach Widget --- */
#aiCoachBtn {
  position: fixed; bottom: 24px; right: 24px;
  width: 60px; height: 60px; border-radius: 50%;
  background: var(--primary); color: #fff;
  border: none; font-size: 28px; cursor: pointer;
  box-shadow: 0 4px 20px rgba(0,0,0,.3); z-index: 9999;
}
#aiCoachBtn:hover { transform: scale(1.1); }
#aiCoachPanel {
  position: fixed; bottom: 96px; right: 24px;
  width: 360px; max-height: 520px;
  background: #fff; border-radius: 16px;
  box-shadow: 0 8px 30px rgba(0,0,0,.2);
  z-index: 9998; display: none;
  flex-direction: column; overflow: hidden;
}
#aiCoachHeader {
  background: var(--dark); color: #fff;
  padding: 1rem; font-weight: 700;
}
#aiCoachHeader span { font-size: .75rem; font-weight: 400; opacity: .7; display: block; }
#aiCoachMsgs {
  flex: 1; padding: 1rem; overflow-y: auto;
  min-height: 280px; max-height: 360px;
  display: flex; flex-direction: column;
}
.aim { max-width: 85%; margin-bottom: .75rem; padding: .7rem 1rem; border-radius: 12px; font-size: .88rem; line-height: 1.4; }
.aim.b { background: #f0f4f0; color: var(--text); align-self: flex-start; }
.aim.u { background: var(--primary); color: #fff; align-self: flex-end; }
#aiCoachRow {
  display: flex; padding: .75rem;
  border-top: 1px solid #eee; gap: .5rem;
}
#aiCoachIn {
  flex: 1; padding: .7rem 1rem; border: 2px solid #ddd;
  border-radius: 25px; font-size: .88rem; outline: none;
}
#aiCoachIn:focus { border-color: var(--primary); }
#aiCoachSend {
  background: var(--primary); color: #fff;
  border: none; border-radius: 25px;
  padding: .7rem 1.2rem; font-weight: 700; cursor: pointer;
}
.ai-qb {
  display: inline-block; padding: .35rem .85rem;
  border: 2px solid var(--primary); border-radius: 50px;
  color: var(--primary); background: #fff;
  font-size: .75rem; cursor: pointer; margin: .2rem; font-weight: 600;
}
.ai-qb:hover { background: var(--primary); color: #fff; }

/* --- Footer --- */
footer {
  background: var(--dark);
  color: rgba(255,255,255,.5);
  padding: 2rem 5%;
  text-align: center;
  font-size: .8rem;
}
footer a { color: var(--primary-light); }
.footer-disclosure {
  max-width: 600px;
  margin: 0 auto 1rem;
  font-size: .7rem;
  background: rgba(255,255,255,.04);
  padding: .75rem;
  border-radius: 8px;
  line-height: 1.6;
}

/* --- Article / Blog Post Styles --- */
.article-hero-image {
  width: 100%;
  max-width: 800px;
  margin: 2rem auto;
  display: block;
  border-radius: 12px;
}

article {
  max-width: 800px;
  margin: 0 auto 4rem;
  padding: 0 5%;
}
article h1 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--dark);
  margin-bottom: 1rem;
  line-height: 1.2;
  margin-top: 2rem;
}
article h2 {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--dark);
  margin: 2.5rem 0 1rem;
}
article h3 {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  color: var(--dark);
  margin: 1.5rem 0 0.5rem;
}
article p { margin-bottom: 1.5rem; }
article ul { margin-bottom: 1.5rem; padding-left: 1.5rem; }
article li { margin-bottom: 0.5rem; }
.article-meta {
  color: var(--text-light);
  font-size: 0.9rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
}

/* Article Disclaimer */
.article-disclaimer {
  background: var(--light);
  padding: 1.5rem;
  border-radius: 12px;
  font-style: italic;
  margin-bottom: 2rem;
  font-size: 0.9rem;
}

/* Hero image inside articles */
.article-image {
  width: 100%;
  height: auto;
  border-radius: 16px;
  margin-bottom: 2rem;
}

/* Pin-style floated images */
.pin-image {
  width: 100%;
  max-width: 300px;
  float: right;
  margin: 0 0 1.5rem 1.5rem;
  border-radius: 8px;
}
.pin-image-left {
  width: 100%;
  max-width: 300px;
  float: left;
  margin: 0 1.5rem 1.5rem 0;
  border-radius: 8px;
}
.clearfix::after { content: ""; display: table; clear: both; }

/* Call to Action Box */
.cta-box {
  background: var(--dark);
  color: white;
  padding: 2.5rem;
  border-radius: 16px;
  text-align: center;
  margin: 3rem 0;
}
.cta-box h2 {
  font-family: var(--font-serif);
  color: white;
  margin-top: 0;
}
.cta-btn {
  display: inline-block;
  background: var(--primary);
  color: white;
  padding: 1rem 2rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  margin-top: 1rem;
  transition: background 0.3s;
}
.cta-btn:hover { background: var(--primary-light); }

.product-link { color: var(--primary); font-weight: 700; text-decoration: none; }
.product-link:hover { text-decoration: underline; }

/* --- Legal Pages (Privacy / Terms) --- */
.legal-page article {
  max-width: 800px;
  margin: 0 auto 4rem;
  padding: 0 5%;
}
.legal-page h1 {
  font-family: var(--font-serif);
  font-size: 2.5rem;
  color: var(--dark);
  margin-bottom: .5rem;
  margin-top: 2rem;
}
.legal-page .updated {
  color: var(--text-light);
  font-size: .9rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #eee;
  padding-bottom: 1rem;
}
.legal-page h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  color: var(--dark);
  margin: 2rem 0 .75rem;
}
.legal-page h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  color: var(--dark);
  margin: 1.25rem 0 .5rem;
}
.legal-page p { margin-bottom: 1rem; }
.legal-page ul { padding-left: 1.5rem; margin-bottom: 1rem; }
.legal-page li { margin-bottom: .3rem; }
.legal-page strong { color: var(--dark); }

.warning-box {
  background: #fff3f0;
  border: 1px solid #f5c6c6;
  border-radius: 12px;
  padding: 1.25rem;
  margin: 1.5rem 0;
}

/* --- Responsive --- */
@media (max-width: 600px) {
  .form-row { flex-direction: column; }
  .hero h1 { font-size: 1.8rem; }
  .nav-links { display: none; }
  .social-proof { gap: 1.5rem; }
  article h1, .legal-page h1 { font-size: 2rem; }
  .pin-image, .pin-image-left { float: none; margin: 1rem auto; max-width: 100%; }
}