/* ==========================================================================
   PAGE ASSETS -> CSS
   post: "You're Brushing Your Teeth Wrong, D'Amico Dental Care Explains Why"
   Site Assets Manager -> edit the post -> "Page Assets" -> CSS

   Loads on this post only. It adds nothing that Blog CSS already provides
   (quick-summary-box, faq-section, cta-band, green-link and the base
   typography all come from Blog CSS) and only styles what this article
   introduces: myth cards, timed-step cards, warning-sign cards, the
   toothpaste comparison table and the single-video facade.

   Every selector is written under .damico-blog-container twice, the same
   trick Blog CSS uses, so these rules tie with the legacy layer and win on
   source order because page CSS is enqueued after Blog CSS.

   No backslash anywhere in this file (Rule Zero). No viewport-width units,
   no forced-nowrap on anything, and nothing here hides content pending
   JavaScript. The phone number in the CTA band is an inline-block span so it
   moves to the next line as one piece instead of splitting as "+1-617-926-" /
   "1801"; measured to fit inside its button from 320px up.
   ========================================================================== */

/* ── 1. Accessibility contrast fixes ───────────────────────────────────────
   Measured against white: the legacy h3 colour #7FB3A6 is 2.4:1 (needs 3:1
   even for large text) and the callback button white-on-#3F8F7D is 3.9:1
   (needs 4.5:1). Same hues, darker values: 6.0:1 for both. Delete either
   rule to fall back to the site-wide look, or promote it to Blog CSS. */
.damico-blog-container.damico-blog-container h3 {
  color: #2f6d5f;
}

.damico-blog-container.damico-blog-container .cta-btn-callback {
  background: #2f6d5f;
}

.damico-blog-container.damico-blog-container .cta-btn-callback:hover,
.damico-blog-container.damico-blog-container .cta-btn-callback:focus-visible {
  background: #245a4e;
}

/* ── 2. Myth cards ─────────────────────────────────────────────────────── */
.damico-blog-container.damico-blog-container .brush-myth {
  margin: 0 0 16px;
  padding: 18px 22px;
  border-left: 4px solid #3F8F7D;
  border-radius: 10px;
  background: #f0f6f4;
  color: #333;
}

/* ── 3. Step cards (2-minute routine, morning routine) and warning signs ── */
.damico-blog-container.damico-blog-container .brush-steps {
  display: grid;
  gap: 14px;
  margin: 22px 0 28px;
  padding: 0;
  list-style: none;
}

.damico-blog-container.damico-blog-container .brush-steps > li {
  margin: 0;
  padding: 16px 20px 16px 22px;
  border: 1px solid #dbe6e2;
  border-left: 4px solid #3F8F7D;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 2px 10px rgba(27, 58, 92, .06);
  font-size: 1.05em;
  line-height: 1.7;
}

.damico-blog-container.damico-blog-container .brush-steps > li > strong:first-child {
  display: block;
  margin-bottom: 4px;
  color: #325197;
  font-size: 1.02em;
  line-height: 1.45;
}

/* warning signs: the bold lead-in is part of the sentence, so it stays inline */
.damico-blog-container.damico-blog-container .brush-steps--alert > li {
  border-color: #efd9d6;
  border-left-color: #b5453d;
  background: #fdf6f5;
}

.damico-blog-container.damico-blog-container .brush-steps--alert > li > strong:first-child {
  display: inline;
  margin: 0;
  color: #9a3129;
  font-size: inherit;
}

/* ── 4. Toothpaste comparison table ────────────────────────────────────────
   Blog CSS turns every table into display:block below 783px. This table
   opts out so its header row and column structure survive on phones; below
   640px the wrapper scrolls sideways instead, the feature column stays
   pinned, and a soft shadow on the right edge shows there is more. */
.damico-blog-container.damico-blog-container .brush-table-wrap {
  margin: 30px 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border: 1px solid #d9e2df;
  border-radius: 12px;
  background-color: #ffffff;
}

.damico-blog-container.damico-blog-container .brush-table-wrap:focus-visible {
  outline: 3px solid #c9a84c;
  outline-offset: 3px;
}

