/* =========================================================
   BLOG ARTICLE PAGES
   Values copied from the "Blogs The Power of Fluoride" frame in Figma (1512 × 3186).
   Loaded after styles.css and styles-pages.css (which holds the shared blog card).
   Every class here starts with "ar-", so other pages are not affected.
   ========================================================= */
:root {
  --ar-purple: #8b1ac3;   /* left end of the hero gradient */
  --ar-text: 20px;        /* body copy: Medium, 1.4 line height */
}

/* ---------- HERO (Figma: 1416 × 392, radius 30, purple → blue) ---------- */
.ar-hero {
  position: relative;
  min-height: 392px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: var(--radius-card);
  background: linear-gradient(to right, var(--ar-purple), var(--color-primary));
  color: var(--color-white);
}
.ar-back {
  position: absolute;
  z-index: 2;
  left: 55px;
  top: 33px;
  display: flex;
  border-radius: 50%;
  transform: rotate(90deg);
}
.ar-back:focus-visible { outline: 2px solid var(--color-white); outline-offset: 4px; }
.ar-hero-text {
  position: relative;
  z-index: 1;
  max-width: calc(100% - 470px);
  padding: 67px 0 58px 94px;
}
.ar-hero h1 {
  margin: 0;
  font-size: 64px;
  font-weight: 600;
  line-height: var(--lh);
}
.ar-summary {
  max-width: 656px;
  margin: 16px 0 0;
  font-size: 24px;
  font-weight: 500;
  line-height: var(--lh);
}
/* Frosted pill (Figma shows a date and author here; this page shows the
   blog category and reading time instead, so nothing is invented) */
.ar-meta {
  display: inline-flex;
  align-items: center;
  gap: 15px;
  margin: 68px 0 0;
  padding: 10px 32px;
  border: 0.5px solid var(--color-white);
  border-radius: 38px;
  background: rgba(255, 255, 255, 0.16);
  -webkit-backdrop-filter: blur(21.95px);
  backdrop-filter: blur(21.95px);
  font-size: 15px;
  font-weight: 500;
  line-height: var(--lh);
}
.ar-meta-line { width: 1px; height: 25px; background: var(--color-white); }

/* Hero artwork, right-hand side */
.ar-hero-art { position: absolute; top: 0; right: 0; bottom: 0; width: 453px; pointer-events: none; }
.ar-hero-art img { position: absolute; max-width: none; }
/* Fluoride: tooth + glow outline + sparkle, at Figma's positions (box starts at x 963) */
.ar-tooth { position: absolute; left: 14.95px; top: 119.41px; width: 269.86px; height: 361.51px; overflow: hidden; }
.ar-tooth img { left: -48.43%; top: -26.45%; width: 196.86%; height: 146.95%; }
.ar-tooth-glow { left: -24.79px; top: 77.91px; width: 350.72px; height: 334.21px; }
.ar-tooth-sparkle { left: 126.44px; top: -22px; width: 307.2px; height: 282.69px; object-fit: cover; mix-blend-mode: screen; }
/* Other articles: their blog-card portrait, sitting on the bottom edge */
.ar-hero-art--person img { right: 90px; bottom: 0; height: 96%; width: auto; }
.ar-hero-art--dentist img { right: 0; height: 100%; filter: grayscale(1); }

/* ---------- BODY TEXT ---------- */
.ar-section h2,
.ar-row h2,
.ar-related h2 {
  margin: 0;
  font-size: 36px;
  font-weight: 600;
  line-height: var(--lh);
  color: var(--color-text);
}
.ar-text { margin-top: 16px; }
.ar-text p,
.ar-text ul {
  margin: 0;
  font-size: var(--ar-text);
  font-weight: 500;
  line-height: 1.4;
  color: var(--color-text);
}
.ar-text > :is(p, ul) + :is(p, ul) { margin-top: 28px; }   /* Figma: one blank 28px line between paragraphs */
.ar-text ul { padding-left: 1.2em; }
.ar-text li + li { margin-top: 8px; }
.ar-text li::marker { color: var(--color-primary); }
.ar-text strong { font-weight: 700; }
.ar-text a, .ar-conclusion a { text-decoration: underline; text-underline-offset: 3px; }
.ar-text a { color: var(--color-nav-active); }

.ar-intro { margin-top: 94px; }

/* Image + text rows (Figma: 636px images, radius 26) */
.ar-row { display: grid; align-items: start; }
.ar-row--image-left { grid-template-columns: 636px minmax(0, 1fr); column-gap: 50px; margin-top: 43px; }
.ar-row--image-right { grid-template-columns: minmax(0, 730px) 636px; justify-content: space-between; column-gap: 50px; margin-top: 35px; }
.ar-figure { margin: 0; overflow: hidden; border-radius: 26px; }
.ar-figure img { width: 100%; height: 100%; object-fit: cover; }
.ar-figure--tall { height: 372px; }
.ar-figure--short { height: 300px; }
/* Cut-out portraits sit on the brand blue, like the blog cards */
.ar-figure--contain { background: linear-gradient(to bottom, var(--color-primary), var(--color-blue-light)); }
.ar-figure--contain img { object-fit: contain; object-position: center bottom; }

/* ---------- CONCLUSION (Figma: navy card, radius 30) ---------- */
.ar-conclusion {
  margin-top: 47px;
  padding: 48px 78px 59px;
  border-radius: var(--radius-card);
  background: var(--color-navy);
  color: var(--color-white);
}
.ar-conclusion h2 { margin: 0; font-size: 36px; font-weight: 600; line-height: var(--lh); }
.ar-conclusion p { margin: 16px 0 0; font-size: var(--ar-text); font-weight: 500; line-height: 1.4; }
.ar-conclusion a { color: var(--color-blue-light); }

