/*
 * search-engine-optimisation.css
 *
 * Page-level styles for the SEO/GEO services page.
 * Loaded after site.css. Contains ONLY the styles that belong to this page's
 * three custom interactions plus their supporting chrome. Global tokens
 * (--sage, --ink, --cyan, --ease, .glass, .rv, etc.) come from site.css.
 *
 * Sections covered:
 *   1. Two-surfaces toggle  (#seg, .panel, .panel.show, .stage, SERP + AI mocks)
 *   2. FAQ accordion        (#faq, .faq__item, .faq__q, .faq__a)
 *   3. Testimonial carousel (.vcar, .car-track, .car-card, .car-play, .car-dot, etc.)
 */

/* =============================================================================
   SHARED LOCAL TOKENS
   (values used only on this page; keep them out of site.css)
============================================================================= */
:root {
  --serp-link:      #8ab4f8;
  --tile-ar:        16 / 9;   /* switch to 9/16 for portrait testimonial clips */
  --glass-fill:     rgba(255,255,255,0.065);
  --glass-fill-strong: rgba(255,255,255,0.10);
  --glass-border:   rgba(255,255,255,0.14);
  --glass-shadow:   0 24px 48px rgba(0,0,0,0.38);
  --text-dim:       rgba(255,255,255,0.62);
  --text-faint:     rgba(255,255,255,0.40);
}

/* =============================================================================
   1. TWO-SURFACES TOGGLE
============================================================================= */

/* The segmented control pill */
.seg {
  display: inline-flex;
  background: rgba(255,255,255,.055);
  border: 1px solid var(--glass-border);
  border-radius: 999px;
  padding: 5px;
  gap: 4px;
  margin-top: 30px;
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}

.seg button {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font: inherit;
  font-weight: 600;
  font-size: 14px;
  padding: 12px 22px;
  border-radius: 999px;
  cursor: pointer;
  transition: .3s var(--ease);
  display: flex;
  align-items: center;
  gap: 9px;
  white-space: nowrap;
}

.seg button .lbl-sub {
  font-size: 11px;
  font-weight: 500;
  opacity: .7;
}

.seg button[aria-pressed="true"] {
  background: var(--cyan);
  color: var(--ink);
}

.seg button[aria-pressed="true"] .lbl-sub {
  opacity: .85;
}

/* Stage wrapper and panel animation */
.stage {
  margin-top: 26px;
  position: relative;
}

.panel {
  display: none;
}

.panel.show {
  display: block;
  animation: seo-fade .5s var(--ease);
}

@keyframes seo-fade {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: none; }
}

/* Panel two-column grid */
.panel__grid {
  display: grid;
  grid-template-columns: 1.35fr .85fr;
  gap: 24px;
  align-items: stretch;
}

/* Mock browser chrome (dots + URL bar label) */
.mock {
  padding: 26px 28px;
}

.mock__chrome {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: -4px 0 18px;
}

.mock__chrome i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: rgba(255,255,255,.18);
  display: block;
}

.mock__chrome span {
  margin-left: 8px;
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

/* SERP result mock */
.serp__url   { font-size: 13px; color: var(--text-dim); }
.serp__url b { color: rgba(255,255,255,.82); font-weight: 500; }

.serp__title {
  color: var(--serp-link);
  font-size: 21px;
  font-weight: 500;
  line-height: 1.25;
  margin: 8px 0 7px;
  letter-spacing: -.01em;
}

.serp__desc {
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.55;
}

.serp__rich {
  margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  padding-top: 6px;
}

.paa {
  padding: 13px 2px;
  border-bottom: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 14px;
  color: rgba(255,255,255,.78);
}

.paa svg {
  width: 16px;
  height: 16px;
  color: var(--text-faint);
  flex: 0 0 auto;
}

.serp__pos {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-top: 18px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan);
  background: rgba(102,252,241,.1);
  border: 1px solid rgba(102,252,241,.25);
  padding: 6px 12px;
  border-radius: 999px;
}

/* AI answer mock */
.ai__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--white);
  background: rgba(255,255,255,.06);
  border: 1px solid var(--glass-border);
  padding: 6px 12px;
  border-radius: 999px;
}

.ai__badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--cyan);
  box-shadow: 0 0 8px rgba(102,252,241,.7);
  display: block;
}

.ai__body {
  font-size: 15.5px;
  line-height: 1.65;
  color: rgba(255,255,255,.9);
  margin-top: 16px;
}

.ai__body mark {
  background: rgba(102,252,241,.16);
  color: #dffefb;
  padding: 1px 3px;
  border-radius: 4px;
  box-shadow: inset 0 -1px 0 rgba(102,252,241,.4);
}

.cite-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--cyan);
  border: 1px solid rgba(102,252,241,.3);
  border-radius: 6px;
  padding: 1px 7px;
  margin: 0 2px;
  vertical-align: baseline;
  text-decoration: none;
}

.cite-chip svg { width: 11px; height: 11px; }