.damico-blog-container.damico-blog-container .brush-comparison-table {
  display: table;
  width: 100%;
  max-width: none;
  border-collapse: separate;
  border-spacing: 0;
  font-family: 'Lato', sans-serif;
  font-size: 1em;
}

.damico-blog-container.damico-blog-container .brush-comparison-table th,
.damico-blog-container.damico-blog-container .brush-comparison-table td {
  padding: 15px 18px;
  border: 0;
  border-right: 1px solid #e1e8e5;
  border-bottom: 1px solid #e1e8e5;
  text-align: left;
  vertical-align: top;
  color: #333;
  font-size: 1em;
  line-height: 1.6;
}

.damico-blog-container.damico-blog-container .brush-comparison-table th:last-child,
.damico-blog-container.damico-blog-container .brush-comparison-table td:last-child {
  border-right: 0;
}

.damico-blog-container.damico-blog-container .brush-comparison-table tbody tr:last-child th,
.damico-blog-container.damico-blog-container .brush-comparison-table tbody tr:last-child td {
  border-bottom: 0;
}

.damico-blog-container.damico-blog-container .brush-comparison-table thead th {
  border-right-color: rgba(255, 255, 255, .22);
  border-bottom: 0;
  background: #1b3a5c;
  color: #ffffff;
  font-weight: 700;
}

.damico-blog-container.damico-blog-container .brush-comparison-table tbody th {
  width: 22%;
  background: #f0f6f4;
  color: #1b3a5c;
  font-weight: 700;
}

/* Blog CSS stripes the row itself in cream; keep the rows clear so the cell
   tints below are the only stripes and the edge shadow shows on every row */
.damico-blog-container.damico-blog-container .brush-comparison-table tbody tr:nth-child(n) {
  background: transparent;
}

.damico-blog-container.damico-blog-container .brush-comparison-table tbody tr:nth-child(even) td {
  background: #f8fbfa;
}

.damico-blog-container.damico-blog-container .brush-comparison-table tbody tr:hover td {
  background: #eaf3ef;
}

/* ── 5. Video (thumbnail link that becomes the player on click) ─────────── */
.damico-blog-container.damico-blog-container .brush-video {
  max-width: 800px;
  margin: 38px auto;
}

.damico-blog-container.damico-blog-container .brush-video__frame {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  background: #0f2540;
  box-shadow: 0 6px 25px rgba(0, 0, 0, .15);
}

@supports not (aspect-ratio: 16 / 9) {
  .damico-blog-container.damico-blog-container .brush-video__frame {
    height: 0;
    padding-top: 56.25%;
  }
}

.damico-blog-container.damico-blog-container .brush-video__link {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  color: #ffffff;
  text-decoration: none;
}

/* the YouTube still is 4:3 with black bars top and bottom; cover crops
   exactly the 16:9 picture out of it */
.damico-blog-container.damico-blog-container .brush-video__thumb {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
}

/* If the still cannot load (blocker, offline, removed), the browser draws a
   broken-image icon. An img that failed renders its ::after, so this paints
   over the icon with the frame colour; a still that loads never shows it. */
.damico-blog-container.damico-blog-container .brush-video__thumb::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: #0f2540;
}

.damico-blog-container.damico-blog-container .brush-video__link::after {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  background: linear-gradient(180deg, rgba(15, 37, 64, 0) 45%, rgba(15, 37, 64, .42) 100%);
  pointer-events: none;
}

.damico-blog-container.damico-blog-container .brush-video__play {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 76px;
  height: 76px;
  margin: -38px 0 0 -38px;
  border-radius: 50%;
  background: #ffffff;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .35);
  color: #325197;
  transition: background-color .25s ease, color .25s ease;
}

/* optical centring: a triangle looks left-heavy in a circle */
.damico-blog-container.damico-blog-container .brush-video__play svg {
  margin-left: 4px;
}

.damico-blog-container.damico-blog-container .brush-video__link:hover .brush-video__play,
.damico-blog-container.damico-blog-container .brush-video__link:focus-visible .brush-video__play {
  background: #2f6d5f;
  color: #ffffff;
}