/* ---------- YOU MAY ALSO LIKE ---------- */
.ar-related { margin-top: 66px; }
.ar-related h2 { text-transform: capitalize; }
.ar-related-lead { margin: 8px 0 0; font-size: 16px; font-weight: 500; line-height: var(--lh); color: var(--color-text); }
.ar-related-grid { margin-top: 24px; }
/* On desktop the related cards follow the article frame's card sizes
   (696 × 423, 14px tag, 36px title, 16px button). Smaller screens keep the
   shared blog card styles from styles-pages.css. */
@media (min-width: 1081px) {
  .ar-related-grid .blog-card { min-height: 423px; border-radius: var(--radius-card); }
  .ar-related-grid .blog-copy { width: 58%; padding: 36px 0 63px 50px; }
  .ar-related-grid .blog-tag { gap: 10px; padding: 10px 15px; font-size: 14px; line-height: var(--lh); }
  .ar-related-grid .blog-tag::before { width: 12px; height: 12px; }
  .ar-related-grid .blog-card h3 { max-width: 347px; margin: 20px 0 10px; font-size: 36px; line-height: var(--lh); letter-spacing: 0; }
  .ar-related-grid .blog-card p { max-width: 324px; font-size: 14px; line-height: var(--lh); }
  .ar-related-grid .blog-read-more { min-width: 0; padding: 15px 30px; border-radius: var(--radius-pill); font-size: 16px; }
}

.page-article .site-footer { margin-top: 87px; }


/* =========================================================
   LAPTOP (up to 1400px)
   ========================================================= */
@media (max-width: 1400px) {
  .ar-hero-text { padding-left: 72px; max-width: calc(100% - 400px); }
  .ar-hero h1 { font-size: clamp(44px, 4.4vw, 64px); }
  .ar-summary { font-size: 21px; }
  .ar-hero-art { width: 400px; }
  .ar-hero-art--person img { right: 40px; }
  .ar-row--image-left { grid-template-columns: minmax(0, 46%) minmax(0, 1fr); column-gap: 40px; }
  .ar-row--image-right { grid-template-columns: minmax(0, 1fr) minmax(0, 46%); column-gap: 40px; }
  .ar-text p, .ar-text ul, .ar-conclusion p { font-size: 18px; }
}


/* =========================================================
   TABLET (up to 1080px)
   ========================================================= */
@media (max-width: 1080px) {
  /* Hero: text on top, artwork below it, still cut by the bottom edge */
  .ar-hero { display: flex; flex-direction: column; min-height: 0; }
  .ar-hero-text { max-width: none; padding: 64px 40px 0; }
  .ar-hero h1 { font-size: 46px; }
  .ar-summary { font-size: 19px; }
  .ar-meta { margin-top: 28px; }
  .ar-hero-art { position: relative; align-self: flex-end; width: 400px; height: 300px; margin-top: 8px; }
  .ar-hero-art--tooth { align-self: center; width: 453px; height: 320px; margin-top: -40px; }
  .ar-hero-art--person img { right: 24px; height: 100%; }
  .ar-hero-art--dentist img { right: 0; }

  .ar-intro { margin-top: 64px; }
  .ar-section h2, .ar-row h2, .ar-related h2, .ar-conclusion h2 { font-size: 30px; }
  .ar-row--image-left, .ar-row--image-right { grid-template-columns: 1fr; row-gap: 28px; margin-top: 56px; }
  /* Keep the image above its text on narrow screens */
  .ar-row--image-right .ar-figure { order: -1; }
  .ar-figure--tall, .ar-figure--short { height: auto; aspect-ratio: 636 / 372; }
  .ar-conclusion { margin-top: 56px; padding: 40px 40px 44px; }
  .ar-related { margin-top: 64px; }
  .page-article .site-footer { margin-top: 64px; }
}


/* =========================================================
   PHONE (up to 640px)
   ========================================================= */
@media (max-width: 640px) {
  .ar-hero { border-radius: 20px; }
  .ar-back { left: 20px; top: 18px; }
  .ar-hero-text { padding: 52px 20px 0; }
  .ar-hero h1 { font-size: 34px; }
  .ar-summary { font-size: 17px; }
  .ar-meta { gap: 10px; padding: 8px 16px; font-size: 14px; white-space: nowrap; }
  .ar-hero-art { width: 300px; height: 230px; }
  /* zoom (not transform) shrinks the artwork without isolating it, so the
     sparkle's "screen" blend still reaches the hero gradient behind it */
  .ar-hero-art--tooth { zoom: 0.62; width: 453px; height: 320px; align-self: center; margin-top: -40px; }
  .ar-hero-art--person img { right: 8px; }

  .ar-intro { margin-top: 48px; }
  .ar-section h2, .ar-row h2, .ar-related h2, .ar-conclusion h2 { font-size: 26px; }
  .ar-text p, .ar-text ul, .ar-conclusion p { font-size: 17px; }
  .ar-text > :is(p, ul) + :is(p, ul) { margin-top: 20px; }
  .ar-row--image-left, .ar-row--image-right { margin-top: 44px; row-gap: 20px; }
  .ar-figure { border-radius: 20px; }
  .ar-conclusion { border-radius: 20px; padding: 32px 24px 36px; }
  .ar-related { margin-top: 52px; }
  .ar-related-grid { margin-top: 20px; }
  .page-article .site-footer { margin-top: 52px; }
}