.ai__src {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 12px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

/* Wins column */
.wins {
  padding: 24px 24px 26px;
  display: flex;
  flex-direction: column;
}

.wins h4 {
  font-size: 11.5px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-bottom: 16px;
}

.wins ul {
  list-style: none;
  display: grid;
  gap: 13px;
}

.wins li {
  display: flex;
  gap: 11px;
  font-size: 14px;
  color: var(--text-dim);
  line-height: 1.4;
}

.wins li svg {
  width: 16px;
  height: 16px;
  color: var(--cyan);
  flex: 0 0 auto;
  margin-top: 1px;
}

.stage__foot {
  margin-top: 22px;
  font-weight: 300;
  font-size: 15px;
  color: var(--text-dim);
  text-align: center;
}

.stage__foot b {
  color: var(--white);
  font-weight: 600;
}

/* Mobile: stack the grid */
@media (max-width: 860px) {
  .panel__grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .seg { width: 100%; }
  .seg button { flex: 1; justify-content: center; }
}

/* =============================================================================
   2. FAQ ACCORDION
   Binds only to #faq — will not collide with .hm-acc__* theme accordion.
============================================================================= */

.faq {
  margin-top: 30px;
  max-width: 860px;
}

.faq__item {
  border-bottom: 1px solid rgba(255,255,255,.10);
}

.faq__q {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  color: var(--white);
  font: inherit;
  font-weight: 600;
  font-size: clamp(16px, 2vw, 19px);
  padding: 22px 0;
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  letter-spacing: -.01em;
}

.faq__q svg {
  width: 20px;
  height: 20px;
  color: var(--cyan);
  flex: 0 0 auto;
  transition: transform .35s var(--ease);
}

/* Rotate the icon when open */
.faq__q[aria-expanded="true"] svg {
  transform: rotate(45deg);
}

/* Collapsed answer: max-height drives the open/close animation */
.faq__a {
  max-height: 0;
  overflow: hidden;
  transition: max-height .4s var(--ease);
}

.faq__a p {
  font-weight: 300;
  font-size: 15px;
  color: var(--text-dim);
  line-height: 1.6;
  padding-bottom: 24px;
  max-width: 72ch;
}

/* =============================================================================
   3. TESTIMONIAL CAROUSEL
============================================================================= */

.vcar {
  margin-top: 18px;
}

.vcar__head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  margin-bottom: 20px;
}

.vcar__head .eyebrow {
  display: block;
  margin-bottom: 8px;
}

.vcar__head h3 {
  font-weight: 700;
  font-size: clamp(22px, 3vw, 32px);
  letter-spacing: -.02em;
}

/* Prev / next arrow buttons */
.car-nav {
  display: flex;
  gap: 10px;
}

.car-btn {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 1px solid var(--glass-border);
  background: rgba(255,255,255,.05);
  color: var(--white);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: .3s var(--ease);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}

.car-btn:hover {
  border-color: var(--cyan);
  color: var(--cyan);
  transform: translateY(-2px);
}

.car-btn svg { width: 18px; height: 18px; }

/* Clip overflow so cards outside the viewport are hidden */
.car-viewport {
  overflow: hidden;
  margin: 0 -28px;
  padding: 14px 28px 28px;
  position: relative;
}

/* The scrollable flex row */
.car-track {
  display: flex;
  gap: 26px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -ms-overflow-style: none;
  padding: 14px 0;
  cursor: grab;
}

.car-track::-webkit-scrollbar { display: none; }

.car-track.dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}

/* Individual card */
.car-card {
  flex: 0 0 clamp(260px, 46vw, 460px);
  scroll-snap-align: center;
  border-radius: 24px;
  transition: transform .55s var(--ease), box-shadow .55s var(--ease), opacity .55s var(--ease);
  opacity: .55;
  transform: scale(.92);
  will-change: transform;
}

.car-card.is-active {
  opacity: 1;
  transform: scale(1);
}

.car-card__frame {
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid var(--glass-border);
  transition: box-shadow .55s var(--ease);
}

.car-card.is-active .car-card__frame {
  box-shadow: 0 0 0 1.5px var(--cyan), var(--glass-shadow);
}

/* Media area (thumbnail / iframe) */
.car-card__media {
  position: relative;
  aspect-ratio: var(--tile-ar);
  border-radius: 20px 20px 0 0;
  overflow: hidden;
  background: #03100f;
}

.car-card__media video,
.car-card__media iframe,
.car-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border: 0;
}

/* Poster image — sits above the background, fades when playing */
.car-card__poster {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
  background: #03100f;
  transition: opacity .4s var(--ease);
}

/* Lazy-mounted YouTube iframe */
.car-card__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 3;
}

/* When playing: hide poster and play button */
.car-card.playing .car-card__poster { opacity: 0; }

/* Placeholder shown when there is no poster or video */
.ph {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #0a423f 0%, #06302e 60%, #0a2330 100%);
}

