/* ============================================================
   THForex – pages.css
   Long-form page styles: hero, prose, TOC, team, criteria, etc.
   Inherits all design tokens from style.css + components.css
   ============================================================ */

/* ---- Page Hero ---- */
.page-hero {
  position: relative;
  padding: 72px 0 56px;
  background: var(--color-white);
  overflow: hidden;
  text-align: center;
}
.page-hero__grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 71, 187, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 71, 187, 0.04) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
}
.page-hero__grid-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 50% 0%, rgba(232, 240, 254, 0.8) 0%, transparent 70%);
}
.page-hero__inner {
  position: relative;
  z-index: 1;
}
.page-hero__title {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-text);
  margin-bottom: 16px;
}
.page-hero__title span {
  color: var(--color-primary);
}
.page-hero__sub {
  font-size: 17px;
  color: var(--color-text-muted);
  max-width: 600px;
  margin: 0 auto 16px;
  line-height: 1.6;
}
.page-hero__meta {
  font-size: 12px;
  color: var(--color-text-light);
  font-weight: 600;
  margin-bottom: 40px;
}
.page-hero .hero__stats {
  margin-top: 40px;
}

/* ---- Prose Page (TOC + Content two-column layout) ---- */
.prose-page {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 48px;
  align-items: start;
}

/* ---- TOC Sidebar ---- */
.toc {
  position: sticky;
  top: calc(var(--nav-height) + 24px);
  background: var(--color-slate-bg);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 20px 24px;
}
.toc__heading {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}
.toc__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.toc__link {
  display: block;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  transition: color var(--transition), background var(--transition);
  line-height: 1.4;
}
.toc__link:hover,
.toc__link--active {
  color: var(--color-primary);
  background: var(--color-primary-light);
}
.toc__link--active {
  font-weight: 700;
}

/* ---- Prose Body ---- */
.prose {
  font-size: 15px;
  line-height: 1.75;
  color: var(--color-text);
}
.prose h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--color-text);
  margin-top: 48px;
  margin-bottom: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--color-border);
  scroll-margin-top: calc(var(--nav-height) + 16px);
}
.prose h3 {
  font-size: 18px;
  font-weight: 700;
  color: var(--color-text);
  margin-top: 32px;
  margin-bottom: 12px;
  scroll-margin-top: calc(var(--nav-height) + 16px);
}
.prose p {
  margin-bottom: 16px;
}
.prose ul,
.prose ol {
  margin-bottom: 16px;
  padding-left: 24px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.prose li {
  line-height: 1.65;
  color: var(--color-text-muted);
}
.prose a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.prose a:hover {
  color: var(--color-primary-dark);
}
.prose strong {
  font-weight: 700;
  color: var(--color-text);
}

/* ---- Criteria Grid (methodology scoring categories) ---- */
.criteria-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin: 32px 0;
}
.criteria-box {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-top: 3px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow var(--transition-md), transform var(--transition-md);
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.criteria-box:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.criteria-box__icon {
  width: 44px;
  height: 44px;
  background: var(--color-primary-light);
  border-radius: var(--radius);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  color: var(--color-primary);
}
.criteria-box__weight {
  font-size: 28px;
  font-weight: 800;
  color: var(--color-primary);
  line-height: 1;
}
.criteria-box__name {
  font-size: 15px;
  font-weight: 700;
  color: var(--color-text);
}
.criteria-box__label {
  font-size: 11px;
  font-weight: 700;
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.criteria-box__desc {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* ---- Criteria Detail Box (sub-criteria per category) ---- */
.criteria-detail-box {
  background: var(--color-slate-bg);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-lg);
  padding: 24px 24px 24px 28px;
  margin-top: 20px;
}
.criteria-detail-box__heading {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-primary);
  margin-bottom: 14px;
}
.criteria-detail-box ul {
  list-style: none;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin: 0;
}
.criteria-detail-box li {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.6;
}
.criteria-detail-box li i {
  color: var(--color-primary);
  font-size: 12px;
  margin-top: 3px;
  flex-shrink: 0;
}

/* ---- Team Grid ---- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0;
}
.team-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-md);
  text-align: center;
}
.team-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-3px);
  border-color: rgba(0, 71, 187, 0.2);
}
.team-card__avatar {
  width: 72px;
  height: 72px;
  border-radius: 50%;
  background: var(--color-primary-light);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 16px;
  font-size: 26px;
  font-weight: 800;
  color: var(--color-primary);
  border: 3px solid rgba(0, 71, 187, 0.15);
}
.team-card__name {
  font-size: 17px;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 4px;
}
.team-card__title {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-primary);
  margin-bottom: 14px;
}
.team-card__bio {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.65;
  margin-bottom: 18px;
}
.team-card__tags {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
}
.team-card__tag {
  font-size: 11px;
  font-weight: 700;
  background: var(--color-primary-light);
  color: var(--color-primary);
  padding: 4px 10px;
  border-radius: 100px;
}

/* ---- CTA Box ---- */
.cta-box {
  background: var(--color-primary-light);
  border: 2px solid rgba(0, 71, 187, 0.2);
  border-radius: var(--radius-xl);
  padding: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin: 32px 0;
}
.cta-box__content {
  flex: 1;
}
.cta-box__text {
  font-size: 16px;
  font-weight: 700;
  color: var(--color-text);
  margin-bottom: 4px;
}
.cta-box__sub {
  font-size: 14px;
  color: var(--color-text-muted);
}

/* ---- Risk Callout ---- */
.risk-callout {
  background: var(--color-accent-light);
  border: 2px solid var(--color-accent);
  border-radius: var(--radius-xl);
  padding: 28px 32px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 32px;
}
.risk-callout__icon {
  font-size: 28px;
  color: var(--color-accent);
  flex-shrink: 0;
  margin-top: 2px;
}
.risk-callout__title {
  font-size: 17px;
  font-weight: 800;
  color: #92400E;
  margin-bottom: 10px;
}
.risk-callout__body {
  font-size: 14px;
  color: #78350F;
  line-height: 1.7;
}

/* ---- Contact Grid ---- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: start;
  margin: 24px 0;
}

/* ---- Info Card ---- */
.info-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px;
  box-shadow: var(--shadow-sm);
}
.info-card__heading {
  font-size: 14px;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 20px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--color-border);
}
.info-card__item {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--color-border);
  margin-bottom: 16px;
}
.info-card__item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}
.info-card__label {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}
.info-card__value {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-primary);
}
.info-card__value--text {
  color: var(--color-text);
}

