/* Key takeaway + FAQ blocks added to Commershial articles (Authentic theme), plus small fixes for
   the video features. Colours follow the theme: black and white; dark scheme (#232323 page) via
   [data-scheme="dark"]. The theme's own look (header, fonts, labels, buttons) is left as on the live site. */

/* Key takeaway: an outlined box in red, with a red "Key takeaway" tag sitting on its top border.
   Dark scheme: a slightly brighter red. */
.entry-content > .cxo-aeo-summary {
  position: relative;
  margin: 2.5rem 0 2.25rem;
  padding: 2rem 2rem 1.6rem;
  background: transparent;
  border: 2px solid #cc0100; /* the site's red, as in the header, labels and buttons */
  border-radius: 0;
}
[data-scheme="dark"] .entry-content > .cxo-aeo-summary { border-color: #e5322d; }
.cxo-aeo-summary .cxo-aeo-label {
  position: absolute;
  top: 0;
  left: 1.5rem;
  transform: translateY(-50%);
  margin: 0;
  padding: .25rem .6rem;
  background: #cc0100;
  color: #fff;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.4;
  text-transform: uppercase;
}
.entry-content > .cxo-aeo-summary .cxo-aeo-text {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.7;
  color: #111;
}
[data-scheme="dark"] .entry-content > .cxo-aeo-summary .cxo-aeo-text { color: #fff; }
@media (max-width: 599px) {
  .entry-content > .cxo-aeo-summary { padding: 1.75rem 1.25rem 1.35rem; }
  .cxo-aeo-summary .cxo-aeo-label { left: 1rem; }
}

.entry-content > .cxo-aeo-faq {
  margin: 3rem 0 0;
  padding-top: 1.5rem;
  border-top: 1px solid var(--tp-line-strong);
}
/* the title keeps the theme's own article h2 style; only spacing is set */
.entry-content > .cxo-aeo-faq .cxo-aeo-faq-title { margin: 0 0 1.25rem; }
.cxo-aeo-faq .cxo-aeo-item {
  margin: 0;
  border-bottom: 1px solid var(--tp-line);
}
.cxo-aeo-faq .cxo-aeo-item:first-of-type {
  border-top: 1px solid var(--tp-line);
}
.cxo-aeo-faq summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 0;
  cursor: pointer;
  list-style: none;
}
.cxo-aeo-faq summary::-webkit-details-marker { display: none; }
.cxo-aeo-faq summary:focus-visible {
  outline: 2px solid var(--tp-brand);
  outline-offset: 4px;
  border-radius: 2px;
}
.entry-content > .cxo-aeo-faq .cxo-aeo-q {
  margin: 0;
  font-family: inherit;
  font-size: 1.0625rem;
  font-weight: 600;
  line-height: 1.4;
}
.cxo-aeo-faq .cxo-aeo-icon {
  position: relative;
  flex: none;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--tp-line-strong);
  transition: background-color .2s, border-color .2s;
}
.cxo-aeo-faq .cxo-aeo-icon::before,
.cxo-aeo-faq .cxo-aeo-icon::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  width: .75rem;
  height: 1.5px;
  background: var(--tp-brand);
  transform: translate(-50%, -50%);
  transition: transform .2s, background-color .2s;
}
.cxo-aeo-faq .cxo-aeo-icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.cxo-aeo-faq details[open] .cxo-aeo-icon {
  background: var(--tp-brand);
  border-color: var(--tp-brand);
}
.cxo-aeo-faq details[open] .cxo-aeo-icon::before,
.cxo-aeo-faq details[open] .cxo-aeo-icon::after { background: var(--tp-brand-contrast); }
.cxo-aeo-faq details[open] .cxo-aeo-icon::after { transform: translate(-50%, -50%) rotate(0deg); }
.cxo-aeo-faq summary:hover .cxo-aeo-icon { border-color: var(--tp-brand); }
.entry-content > .cxo-aeo-faq .cxo-aeo-a p {
  margin: 0 0 1.25rem;
  padding-right: 3rem;
  line-height: 1.65;
  color: var(--tp-muted);
}