.ph::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: .5;
  background-image:
    linear-gradient(rgba(255,255,255,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.05) 1px, transparent 1px);
  background-size: 26px 26px;
}

.ph__label {
  position: relative;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: .02em;
  color: rgba(255,255,255,.85);
  text-align: center;
  padding: 0 16px;
}

.ph__sub {
  display: block;
  font-weight: 400;
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-faint);
  margin-top: 8px;
}

/* Label chip (e.g. "FEATURED") */
.chip {
  position: absolute;
  top: 12px;
  left: 12px;
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink);
  background: var(--cyan);
  padding: 4px 9px;
  border-radius: 6px;
  z-index: 4;
}

/* Play button overlay */
.car-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  border: 1px solid var(--glass-border);
  display: grid;
  place-items: center;
  cursor: pointer;
  color: #fff;
  z-index: 4;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: .3s var(--ease);
}

.car-play:hover {
  border-color: var(--cyan);
  box-shadow: 0 0 26px rgba(102,252,241,.42);
  transform: translate(-50%, -50%) scale(1.06);
}

.car-play svg {
  width: 22px;
  height: 22px;
  margin-left: 3px;
}

.car-card.playing .car-play {
  opacity: 0;
  pointer-events: none;
}

/* Card metadata strip */
.car-card__body {
  padding: 20px 22px 24px;
  background: var(--glass-fill);
  -webkit-backdrop-filter: blur(20px) saturate(140%);
  backdrop-filter: blur(20px) saturate(140%);
  border-top: 1px solid rgba(255,255,255,.07);
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.car-card__name {
  font-weight: 600;
  font-size: 18px;
  letter-spacing: -.01em;
}

.car-card__role {
  font-weight: 400;
  font-size: 12.5px;
  color: var(--text-faint);
  margin-top: 3px;
}

.car-card__idx {
  font-weight: 600;
  font-size: 13px;
  color: var(--text-faint);
  padding-top: 3px;
}

/* Dot indicators */
.car-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
  margin-top: 8px;
}

.car-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.22);
  transition: .3s var(--ease);
  border: none;
  padding: 0;
  cursor: pointer;
}

.car-dot.on {
  background: var(--cyan);
  width: 22px;
  border-radius: 4px;
}

/*
 * Host-theme hardening.
 * A parent WordPress/Elementor theme may apply green fills or padding to bare
 * <button> elements. The !important rules below keep the carousel controls
 * looking correct regardless of what the host theme does.
 */
.car-nav .car-btn {
  width: 48px !important;
  height: 48px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.05) !important;
  border: 1px solid var(--glass-border) !important;
  color: #fff !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  line-height: 1 !important;
  text-transform: none !important;
  font: inherit !important;
  display: grid !important;
  place-items: center !important;
}

.car-nav .car-btn:hover {
  border-color: var(--cyan) !important;
  color: #fff !important;
  background: rgba(255,255,255,.08) !important;
}

.car-nav .car-btn svg {
  width: 18px !important;
  height: 18px !important;
  display: block !important;
  margin: 0 !important;
  color: #fff !important;
  stroke: #fff !important;
}

.car-card__media .car-play {
  width: 64px !important;
  height: 64px !important;
  min-width: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.12) !important;
  border: 1px solid var(--glass-border) !important;
  color: #fff !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
  display: grid !important;
  place-items: center !important;
}

.car-card__media .car-play:hover {
  border-color: var(--cyan) !important;
  color: #fff !important;
}

.car-card__media .car-play svg {
  width: 22px !important;
  height: 22px !important;
  display: block !important;
  margin-left: 3px !important;
  color: #fff !important;
  fill: #fff !important;
}

.car-dots .car-dot {
  width: 7px !important;
  height: 7px !important;
  min-width: 0 !important;
  min-height: 0 !important;
  padding: 0 !important;
  border-radius: 50% !important;
  background: rgba(255,255,255,.22) !important;
  border: 0 !important;
  box-shadow: none !important;
  -webkit-appearance: none !important;
  appearance: none !important;
}

.car-dots .car-dot.on {
  background: var(--cyan) !important;
  width: 22px !important;
  border-radius: 4px !important;
}

/* Mobile adjustments */
@media (max-width: 860px) {
  .car-viewport { margin: 0 -20px; padding: 14px 20px 24px; }
}

@media (max-width: 560px) {
  .car-card { flex-basis: 80vw; }
}

/* =============================================================================
   REDUCED MOTION
   Collapses all animations and transitions on this page. The global rule in
   site.css covers .rv; this catches everything page-specific.
============================================================================= */
@media (prefers-reduced-motion: reduce) {
  .panel.show        { animation: none !important; }
  .faq__q svg        { transition: none !important; }
  .faq__a            { transition: none !important; }
  .car-card          { transition: none !important; }
  .car-card__frame   { transition: none !important; }
  .car-card__poster  { transition: none !important; }
  .car-dot           { transition: none !important; }
  .car-btn           { transition: none !important; }
  .seg button        { transition: none !important; }
}
