/* ArkFlare Articles: design for article posts. Colours come from the variables; override them per site via the plugin settings. */
:root {
  --af-accent: #b14b5a;  /* buttons, eyebrows */
  --af-ink: #752a38;     /* links in boxes */
  --af-dark: #3d1f27;    /* titles, final CTA */
  --af-text: #5a3a3a;
  --af-muted: #6b5050;
  --af-soft: #fdf8f6;    /* box backgrounds */
  --af-soft-2: #f7f4f0;
  --af-card: #fffaf8;
  --af-line: #e8d5cf;
  --af-trim: #c89a8c;
  --af-radius: 0.8rem;
}

.af-article { font-size: 1.0625rem; line-height: 1.7; }
.af-article > .elementor-widget, .af-article .elementor-widget { min-width: 0; max-width: 100%; }  /* flex items must not grow past the column (wide tables) */
/* Spacing between components. Elementor sets its children's margins with stronger selectors, hence !important. */
.af-article .elementor-widget { margin-top: 0 !important; margin-bottom: 0 !important; }
.af-article .elementor-widget.af-text { margin-bottom: 1.25rem !important; }
.af-article .elementor-widget.af-text p:last-child, .af-article .elementor-widget.af-text ul:last-child, .af-article .elementor-widget.af-text ol:last-child { margin-bottom: 0; }
.af-article .elementor-widget.af-figure { margin-top: 1.75rem !important; margin-bottom: 1.75rem !important; }
.af-article .elementor-widget.af-heading + .elementor-widget.af-figure { margin-top: 0.75rem !important; }
.af-article .elementor-widget.af-block { margin-top: 0.5rem !important; margin-bottom: 0.5rem !important; }
.af-article p { margin: 0 0 1.1em; }
.af-text ul, .af-text ol, .af-faq__a ul, .af-faq__a ol { margin: 0 0 1.1em; padding-left: 1.4em; }
.af-text li { margin-bottom: 0.3em; }
.af-article .elementor-widget.af-heading, .af-article h2.af-heading, .af-article h3.af-heading { margin: 2.5rem 0 0.9rem !important; scroll-margin-top: 6rem; }
.af-article .af-heading .elementor-heading-title, .af-article h2.af-heading, .af-article h3.af-heading { margin: 0; line-height: 1.25; color: var(--af-dark); }
.af-article .af-text a, .af-article .af-answer a, .af-article .af-faq__a a { color: var(--af-accent); font-weight: 600; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.af-article .af-text a:hover { color: var(--af-ink); }
.af-article h2.af-eyebrow, .af-article h3.af-eyebrow { font-family: inherit; line-height: 1.4; }
.af-eyebrow { margin: 0 0 0.35rem !important; font-size: 0.75rem; font-weight: 700; letter-spacing: 0.09em; text-transform: uppercase; color: var(--af-accent); }

/* direct answer */
.af-answer { background: var(--af-soft); border-left: 4px solid var(--af-accent); border-radius: 0 var(--af-radius) var(--af-radius) 0; padding: 1.1rem 1.3rem; margin: 0 0 1.6rem; font-size: 1.08rem; }
.af-answer p:last-child { margin-bottom: 0; }

/* images */
.af-figure { margin: 1.75rem 0; }
.af-figure img { margin: 0 !important; }
.af-figure img, .af-img { display: block; width: 100%; height: auto; border-radius: var(--af-radius); aspect-ratio: 3 / 2; object-fit: cover; }
.af-figure figcaption, .af-figure .widget-image-caption { margin-top: 0.5rem; font-size: 0.85rem; color: var(--af-muted); text-align: center; }

/* buttons */
.af-btn { display: inline-flex; align-items: center; gap: 0.35rem; background: var(--af-accent); color: #fff !important; text-decoration: none !important; font-weight: 700; font-size: 0.92rem; padding: 0.7rem 1.4rem; border-radius: 2rem; letter-spacing: 0.02em; transition: transform .2s ease, box-shadow .2s ease, background .2s ease; }
.af-btn:hover, .af-btn:focus-visible { background: var(--af-ink); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(61, 31, 39, .18); }
.af-btn span { transition: transform .2s ease; }
.af-btn:hover span { transform: translateX(3px); }

/* CTA bar (top) */
.af-cta-bar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem 1.2rem; background: var(--af-soft); border: 1px solid var(--af-line); border-left: 4px solid var(--af-trim); border-radius: 0.5rem; padding: 1rem 1.3rem; margin: 0 0 1.6rem; }
.af-cta-bar__text { margin: 0 !important; font-weight: 700; color: var(--af-dark); line-height: 1.35; }

/* CTA card (mid) */
.af-cta-card { background: linear-gradient(135deg, #fcf5f2 0%, #fdf0ee 100%); border: 1px solid var(--af-line); border-left: 4px solid var(--af-accent); border-radius: var(--af-radius); padding: 1.5rem 1.75rem; margin: 2rem 0; }
.af-cta-card__title { margin: 0 0 0.6rem !important; font-size: 1.15rem; font-weight: 700; color: var(--af-dark); line-height: 1.35; }
.af-cta-card p:not(.af-eyebrow):not(.af-cta-card__title) { color: var(--af-text); font-size: 0.97rem; }

/* final CTA */
.af-cta-final { background: linear-gradient(135deg, var(--af-dark) 0%, #5d2d38 100%); border-radius: var(--af-radius); padding: 1.8rem 1.75rem; margin: 2rem 0; text-align: center; }
.af-cta-final .af-eyebrow { color: #f0c8c0; }
.af-cta-final__text { margin: 0 0 1.1rem !important; color: #fff; font-size: 1.2rem; font-weight: 700; line-height: 1.35; }

/* tables: scroll sideways on phones instead of squashing */
.af-table-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.6rem 0; border: 1px solid var(--af-line); border-radius: var(--af-radius); }
.af-table { width: 100%; min-width: 30rem; border-collapse: collapse; margin: 0 !important; border: 0 !important; font-size: 0.95rem; }
.af-table caption { caption-side: top; text-align: left; padding: 0.8rem 1rem; font-weight: 700; color: var(--af-dark); background: var(--af-soft); }
.af-table th, .af-table td { padding: 0.7rem 1rem; border: 0 !important; border-top: 1px solid var(--af-line) !important; text-align: left; vertical-align: top; }
.af-table th { background: var(--af-soft); color: var(--af-dark); font-weight: 700; }
.af-table tbody tr:nth-child(even) td { background: var(--af-card); }

/* FAQ */
.af-faq { margin: 0 0 2rem; border-top: 1px solid var(--af-line); }
.af-faq__item { border-bottom: 1px solid var(--af-line); }
.af-faq__item summary { cursor: pointer; list-style: none; position: relative; padding: 1rem 2.2rem 1rem 0; font-weight: 700; color: var(--af-dark); }
.af-faq__item summary::-webkit-details-marker { display: none; }
.af-article .af-faq__q { display: inline; margin: 0 !important; font-family: inherit; font-size: 1rem; font-weight: 700; line-height: 1.45; color: var(--af-dark); text-transform: none; letter-spacing: 0; }
.af-faq__item summary::after { content: "+"; position: absolute; right: 0.3rem; top: 50%; transform: translateY(-50%); font-size: 1.4rem; color: var(--af-accent); transition: transform .2s ease; }
.af-faq__item[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.af-faq__a { padding: 0 0 1rem; color: var(--af-text); }

/* sources */
.af-sources { background: var(--af-soft-2); border-left: 3px solid var(--af-trim); border-radius: 0 0.6rem 0.6rem 0; padding: 1rem 1.3rem; margin: 1.8rem 0; }
.af-sources .af-eyebrow { color: var(--af-ink); }
.af-sources ul { list-style: none; margin: 0 !important; padding: 0; }
.af-sources li { display: flex; gap: 0.75rem; align-items: baseline; padding: 0.6rem 0; border-bottom: 1px solid #e8e0d8; }
.af-sources li:last-child { border-bottom: 0; }
.af-sources__icon { color: var(--af-accent); flex-shrink: 0; }
.af-sources a { font-weight: 700; }
.af-sources__note { color: var(--af-muted); font-size: 0.9rem; }

/* related: two boxes, stacked on phones */
.af-related { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 1rem; margin: 2.5rem 0 1.5rem; padding-top: 1.5rem; border-top: 2px solid #f0ddd9; }
.af-box { background: var(--af-card); border: 1px solid var(--af-line); border-radius: var(--af-radius); padding: 1.3rem 1.5rem; }
.af-box ul { list-style: none; margin: 0 !important; padding: 0; }
.af-box li { border-bottom: 1px solid #f0e8e5; }
.af-box li:last-child { border-bottom: 0; }
.af-box a { display: flex; gap: 0.5rem; align-items: baseline; padding: 0.5rem 0; color: var(--af-ink); font-weight: 600; text-decoration: none; font-size: 0.97rem; }
.af-box a:hover { text-decoration: underline; }
.af-box a span { color: var(--af-accent); font-size: 0.75rem; }

/* author */
.af-author { display: flex; gap: 1rem; align-items: flex-start; background: var(--af-soft); border: 1px solid var(--af-line); border-radius: var(--af-radius); padding: 1.2rem 1.4rem; margin: 2rem 0 0; }
.af-author__img { border-radius: 50%; flex-shrink: 0; }
.af-author__name { margin: 0 0 0.3rem !important; font-weight: 700; color: var(--af-dark); }
.af-author__bio { margin: 0 !important; font-size: 0.95rem; color: var(--af-text); }

/* gentle reveal when CTAs scroll into view (only with JS, and never for reduced motion) */
.af-js .af-reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.af-js .af-reveal.is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .af-js .af-reveal { opacity: 1; transform: none; transition: none; } .af-btn, .af-btn span { transition: none; } }

@media (max-width: 600px) {
  .af-article { font-size: 1.03rem; }
  .af-article .elementor-widget.af-heading { margin-top: 2.1rem !important; }
  .af-article .elementor-widget.af-figure { margin-top: 1.5rem !important; margin-bottom: 1.5rem !important; }
  .af-article .elementor-widget.af-heading + .elementor-widget.af-figure { margin-top: 0.75rem !important; }
  .af-answer, .af-cta-bar { margin-bottom: 1.25rem; }
  .af-cta-bar { flex-direction: column; align-items: flex-start; }
  .af-cta-card, .af-cta-final { padding: 1.25rem 1.2rem; }
  .af-cta-final .af-btn, .af-cta-card .af-btn, .af-cta-bar .af-btn { width: 100%; justify-content: center; }
}