@media (max-width: 599px) {
  .entry-content > .cxo-aeo-faq .cxo-aeo-a p { padding-right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .cxo-aeo-faq .cxo-aeo-icon,
  .cxo-aeo-faq .cxo-aeo-icon::before,
  .cxo-aeo-faq .cxo-aeo-icon::after { transition: none; }
}

/* links to a section (#heading) land below the sticky menu bar */
.entry-content h2[id], .entry-content h3[id] { scroll-margin-top: 100px; }

/* the theme's muted background clips fade out while they jump back to their start (theme scripts.js) */
.cs-video-wrapper iframe { transition: opacity .25s; }
.cs-video-wrapper.cxo-hold iframe { opacity: 0; }

/* The theme's background clips (article hero, home page and archive cards) play muted on a loop, so
   their sound and pause buttons are hidden; the "Watch" icon stays and opens the video popup. */
.cs-video-controls .cs-player-volume,
.cs-video-controls .cs-player-state { display: none !important; }

/* FAQ accents (+/− buttons, focus ring) in black; white on the dark scheme */
.cxo-aeo-faq { --tp-brand: #000; --tp-brand-contrast: #fff; --tp-line: #eee; --tp-line-strong: #c9c9c9; --tp-muted: #777; }
[data-scheme="dark"] .cxo-aeo-faq { --tp-brand: #fff; --tp-brand-contrast: #232323; --tp-line: #2b2b2b; --tp-line-strong: #444; --tp-muted: #ccc; }
[data-scheme="dark"] .cxo-aeo-summary .cxo-aeo-label { background: #e5322d; color: #fff; }
.entry-content > .cxo-aeo-faq { border-top: 2px solid #111; }
[data-scheme="dark"] .entry-content > .cxo-aeo-faq { border-top-color: #fff; }

/* Muted background clips: the photo stays underneath and the clip fades in only once it is playing
   (site/assets/clip-quiet.js), so YouTube's own play/pause symbol is never seen. */
.parallax-video [id^="jarallax-container"] > img { display: block !important; }
.parallax-video [id^="jarallax-container"] > iframe { opacity: 0; transition: none; z-index: 0 !important; }
.parallax-video [id^="jarallax-container"] > iframe.gr-playing { opacity: 1; transition: opacity .45s ease; }

/* the video popup in the theme's black and white */
.cxo-pop .cxo-pop-box { background: #0b0b0b; border-radius: 0; }
.cxo-pop .cxo-pop-title { font-weight: 600; }
.cxo-pop .cxo-pop-read { display: block !important; width: 100%; align-self: stretch !important; text-align: center; box-sizing: border-box; background: #fff !important; color: #111 !important; border-radius: 0 !important; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: .78rem; }
.cxo-pop .cxo-pop-read:hover, .cxo-pop .cxo-pop-read:focus-visible { background: #ddd !important; }

/* Article body text: a darker grey than the theme's #a0a0a0, for readability (dark scheme: a light
   grey on the #232323 page). Headings, links, the Key takeaway and the FAQ keep their own colours. */
.entry-content, .entry-content p, .entry-content li, .entry-content blockquote, .entry-content figcaption { color: #777 !important; }
[data-scheme="dark"] .entry-content, [data-scheme="dark"] .entry-content p, [data-scheme="dark"] .entry-content li,
[data-scheme="dark"] .entry-content blockquote, [data-scheme="dark"] .entry-content figcaption { color: #b5b5b5 !important; }
.entry-content > .cxo-aeo-summary .cxo-aeo-text { color: #111 !important; }
[data-scheme="dark"] .entry-content > .cxo-aeo-summary .cxo-aeo-text { color: #fff !important; }
/* the Key takeaway label is a paragraph too: keep it white on its red tag, over the body text grey above */
.entry-content .cxo-aeo-summary .cxo-aeo-label { color: #fff !important; }