.damico-blog-container.damico-blog-container .brush-video__link:focus-visible {
  outline: 3px solid #c9a84c;
  outline-offset: -3px;
}

.damico-blog-container.damico-blog-container .brush-video__iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* ── 6. Responsive ─────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .damico-blog-container.damico-blog-container .brush-table-wrap {
    background-image:
      linear-gradient(to left, #ffffff 30%, rgba(255, 255, 255, 0)),
      radial-gradient(farthest-side at 100% 50%, rgba(27, 58, 92, .32), rgba(27, 58, 92, 0));
    background-repeat: no-repeat;
    background-position: 100% 0, 100% 0;
    background-size: 44px 100%, 14px 100%;
    background-attachment: local, scroll;
  }

  .damico-blog-container.damico-blog-container .brush-comparison-table {
    min-width: 540px;
    font-size: .94em;
  }

  .damico-blog-container.damico-blog-container .brush-comparison-table th,
  .damico-blog-container.damico-blog-container .brush-comparison-table td {
    padding: 12px 14px;
  }

  /* pinned feature column */
  .damico-blog-container.damico-blog-container .brush-comparison-table thead th:first-child,
  .damico-blog-container.damico-blog-container .brush-comparison-table tbody th {
    position: sticky;
    left: 0;
    z-index: 1;
    width: 116px;
    min-width: 116px;
  }

  /* cells must let the edge shadow show through, so the stripe is a faint
     translucent tint here instead of an opaque colour */
  .damico-blog-container.damico-blog-container .brush-comparison-table tbody tr:nth-child(even) td,
  .damico-blog-container.damico-blog-container .brush-comparison-table tbody tr:hover td {
    background: rgba(27, 58, 92, .035);
  }

  .damico-blog-container.damico-blog-container .brush-myth {
    padding: 16px 18px;
  }

  .damico-blog-container.damico-blog-container .brush-steps > li {
    padding: 14px 16px 14px 18px;
    font-size: 1em;
  }
}

@media (max-width: 520px) {
  .damico-blog-container.damico-blog-container .brush-video {
    margin: 30px auto;
  }

  .damico-blog-container.damico-blog-container .brush-video__frame {
    border-radius: 12px;
  }

  .damico-blog-container.damico-blog-container .brush-video__play {
    width: 60px;
    height: 60px;
    margin: -30px 0 0 -30px;
  }

  .damico-blog-container.damico-blog-container .brush-video__play svg {
    width: 26px;
    height: 26px;
  }
}

/* ── 6b. CTA band: small-screen polish ────────────────────────────────────
   The phone number must never split across two lines ("+1-617-926-" / "1801"),
   the ZIP code must not orphan, and the address must never poke out of the
   band. The number sits in its own span so it can be kept whole. */
.damico-blog-container.damico-blog-container .brush-cta-number {
  display: inline-block;
}

.damico-blog-container.damico-blog-container .cta-band__email {
  max-width: 100%;
  overflow-wrap: anywhere;
}

@media (max-width: 600px) {
  .damico-blog-container.damico-blog-container .cta-band__place {
    text-align: left;
    text-wrap: balance;
  }
}

@media (max-width: 520px) {
  .damico-blog-container.damico-blog-container .cta-buttons-wrapper a {
    padding: 14px 16px;
    font-size: 1.05em;
  }

  .damico-blog-container.damico-blog-container .brush-cta-label {
    text-align: center;
    text-wrap: balance;
  }

  .damico-blog-container.damico-blog-container .brush-cta-number {
    display: block;
  }
}

@media (max-width: 400px) {
  .damico-blog-container.damico-blog-container .cta-band {
    padding: 26px 14px;
  }

  .damico-blog-container.damico-blog-container .cta-band__email {
    font-size: .94em;
  }
}

@media (max-width: 360px) {
  .damico-blog-container.damico-blog-container .cta-band__email {
    gap: 6px;
    font-size: .86em;
  }
}

/* ── 7. Motion ─────────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .damico-blog-container.damico-blog-container .brush-video__play {
    transition: none;
  }
}