/* Sugar Defender — shared components for research/evidence, FAQ, comparison and trust content.
   Layered on top of the existing Mobirise/Bootstrap theme; uses the site's existing palette
   (dark teal #081c23, red #ae2d30, gold #efb902). */

.ak-section {
  padding: 3.5rem 0;
  background: #ffffff;
}
.ak-container {
  max-width: 960px;
  margin: 0 auto;
  padding: 0 1.25rem;
}
.ak-container-wide {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Default (light) section text colors — every heading/paragraph/link inside
   a plain .ak-section gets an explicit color so it never inherits the
   Mobirise theme's own (unpredictable, per-component) defaults. */
.ak-section h1, .ak-section h2, .ak-section h3, .ak-section h4 {
  color: #0d2830;
}
.ak-section p, .ak-section li, .ak-section td, .ak-section th {
  color: #3c4b49;
}
.ak-section a:not(.btn) {
  color: #a8231f;
  font-weight: 600;
}
.ak-section a:not(.btn):hover, .ak-section a:not(.btn):focus-visible {
  text-decoration: underline;
}

/* Dark section variant — use class="ak-section ak-section-dark" for a
   full-width dark band. Never use an inline dark background without this
   class: it carries the matching light text colors that make the band
   readable. */
.ak-section-dark {
  background: #0a1f27;
}
.ak-section-dark h1, .ak-section-dark h2, .ak-section-dark h3, .ak-section-dark h4 {
  color: #ffffff;
}
.ak-section-dark p, .ak-section-dark li, .ak-section-dark td, .ak-section-dark th {
  color: #cfd9d8;
}
.ak-section-dark a:not(.btn) {
  color: #efb902;
}
.ak-section-dark .ak-lede {
  color: #b7c4c3;
}
.ak-section-dark .ak-card { background: #123039; border-color: #1c4552; }

/* Breadcrumbs — sits directly on the page background (usually white) */
.ak-breadcrumb {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  padding: 1rem 1.25rem 0.5rem;
  margin: 0 auto;
  max-width: 1140px;
  font-size: 0.85rem;
  color: #5c6f6e;
}
.ak-breadcrumb li:not(:last-child)::after {
  content: "/";
  margin-left: 0.4rem;
  color: #b8c2c0;
}
.ak-breadcrumb a {
  color: #a8231f;
  text-decoration: none;
  font-weight: 600;
}
.ak-breadcrumb a:hover,
.ak-breadcrumb a:focus-visible {
  text-decoration: underline;
}
.ak-breadcrumb li[aria-current="page"] {
  color: #0d2830;
  font-weight: 600;
}

/* Headings / eyebrow — gold reads fine on dark; on light sections it needs
   to be a darker amber to stay legible (AA contrast on white). */
.ak-eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9a7300;
  font-weight: 700;
  margin-bottom: 0.5rem;
}
.ak-section-dark .ak-eyebrow {
  color: #efb902;
}
.ak-lede {
  font-size: 1.15rem;
  color: #55645f;
  max-width: 68ch;
  line-height: 1.6;
}

/* Answer block (AEO) */
.ak-answer {
  background: #0d2830;
  border-left: 4px solid #efb902;
  border-radius: 0.4rem;
  padding: 1.1rem 1.4rem;
  margin: 1.25rem 0 1.75rem;
  color: #e7edec;
}
.ak-answer strong.q {
  display: block;
  color: #fff;
  margin-bottom: 0.35rem;
  font-size: 1.02rem;
}

/* Evidence strength badges */
.ak-badge {
  display: inline-block;
  padding: 0.2rem 0.65rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ak-badge-strong { background: #1e5c3a; color: #b6f2cd; }
.ak-badge-moderate { background: #1c4a5c; color: #b6e4f2; }
.ak-badge-limited { background: #5c4a1c; color: #f2dcb6; }
.ak-badge-preliminary { background: #5c3a1c; color: #f2c9a0; }
.ak-badge-animal { background: #3a3a3a; color: #d8d8d8; }
.ak-badge-mixed { background: #5c1c1c; color: #f2b6b6; }
.ak-badge-none { background: #3a1c1c; color: #f2b6b6; }

/* Evidence / comparison tables */
.ak-table-wrap {
  overflow-x: auto;
  margin: 1.5rem 0;
  border-radius: 0.5rem;
  border: 1px solid #163943;
}
table.ak-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 640px;
  background: #0a222a;
  color: #dbe6e5;
  font-size: 0.94rem;
}
table.ak-table caption {
  caption-side: top;
  text-align: left;
  padding: 0.75rem 1rem;
  color: #efb902;
  font-weight: 700;
}
table.ak-table th,
table.ak-table td {
  padding: 0.85rem 1rem;
  text-align: left;
  border-bottom: 1px solid #163943;
  vertical-align: top;
  color: #dbe6e5;
}
table.ak-table thead th {
  background: #0d2830;
  color: #fff;
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
table.ak-table tbody tr:last-child td {
  border-bottom: none;
}

/* Source / reference list */
.ak-sources {
  list-style: none;
  padding: 0;
  margin: 1rem 0;
}
.ak-sources li {
  padding: 0.9rem 0;
  border-bottom: 1px solid #163943;
}
.ak-sources li:last-child { border-bottom: none; }
.ak-source-meta {
  display: block;
  font-size: 0.82rem;
  color: #93a3a2;
  margin-top: 0.2rem;
}
.ak-sources a {
  color: #efb902;
  font-weight: 600;
  text-decoration: none;
}
.ak-sources a:hover,
.ak-sources a:focus-visible {
  text-decoration: underline;
}

/* Callouts */
.ak-callout {
  border-radius: 0.5rem;
  padding: 1.1rem 1.4rem;
  margin: 1.5rem 0;
  border: 1px solid;
}
.ak-callout-safety {
  background: #2a1414;
  border-color: #5c1c1c;
  color: #f5d9d9;
}
.ak-callout-note {
  background: #0d2830;
  border-color: #163943;
  color: #dbe6e5;
}
.ak-callout h4, .ak-callout strong.title {
  color: #fff;
  display: block;
  margin-bottom: 0.4rem;
}
/* Explicit overrides so a callout's own colors always win over the
   ambient .ak-section / .ak-section-dark text-color rules, regardless
   of which kind of section the callout is placed inside. */
.ak-callout-safety p, .ak-callout-safety li { color: #f5d9d9; }
.ak-callout-note p, .ak-callout-note li { color: #dbe6e5; }
.ak-answer p, .ak-answer li { color: inherit; }

/* Native FAQ accordion */
.ak-faq details {
  background: #0d2830;
  border: 1px solid #163943;
  border-radius: 0.5rem;
  padding: 0.9rem 1.2rem;
  margin-bottom: 0.75rem;
}
.ak-faq summary {
  cursor: pointer;
  font-weight: 700;
  color: #fff;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.ak-faq summary::-webkit-details-marker { display: none; }
.ak-faq summary::after {
  content: "+";
  font-size: 1.4rem;
  color: #efb902;
  flex-shrink: 0;
}
.ak-faq details[open] summary::after { content: "\2212"; }
.ak-faq summary:focus-visible {
  outline: 2px solid #efb902;
  outline-offset: 3px;
}
.ak-faq p {
  color: #cfd9d8;
  margin: 0.75rem 0 0;
}

/* Pros/cons already handled by theme's features032; comparison cards */
.ak-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}
@media (max-width: 767px) {
  .ak-grid-2 { grid-template-columns: 1fr; }
}
.ak-grid-4 {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}
@media (max-width: 900px) {
  .ak-grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 480px) {
  .ak-grid-4 { grid-template-columns: 1fr; }
}
.ak-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 900px) {
  .ak-grid-3 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .ak-grid-3 { grid-template-columns: 1fr; }
}
.ak-card {
  background: #0d2830;
  border: 1px solid #163943;
  border-radius: 0.6rem;
  padding: 1.4rem;
}
.ak-card h3 { color: #fff; margin-top: 0; }
.ak-card p, .ak-card li { color: #cfd9d8; }
.ak-card a:not(.btn) { color: #efb902; }

/* Evidence step chain (identify -> locate -> verify -> classify) */
.ak-steps {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin: 1.25rem 0;
  padding: 0;
  list-style: none;
}
.ak-steps li {
  background: #0d2830;
  border: 1px solid #163943;
  border-radius: 999px;
  padding: 0.45rem 1rem;
  font-size: 0.85rem;
  color: #cfd9d8;
}

/* Focus visibility across new components */
a:focus-visible, button:focus-visible {
  outline: 2px solid #efb902;
  outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
