/* ==========================================================================
   Ozcoast Blog — shared blog content styles (Phase 4B).
   These rules were previously duplicated INSIDE each static post's inline
   <style>. Centralised here so DB-driven posts render identically. Only the
   styles NOT already in style.css are included (article-section, article-wrap,
   related-block, related-list, blog-layout, blog-toc, blog-leadform, page-hero,
   breadcrumb and the oz-form live in style.css and are reused as-is).
   Loaded AFTER style.css on blog pages only.
   ========================================================================== */

/* ---- Blog base / article meta + lead image ------------------------------ */
/* The row that separates the hero from the article. It used to be four plain
   spans over a 1px hairline you could barely see; now each fact is a chip with
   its own icon and the row closes with a rule that fades out to the right, so
   the article has a clear starting line. */
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  font-size: .875rem; color: var(--text-secondary); margin: 10px 0 32px; padding-bottom: 20px;
  position: relative; border-bottom: 0; }
.article-meta::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  border-radius: 2px; background: linear-gradient(90deg, var(--accent) 0%, rgba(0,180,216,.28) 22%, var(--border) 55%, rgba(226,235,240,0) 100%); }
.article-meta .cat { background: linear-gradient(135deg, var(--primary), #056b85); color: #fff;
  font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em;
  padding: 6px 13px; border-radius: 999px; margin: 0; box-shadow: 0 4px 12px rgba(0,79,99,.22); }
.article-meta .am-bit { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; font-weight: 500; }
.article-meta .am-ico { width: 15px; height: 15px; flex: none; color: var(--accent); }
.article-lead-img { width: 100%; border-radius: 16px; margin: 0 0 34px; aspect-ratio: 16 / 9; object-fit: cover; box-shadow: 0 10px 30px rgba(16,38,73,0.12); }

/* ---- Blog typography (article body prose) ------------------------------- */
.article-body p { color: var(--text-secondary); line-height: 1.8; margin-bottom: 18px; font-size: 1.03rem; }
.article-body h2 { font-size: 1.6rem; color: var(--primary); margin: 40px 0 14px; }
.article-body h3 { font-size: 1.18rem; color: var(--primary); margin: 28px 0 10px; }
.article-body h4 { font-size: 1.05rem; color: var(--primary); margin: 22px 0 8px; }
/* style.css strips list markers site-wide (`ul, ol { list-style: none }`) because
   the menus are built from lists. Article prose puts them back - without this a
   bulleted list in a post reads as a wall of indented sentences. */
.article-body ul { list-style: disc; margin: 0 0 20px; padding-left: 24px; }
.article-body ol { list-style: decimal; margin: 0 0 20px; padding-left: 24px; }
.article-body ul ul, .article-body ol ul { list-style: circle; margin: 9px 0 4px; }
.article-body ul ul ul { list-style: square; }
.article-body ol ol { list-style: lower-alpha; margin: 9px 0 4px; }
.article-body li { color: var(--text-secondary); line-height: 1.7; margin-bottom: 9px; padding-left: 4px; }
.article-body li::marker { color: var(--accent); }
.article-body ol li::marker { font-weight: 700; }
.article-body li > ul, .article-body li > ol { margin-bottom: 0; }
.article-body a { color: var(--accent); font-weight: 600; }
.article-body strong { color: var(--primary); }
.article-body blockquote { margin: 22px 0; padding: 14px 22px; border-left: 4px solid var(--accent); background: var(--bg-light); border-radius: 0 12px 12px 0; color: var(--text-secondary); }
.article-body table { width: 100%; border-collapse: collapse; margin: 20px 0; font-size: .96rem; }
.article-body th, .article-body td { border: 1px solid #e3e9f1; padding: 10px 12px; text-align: left; }
.article-body th { background: var(--bg-light); color: var(--primary); font-weight: 700; }
.article-body img { max-width: 100%; height: auto; border-radius: 12px; }
.article-body iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 12px; margin: 20px 0; }

/* ---- Blog infographic --------------------------------------------------- */
.article-infographic { margin: 34px 0 38px; }
.article-infographic img { width: 100%; height: auto; border-radius: 16px; display: block;
  border: 1px solid var(--border); box-shadow: 0 10px 30px rgba(16,38,73,0.10); background: #fff; }
.article-infographic figcaption { margin-top: 12px; font-size: .85rem; color: var(--text-secondary);
  text-align: center; line-height: 1.6; padding: 0 10px; }
.article-infographic figcaption::before { content: ""; display: block; width: 34px; height: 2px;
  margin: 0 auto 10px; border-radius: 2px; background: var(--accent); }

/* ---- Blog CTA (in-article) ---------------------------------------------- */
.article-cta { margin-top: 44px; background: var(--bg-light); border-radius: 16px; padding: 32px 30px; text-align: center; }
.article-cta h3 { color: var(--primary); font-size: 1.3rem; margin: 0 0 10px; }
.article-cta p { color: var(--text-secondary); margin: 0 0 20px; }

/* ---- Blog key takeaways ------------------------------------------------- */
.key-takeaways { background: rgba(0,169,224,0.05); border-left: 4px solid var(--accent); padding: 25px 30px; border-radius: 0 12px 12px 0; margin-bottom: 40px; }
.key-takeaways h3 { margin-top: 0 !important; font-size: 1.25rem !important; display: flex; align-items: center; gap: 10px; }
.key-takeaways ul { margin-bottom: 0 !important; list-style: none !important; padding-left: 0 !important; }
.key-takeaways li { position: relative; padding-left: 28px; margin-bottom: 12px; font-weight: 500; color: var(--primary) !important; }
.key-takeaways li::before { content: ''; position: absolute; left: 0; top: 4px; width: 18px; height: 18px; background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%2300A9E0' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E"); background-size: cover; }

/* ---- Blog bento (custom multi-card sections) ---------------------------- */
.bento-section-title { font-size: 1.4rem !important; color: var(--primary); margin: 50px 0 25px !important; padding-bottom: 10px; border-bottom: 1px solid #eee; }
.mini-bento-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; margin-bottom: 40px; }
.mb-card { background: #fff; border: 1px solid #eee; padding: 20px; border-radius: 12px; box-shadow: 0 4px 15px rgba(0,0,0,0.02); transition: transform 0.3s ease, box-shadow 0.3s ease; }
.mb-card:hover { transform: translateY(-3px); box-shadow: 0 10px 25px rgba(0,169,224,0.1); border-color: rgba(0,169,224,0.2); }
.mb-icon { width: 40px; height: 40px; color: var(--accent); margin-bottom: 15px; background: rgba(0,169,224,0.1); border-radius: 8px; display: flex; align-items: center; justify-content: center; }
.mb-card h4 { font-size: 1.1rem; color: var(--primary); margin-bottom: 8px; }
.mb-card p { font-size: 0.9rem !important; margin-bottom: 0 !important; line-height: 1.5 !important; }

/* ---- Sticky sidebar fix ------------------------------------------------- */
/* style.css sets `body { overflow-x: hidden }`, which turns body into a scroll
   container and disables position:sticky for the blog sidebar (.blog-aside).
   `clip` prevents horizontal scroll WITHOUT breaking sticky. Scoped to blog
   pages only (blog.css loads after style.css). html already uses clip. */
body { overflow-x: clip; }

/* Keep the whole sticky sidebar within the viewport so the lead form is always
   visible: cap the aside to the screen height, let the TOC shrink + scroll
   internally, and pin the form at natural height below it. */
.blog-aside { max-height: calc(100vh - 116px); }
.blog-toc { max-height: none; min-height: 0; flex: 0 1 auto; }
.blog-leadform { flex: 0 0 auto; }
@media (max-width: 992px) { .blog-aside { max-height: none; } }

/* Consent line on the blue lead form: style.css forces dark text + dark link
   globally with !important (meant for light forms), which is unreadable on the
   blue gradient. Restore readable light text + light link (higher specificity
   + !important to win). */
.blog-leadform .oz-consent { align-items: flex-start; gap: 9px; }
.blog-leadform .oz-consent label { color: rgba(255, 255, 255, 0.9) !important; font-size: 0.76rem; line-height: 1.5; }
.blog-leadform .oz-consent a { color: #d6f7ff !important; text-decoration: underline; }
.blog-leadform .oz-consent input[type="checkbox"] { accent-color: #16bfe8; margin-top: 2px; flex: 0 0 auto; }

/* ---- Article FAQs ------------------------------------------------------- */
/* Markup is the site's standard accordion (.faq-item / .faq-question /
   .faq-answer, opened by js/main.js), so behaviour matches the service pages.
   These rules only place it inside an article: a tinted panel that reads as part
   of the post rather than a bolted-on list of browser <details> boxes. */
.article-faqs { margin: 48px 0 0; padding: 30px 32px 12px; border-radius: 18px;
  background: linear-gradient(180deg, var(--bg-light), #fff); border: 1px solid var(--border); }
.article-faqs > h2 { font-size: 1.45rem; color: var(--primary); margin: 0 0 6px;
  font-family: var(--font-heading, 'Outfit', sans-serif); }
.article-faqs .faq-container { max-width: none; margin: 14px 0 0; }
.article-faqs .faq-item { border-bottom: 1px solid var(--border); }
.article-faqs .faq-item:first-child { border-top: 0; }
.article-faqs .faq-item:last-child { border-bottom: 0; }
.article-faqs .faq-question { font-size: 1.03rem; padding: 18px 0; gap: 16px; align-items: flex-start;
  line-height: 1.5; color: var(--primary); }
.article-faqs .faq-icon { margin-left: 0; width: 22px; height: 22px; border-radius: 50%;
  background: rgba(0,180,216,.12); transition: background .3s ease, transform .3s ease; }
.article-faqs .faq-question:hover .faq-icon { background: rgba(0,180,216,.22); }
.article-faqs .faq-item.active .faq-icon { background: var(--accent); transform: rotate(180deg); }
.article-faqs .faq-icon::before, .article-faqs .faq-icon::after { background: var(--primary); }
.article-faqs .faq-icon::before { width: 11px; }
.article-faqs .faq-icon::after { height: 11px; }
.article-faqs .faq-item.active .faq-icon::before { background: #fff; }
.article-faqs .faq-answer-inner { padding: 0 40px 20px 0; font-size: .98rem; }

/* ---- Related blocks ----------------------------------------------------- */
.article-section .related-block { max-width: none; margin: 56px 0 0; }
.rel-head { display: flex; flex-direction: column; gap: 2px; margin-bottom: 20px; }
.rel-head h3 { font-size: 1.35rem; color: var(--primary); margin: 0;
  font-family: var(--font-heading, 'Outfit', sans-serif); }
.rel-head p { margin: 0; color: var(--text-secondary); font-size: .92rem; }
.rel-grid { display: grid; gap: 16px; }
/* auto-FIT, not auto-fill: with auto-fill the grid keeps an empty fourth track
   at this width and the cards huddle to the left of it. auto-fit collapses the
   empty track so three cards span the full column. */
.rel-grid-svc { grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); }
.rel-grid-post { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

/* Related services: a compact row card - icon, name, arrow. */
.rel-svc { display: flex; align-items: center; gap: 14px; padding: 16px 18px; background: #fff;
  border: 1px solid var(--border); border-radius: 14px; text-decoration: none; color: var(--primary);
  font-weight: 600; transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease; }
.rel-svc:hover { border-color: rgba(0,180,216,.45); box-shadow: 0 14px 30px rgba(16,38,73,.09); transform: translateY(-2px); }
.rel-svc-ico { flex: none; width: 38px; height: 38px; border-radius: 10px; display: grid; place-items: center;
  background: rgba(0,180,216,.10); color: var(--accent); transition: background .25s ease, color .25s ease; }
.rel-svc-ico svg { width: 20px; height: 20px; }
.rel-svc:hover .rel-svc-ico { background: var(--accent); color: #fff; }
.rel-svc-t { flex: 1 1 auto; font-size: .97rem; line-height: 1.35; }
.rel-svc-go { flex: none; color: var(--accent); display: grid; place-items: center; transition: transform .25s ease; }
.rel-svc-go svg { width: 17px; height: 17px; }
.rel-svc:hover .rel-svc-go { transform: translateX(4px); }

/* Related articles: a picture card, so the block reads as reading material. */
.rel-post { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--border);
  border-radius: 16px; overflow: hidden; text-decoration: none;
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease; }
.rel-post:hover { border-color: rgba(0,180,216,.45); box-shadow: 0 18px 38px rgba(16,38,73,.11); transform: translateY(-3px); }
/* Capped so a two-card row (each half the container) does not turn into two
   enormous photographs with a line of text underneath. */
.rel-post-img { display: block; aspect-ratio: 16 / 9; max-height: 210px; background: var(--bg-light); overflow: hidden; }
.rel-post-img img { width: 100%; height: 100%; object-fit: cover; display: block;
  transition: transform .5s cubic-bezier(.16,1,.3,1); }
.rel-post:hover .rel-post-img img { transform: scale(1.05); }
.rel-post-noimg { display: block; width: 100%; height: 100%;
  background: linear-gradient(135deg, var(--primary), var(--accent)); opacity: .16; }
.rel-post-body { display: flex; flex-direction: column; gap: 7px; padding: 16px 18px 18px; flex: 1 1 auto; }
.rel-post-cat { font-size: .66rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--accent); }
.rel-post-t { font-family: var(--font-heading, 'Outfit', sans-serif); font-size: 1.02rem; font-weight: 700;
  line-height: 1.35; color: var(--primary); }
.rel-post-sum { font-size: .87rem; color: var(--text-secondary); line-height: 1.55; }
.rel-post-go { margin-top: auto; padding-top: 10px; display: inline-flex; align-items: center; gap: 7px;
  font-size: .8rem; font-weight: 600; color: var(--text-secondary); }
.rel-post-go svg { width: 15px; height: 15px; color: var(--accent); transition: transform .25s ease; }
.rel-post:hover .rel-post-go svg { transform: translateX(4px); }

/* ---- Blog responsive ---------------------------------------------------- */
@media (max-width: 600px) {
  .mini-bento-grid { grid-template-columns: 1fr; }
  .article-cta { padding: 26px 20px; }
  .article-meta { font-size: .82rem; gap: 8px 12px; }
  .article-faqs { padding: 24px 20px 8px; border-radius: 14px; }
  .article-faqs .faq-question { font-size: .98rem; }
  .article-faqs .faq-answer-inner { padding-right: 0; }
  .rel-grid-svc, .rel-grid-post { grid-template-columns: 1fr; }
}
