/*
 * Blog look: cover photos, coach card, exercise cards, sample week, callouts, related cards, index thumbnails.
 * Loaded after the zip's stylesheet and blog-extra.css on blog pages only (body.ofw-blog).
 * Brand: black #111, white, logo blue #0050f8. Logical properties so Arabic (RTL) mirrors.
 */
.ofw-blog { --ofw-blue: #0050f8; --ofw-ink: #111; --ofw-line: #e5e5e5; --ofw-tint: #f2f6ff; --ofw-mist: #555; }

/* Reading progress bar along the top edge (scroll-driven; browsers without support just skip it). */
@supports (animation-timeline: scroll()) {
  .ofw-blog:has(article)::before {
    content: ""; position: fixed; inset-inline: 0; top: 0; height: 3px; z-index: 60;
    background: var(--ofw-blue); transform: scaleX(0); transform-origin: 0 50%;
    animation: ofw-progress linear both; animation-timeline: scroll(root);
  }
  .ofw-blog:has([dir="rtl"])::before { transform-origin: 100% 50%; }
}
@keyframes ofw-progress { to { transform: scaleX(1); } }

/* Cover photo */
.ofw-cover { margin: 24px 0 0; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 24px; background: #f1f1f1;
  box-shadow: 0 24px 48px -32px rgba(0, 0, 0, .45); }
.ofw-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Lead paragraph under the title */
.ofw-blog article > h1 + p { color: var(--ofw-ink); font-size: 1.2rem; line-height: 1.6;
  border-inline-start: 4px solid var(--ofw-blue); padding-inline-start: 16px; }

/* Coach card under the language box */
.ofw-coach { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 16px; align-items: start;
  margin-top: 20px; padding: 18px; border: 1px solid #d9e4ff; border-radius: 24px;
  background: linear-gradient(135deg, var(--ofw-tint) 0%, #fff 70%); }
.ofw-coach-photo { width: 76px; height: 76px; object-fit: cover; object-position: center 20%; border-radius: 18px; }
.ofw-coach-eyebrow { font-size: .72rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--ofw-blue); }
.ofw-coach-title { margin-top: 4px; font-family: var(--font-display, inherit); font-size: 1.45rem; font-weight: 800; line-height: 1.15; color: var(--ofw-ink); }
.ofw-coach-name { margin-top: 10px; font-weight: 700; color: var(--ofw-ink); }
.ofw-coach-creds { display: flex; flex-wrap: wrap; gap: 10px 20px; margin-top: 8px; padding: 0; list-style: none; }
.ofw-coach-creds li { display: flex; align-items: center; gap: 10px; }
.ofw-coach-creds img { height: 30px; width: auto; }
.ofw-coach-creds span { font-size: .82rem; font-weight: 600; color: #333; }
.ofw-coach-pitch { margin-top: 12px; font-size: .95rem; line-height: 1.6; color: var(--ofw-mist); }
.ofw-coach-cta { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.ofw-coach-cta .btn-accent { background: var(--ofw-blue); color: #fff; }
.ofw-coach-cta .btn-accent:hover { background: #0040c8; }
/* Phone: photo beside the eyebrow, title and name; credentials, text and buttons use the full width. */
@media (max-width: 639.98px) {
  .ofw-coach { row-gap: 0; column-gap: 14px; }
  .ofw-coach-body { display: contents; }
  .ofw-coach-photo { grid-row: 1 / span 3; }
  .ofw-coach-eyebrow, .ofw-coach-title, .ofw-coach-name { grid-column: 2; }
  .ofw-coach-creds, .ofw-coach-pitch, .ofw-coach-cta { grid-column: 1 / -1; }
  .ofw-coach-creds { margin-top: 14px; }
}
@media (min-width: 640px) {
  .ofw-coach { grid-template-columns: 168px minmax(0, 1fr); gap: 24px; padding: 24px; }
  .ofw-coach-photo { width: 168px; height: 200px; border-radius: 20px; }
  .ofw-coach-title { font-size: 1.8rem; }
}

/* Section headings get a short logo-blue rule */
.ofw-blog article > h2 { position: relative; padding-top: 18px; }
.ofw-blog article > h2::before { content: ""; position: absolute; top: 0; inset-inline-start: 0; width: 40px; height: 4px; border-radius: 2px; background: var(--ofw-blue); }

/* Exercise cards */
.ofw-blog article ol > li.card-lift { position: relative; overflow: hidden; background: #fff; border-color: var(--ofw-line);
  box-shadow: 0 10px 30px -24px rgba(0, 0, 0, .35); }
.ofw-blog article ol > li.card-lift::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 4px;
  background: linear-gradient(90deg, var(--ofw-blue), #5b8cff); }
.ofw-blog .card-lift .mark-badge { width: 44px !important; height: 44px !important; border-radius: 12px; clip-path: none;
  background: var(--ofw-blue) !important; color: #fff !important; font-size: 1.1rem; font-weight: 800; }
.ofw-blog .card-lift h3 { align-items: center; }
.ofw-blog .card-lift dl { display: grid; gap: 14px; }
.ofw-blog .card-lift dl > div { margin: 0 !important; }
.ofw-blog .card-lift dt { display: flex; align-items: center; gap: 6px; }
.ofw-blog .card-lift dt::before { content: ""; width: 15px; height: 15px; flex: none; background: currentColor;
  -webkit-mask: var(--ofw-icon) center / contain no-repeat; mask: var(--ofw-icon) center / contain no-repeat; }
.ofw-blog .card-lift dl > div:nth-child(1) dt { --ofw-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 22h4M12 2a7 7 0 0 0-4 12.7c.6.5 1 1.2 1 2V17h6v-.3c0-.8.4-1.5 1-2A7 7 0 0 0 12 2z'/%3E%3C/svg%3E"); }
.ofw-blog .card-lift dl > div:nth-child(2) dt { --ofw-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6h11M9 12h11M9 18h11M4 6h.01M4 12h.01M4 18h.01'/%3E%3C/svg%3E"); }
.ofw-blog .card-lift dl > div:nth-child(3) dt { --ofw-icon: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 2l4 4-4 4'/%3E%3Cpath d='M3 11v-1a4 4 0 0 1 4-4h14M7 22l-4-4 4-4'/%3E%3Cpath d='M21 13v1a4 4 0 0 1-4 4H3'/%3E%3C/svg%3E"); }
/* The dose is the takeaway: tinted box */
.ofw-blog .card-lift dl > div:last-child:not(:first-child) { padding: 12px 14px; border-radius: 14px; background: var(--ofw-tint);
  border-inline-start: 4px solid var(--ofw-blue); font-weight: 500; }

/* Sample week: tinted panel with check marks instead of a dashed outline */
.ofw-blog article .border-dashed { border: 0 !important; border-inline-start: 5px solid var(--ofw-blue) !important;
  border-radius: 20px; background: var(--ofw-tint); padding: 20px 22px; }
.ofw-blog article .border-dashed ul { list-style: none; padding-inline-start: 0; }
.ofw-blog article .border-dashed li { position: relative; padding-inline-start: 28px; }
.ofw-blog article .border-dashed li::before { content: ""; position: absolute; inset-inline-start: 0; top: .3em; width: 18px; height: 18px;
  border-radius: 50%; background: var(--ofw-blue) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 12px no-repeat; }
.ofw-blog article .border-dashed li::marker { content: none; }

/* "Before you start" safety note as a callout */
.ofw-blog article > h2.text-2xl + p.mt-3 { position: relative; padding: 16px 18px; padding-inline-start: 50px; border-radius: 16px;
  background: #f6f7f9; border: 1px solid var(--ofw-line); color: #333; }
.ofw-blog article > h2.text-2xl + p.mt-3::before { content: ""; position: absolute; inset-inline-start: 18px; top: 18px; width: 20px; height: 20px;
  background: var(--ofw-blue); -webkit-mask: var(--ofw-info) center / contain no-repeat; mask: var(--ofw-info) center / contain no-repeat;
  --ofw-info: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 11v6M12 7.5h.01'/%3E%3C/svg%3E"); }

/* Related posts as cards */
.ofw-blog nav[aria-labelledby="related"] ul { display: grid; gap: 10px; }
.ofw-blog nav[aria-labelledby="related"] ul > li { margin: 0 !important; }
.ofw-blog nav[aria-labelledby="related"] ul a { display: flex !important; height: 100%; justify-content: space-between; gap: 12px;
  padding: 14px 16px; border: 1px solid var(--ofw-line); border-radius: 16px; background: #fff; font-size: 1rem; line-height: 1.4;
  text-decoration: none !important; transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease; }
.ofw-blog nav[aria-labelledby="related"] ul a:hover,
.ofw-blog nav[aria-labelledby="related"] ul a:focus-visible { border-color: var(--ofw-blue); box-shadow: 0 0 0 1px var(--ofw-blue); transform: translateY(-1px); color: var(--ofw-ink); }
.ofw-blog nav[aria-labelledby="related"] ul a svg { flex: none; color: var(--ofw-blue); }
@media (min-width: 640px) { .ofw-blog nav[aria-labelledby="related"] ul { grid-template-columns: 1fr 1fr; } }

/* Blog index: photo on each card */
.ofw-card .ofw-thumb { display: block; margin-bottom: 14px; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 14px; background: #f1f1f1; }
.ofw-card .ofw-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.ofw-card:hover .ofw-thumb img { transform: scale(1.04); }
@media (min-width: 640px) {
  .ofw-card { display: grid; grid-template-columns: 220px minmax(0, 1fr); column-gap: 22px; }
  .ofw-card > .ofw-thumb { grid-row: 1 / span 8; margin: 0; align-self: start; }
  .ofw-card > :not(.ofw-thumb) { grid-column: 2; }
  .ofw-card > a.btn { justify-self: start; }
}

/* Tablet keeps the zip's centred header; drop the lead's side rule there. */
@media (min-width: 768px) and (max-width: 1023.98px) {
  .ofw-blog article > h1 + p { border-inline-start: 0; padding-inline-start: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .ofw-card .ofw-thumb img, .ofw-blog nav[aria-labelledby="related"] ul a { transition: none; }
}