/* ---- Cookie Table ---- */
.cookie-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  margin: 20px 0;
}
.cookie-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.cookie-table thead th {
  background: var(--color-slate-bg);
  padding: 12px 16px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
  border-bottom: 2px solid var(--color-border);
  text-align: left;
  white-space: nowrap;
}
.cookie-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  vertical-align: top;
}
.cookie-table tbody tr:last-child td {
  border-bottom: none;
}
.cookie-table tbody tr:hover {
  background: var(--color-slate-bg);
}
.cookie-name {
  font-family: 'Courier New', Courier, monospace;
  font-weight: 700;
  font-size: 13px;
  color: var(--color-primary);
}

/* ---- Affiliate Facts List ---- */
.affiliate-facts-list {
  list-style: none;
  padding: 0;
  margin: 20px 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.affiliate-facts-list li {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.65;
  padding: 14px 16px;
  background: var(--color-slate-bg);
  border-radius: var(--radius);
  border-left: 3px solid var(--color-primary);
}
.affiliate-facts-list li i {
  color: var(--color-primary);
  font-size: 14px;
  margin-top: 2px;
  flex-shrink: 0;
}

/* ---- Mission Pillars (about page) ---- */
.mission-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin: 32px 0;
}
.mission-card {
  background: var(--color-white);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  box-shadow: var(--shadow-sm);
  transition: all var(--transition-md);
}
.mission-card:hover {
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.mission-card__icon {
  width: 52px;
  height: 52px;
  background: var(--color-primary-light);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--color-primary);
  margin-bottom: 18px;
}
.mission-card__title {
  font-size: 17px;
  font-weight: 800;
  color: var(--color-text);
  margin-bottom: 10px;
}
.mission-card__desc {
  font-size: 14px;
  color: var(--color-text-muted);
  line-height: 1.65;
}

/* ---- Prose standalone (single-column pages) ---- */
.prose-wrap {
  max-width: 800px;
  margin: 0 auto;
  padding: 64px 24px;
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .prose-page {
    grid-template-columns: 1fr;
  }
  .toc {
    position: static;
    margin-bottom: 32px;
  }
  .team-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .criteria-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .mission-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .page-hero {
    padding: 56px 0 40px;
  }
  .team-grid {
    grid-template-columns: 1fr;
  }
  .criteria-grid {
    grid-template-columns: 1fr;
  }
  .mission-grid {
    grid-template-columns: 1fr;
  }
  .contact-grid {
    grid-template-columns: 1fr;
  }
  .cta-box {
    flex-direction: column;
  }
  .risk-callout {
    flex-direction: column;
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .page-hero__title {
    font-size: 28px;
  }
  .prose h2 {
    font-size: 20px;
  }
}

/* ===== Market Pages: Widget Container ===== */
.widget-container {
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08);
  margin: 24px 0;
}

/* ===== Market Pages: Two-widget row layout ===== */
.widget-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin: 24px 0;
}
@media (max-width: 768px) {
  .widget-row { grid-template-columns: 1fr; }
}

/* ===== Live indicator dot ===== */
.live-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  background: #22c55e;
  border-radius: 50%;
  margin-right: 6px;
  vertical-align: middle;
  animation: pulse-dot 1.4s ease-in-out infinite;
}
@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.5; transform: scale(0.75); }
}
