/* =========================================================
   Sujok Homeo Clinic — Constipation (health-topic article)
   Loaded after style-v3.css and homeopathy.css. The hero, Health Topics menu and
   two-column layout come from homeopathy.css unchanged; this file sets the hero's photo
   framing (scoped to .ct-hero) and styles the article (scoped to .ct-article).
   ========================================================= */

/* ---------- Hero ----------
   The photo is 16:9, taller than the hero band, so it is cropped top and bottom: frame on the
   woman's face. Horizontal crops keep the right side, where she sits. */
.ct-hero .hp-hero-img { object-position: 100% 22%; }
/* Soft light fade behind the text, so the blurred plant at the photo's lower left never dims it */
.ct-hero::after {
  content: ""; grid-area: 1 / 1; pointer-events: none;
  background: linear-gradient(90deg, rgba(255, 255, 255, .7) 0, rgba(255, 255, 255, .45) 30%, rgba(255, 255, 255, 0) 52%);
}
.ct-hero .hp-hero-content { position: relative; z-index: 1; }

.ct-article {
  --ct-tint: #eef5ec;          /* soft green panels */
  --ct-alert-bg: #fbeeec;      /* pale red warning panel */
  --ct-alert-line: #f1d3cf;
  --ct-alert: #b23b31;         /* warning icon and bullets (5.4:1 on white) */
  --ct-radius: 14px;
}
.ct-article p { line-height: 1.7; }
.ct-article .eyebrow { margin-bottom: 10px; }

/* Shared section heading with a short trailing rule, as in the reference */
.ct-h3 { margin-bottom: 12px; font-size: clamp(1.45rem, 2vw, 1.8rem); line-height: 1.2; color: var(--ink-900); }
.ct-h3::after {   /* the rule follows the last word, even when the heading wraps */
  content: ""; display: inline-block; width: 44px; height: 1.5px; margin-left: 16px;
  vertical-align: middle; background: var(--text-green);
}

/* ---------- Introduction ---------- */
.ct-intro {
  display: grid; grid-template-columns: minmax(0, 52fr) minmax(0, 48fr); gap: clamp(20px, 3vw, 36px);
  align-items: center; padding-bottom: 30px; margin-bottom: 4px; border-bottom: 1px solid var(--line);
}
.ct-title { margin-bottom: 14px; font-size: clamp(2.6rem, 4.6vw, 4rem); line-height: 1.02; letter-spacing: -.01em; color: var(--ink-900); }
.ct-lead { font-size: 1.05rem; color: var(--ink-700); }
.ct-intro-photo { margin: 0; overflow: hidden; border-radius: var(--ct-radius); aspect-ratio: 420 / 236; }
.ct-intro-photo img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* ---------- Text + side panel rows (Common Causes, Diet and Lifestyle) ---------- */
.ct-row {
  display: grid; grid-template-columns: minmax(0, 50fr) minmax(0, 50fr); gap: clamp(20px, 3vw, 36px);
  align-items: start; padding-block: 30px; border-bottom: 1px solid var(--line);
}
.ct-copy p { color: var(--ink-500); }
.ct-panel { padding: 20px 22px 22px; background: var(--ct-tint); border-radius: var(--ct-radius); }
.ct-panel-title { margin-bottom: 16px; font-size: 1.15rem; line-height: 1.3; color: var(--green-800); }
.ct-panel-title--icon { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.ct-panel .icon-circle { flex: none; width: 46px; height: 46px; background: #ffffff; color: var(--green-800); }
.ct-panel .icon-circle .icon { width: 22px; height: 22px; stroke-width: 1.6; }

.ct-factors { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px 20px; }
.ct-factors li { display: flex; align-items: flex-start; gap: 12px; }
.ct-factors p { font-size: .88rem; line-height: 1.45; color: var(--ink-500); }
.ct-factors strong { display: block; margin-bottom: 2px; font-size: .95rem; font-weight: 600; color: var(--ink-900); }

.ct-checks { display: grid; gap: 10px; }
.ct-checks li { position: relative; padding-left: 30px; font-size: .95rem; line-height: 1.45; color: var(--ink-700); }
.ct-checks li::before {
  content: ""; position: absolute; left: 0; top: 0; width: 20px; height: 20px; border-radius: 50%;
  background: var(--green-800) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 12.5 4 4 8-9'/%3E%3C/svg%3E") center / 12px no-repeat;
}

/* ---------- When to Seek Medical Advice ---------- */
.ct-alert {
  display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(0, 15rem); align-items: center;
  column-gap: clamp(16px, 2.4vw, 28px); margin-block: 30px;
  padding: 24px clamp(18px, 2.4vw, 28px); background: var(--ct-alert-bg); border: 1px solid var(--ct-alert-line); border-radius: var(--ct-radius);
}
.ct-alert-icon {
  display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%;
  background: var(--ct-alert); color: #ffffff;
}
.ct-alert-icon .icon { width: 28px; height: 28px; stroke-width: 2; }
.ct-alert .ct-h3 { margin-bottom: 8px; }
.ct-alert .ct-h3::after { background: var(--ct-alert); }
.ct-alert-body p { color: var(--ink-700); }
.ct-alert-list { display: grid; gap: 8px; padding-left: clamp(16px, 2.4vw, 28px); border-left: 1px solid var(--ct-alert-line); }
.ct-alert-list li { position: relative; padding-left: 20px; font-size: .92rem; line-height: 1.4; color: var(--ink-700); }
.ct-alert-list li::before { content: ""; position: absolute; left: 2px; top: .45em; width: 8px; height: 8px; border-radius: 50%; background: var(--ct-alert); }

/* ---------- Homeopathic Perspective ---------- */
.ct-perspective {
  display: grid; grid-template-columns: minmax(0, 56fr) minmax(0, 44fr); gap: clamp(20px, 3vw, 36px); align-items: center;
}
.ct-perspective .ct-copy p + p { margin-top: 10px; }
.ct-note { font-size: .88rem; font-style: italic; color: var(--ink-500); }
.ct-perspective-img {
  display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; object-position: 50% 60%;
  border-radius: 0 var(--ct-radius) var(--ct-radius) 0;
  -webkit-mask-image: linear-gradient(90deg, transparent 0, #000 28%);
          mask-image: linear-gradient(90deg, transparent 0, #000 28%);
}

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  /* Narrower article column: panels drop below their text */
  .ct-row { grid-template-columns: minmax(0, 1fr); row-gap: 18px; }
  .ct-alert { grid-template-columns: auto minmax(0, 1fr); row-gap: 16px; }
  .ct-alert-list { grid-column: 2; padding-left: 0; padding-top: 14px; border-left: 0; border-top: 1px solid var(--ct-alert-line); }
}

@media (max-width: 900px) {
  .ct-intro, .ct-perspective { grid-template-columns: minmax(0, 1fr); }
  .ct-intro-photo { max-width: 560px; }
  .ct-perspective-img { max-width: 560px; border-radius: var(--ct-radius); -webkit-mask-image: none; mask-image: none; }
}

@media (max-width: 820px) {
  /* Hero: photo on top, text below (homeopathy.css); keep the woman in frame */
  .ct-hero .hp-hero-img { object-position: 75% 30%; }
  .ct-hero::after { content: none; }
}

@media (max-width: 640px) {
  .ct-hero .hp-hero-img { object-position: 78% 40%; }
  .ct-factors { grid-template-columns: minmax(0, 1fr); }
  .ct-alert { grid-template-columns: minmax(0, 1fr); }
  .ct-alert-list { grid-column: auto; }
  .ct-alert-icon { width: 48px; height: 48px; }
}
