/* Enhanced layout — tighter spacing, slider, pages, rich footer */

html[lang="en"] body {
  font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
}

.section { padding: 3rem 0; }
.hero { padding: 2rem 0 1.75rem; }
.platform-live { padding: 0 0 2rem; }
.chart-showcase { padding: 2rem 0; }
.trades-section { padding-top: 2rem; }
.explainer-section { padding: 2.5rem 0; }

.section-head-center { margin-bottom: 1.5rem; }

/* Language toggle */
.lang-btn {
  padding: 0.4rem 0.7rem;
  border-radius: 8px;
  border: 1px solid var(--border2);
  background: var(--card);
  color: var(--gold-light);
  font-weight: 800;
  font-size: 0.78rem;
  min-width: 42px;
}

.lang-btn:hover {
  border-color: var(--gold);
  background: var(--badge-gold-bg);
}

/* ===== Hero Slider ===== */
.hero-slider-wrap {
  padding: 0.75rem 0 0;
}

.hero-slider {
  position: relative;
  border-radius: 16px;
  border: 1px solid var(--border2);
  background: var(--card);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.hero-slider-viewport { overflow: hidden; }

.hero-slider-track {
  display: flex;
  transition: transform 0.65s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
}

.hero-slide {
  flex: 0 0 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  padding: 1.25rem;
  min-height: 220px;
  align-items: center;
  opacity: 0.55;
  transition: opacity 0.4s ease;
}

.hero-slide.active { opacity: 1; }

.hero-slide-copy { position: relative; z-index: 1; }

.hero-slide-label {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background: var(--badge-gold-bg);
  border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 800;
  margin-bottom: 0.65rem;
}

.hero-slide-copy h2 {
  margin: 0 0 0.5rem;
  font-size: clamp(1.35rem, 3.5vw, 2rem);
  font-weight: 900;
  line-height: 1.2;
}

.hero-slide-copy p {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
  max-width: 480px;
}

.hero-slide-visual {
  display: grid;
  place-items: center;
  padding: 0.5rem;
  border-radius: 12px;
  background: var(--bg);
  border: 1px solid var(--border2);
}

.hero-slide-visual img {
  width: 100%;
  max-height: 160px;
  object-fit: contain;
}

[data-theme="light"] .hero-slide-visual img,
[data-theme="light"] .explainer-visual img {
  filter: brightness(1.05) contrast(0.95);
}

.hero-slider-controls {
  position: absolute;
  inset-inline: 0.75rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  pointer-events: none;
  z-index: 2;
}

.hero-slider-arrow {
  pointer-events: auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--card) 85%, transparent);
  border: 1px solid var(--border2);
  color: var(--gold-light);
  display: grid;
  place-items: center;
  backdrop-filter: blur(8px);
  transition: background 0.15s ease, border-color 0.15s ease;
}

.hero-slider-arrow:hover {
  background: var(--badge-gold-bg);
  border-color: var(--gold);
}

.hero-slider-dots {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.65rem 0 0.85rem;
}

.hero-slider-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--border2);
  transition: width 0.25s ease, background 0.25s ease;
}

.hero-slider-dot.active {
  width: 22px;
  background: var(--gold);
}

/* ===== Theme icons ===== */
.tibrex-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  border: 1px solid var(--border2);
}

.tibrex-icon--gold {
  background: var(--badge-gold-bg);
  color: var(--gold-light);
}

.tibrex-icon--green {
  background: var(--badge-green-bg);
  color: var(--green);
}

.tibrex-icon--red {
  background: var(--badge-red-bg);
  color: var(--red-text);
}

.tibrex-icon svg {
  width: 22px;
  height: 22px;
}

/* ===== Partners strip ===== */
.partners-strip {
  padding: 1.75rem 0;
  border-block: 1px solid var(--border);
  background: var(--card2);
}

.partners-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
}

.partner-chip {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--card);
  border: 1px solid var(--border2);
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--text-muted);
  transition: border-color 0.15s ease, transform 0.15s ease;
}

.partner-chip:hover {
  border-color: var(--gold);
  transform: translateY(-2px);
}

.partner-chip strong { color: var(--text); }

/* ===== Testimonials ===== */
.testimonials-section { background: var(--card2); }

.testimonial-slider {
  position: relative;
  max-width: 720px;
  margin: 0 auto;
  min-height: 180px;
}

.testimonial-card {
  position: absolute;
  inset: 0;
  padding: 1.5rem;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border2);
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 0.45s ease, transform 0.45s ease;
  pointer-events: none;
}

.testimonial-card.active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
  position: relative;
}

.testimonial-quote {
  margin: 0 0 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.75;
}

.testimonial-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.testimonial-avatar {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: var(--badge-gold-bg);
  display: grid;
  place-items: center;
  font-weight: 900;
  color: var(--gold-light);
}

.testimonial-author strong { display: block; font-size: 0.9rem; }
.testimonial-author span { color: var(--text-muted2); font-size: 0.8rem; }

.testimonial-dots {
  display: flex;
  justify-content: center;
  gap: 0.4rem;
  margin-top: 1rem;
}

.testimonial-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--border2);
}

.testimonial-dot.active { background: var(--gold); width: 18px; }

/* ===== Rich Footer (PST-inspired) ===== */
.site-footer {
  padding: 0 0 1.25rem;
  border-top: 1px solid var(--border);
  background: var(--card2);
}

.pst-footer .footer-top-bar {
  padding: 2.5rem 0 2rem;
  border-bottom: 1px solid color-mix(in srgb, var(--border2) 70%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--badge-gold-bg) 35%, transparent), transparent);
}

.pst-footer .footer-top-inner {
  display: grid;
  gap: 1rem;
  align-items: center;
  text-align: center;
}

.pst-footer .footer-logo {
  justify-content: center;
  margin-inline: auto;
}

.pst-footer .footer-lead {
  margin: 0 auto;
  max-width: 520px;
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.65;
}

.pst-footer .footer-cta {
  justify-self: center;
  min-width: 200px;
}

.footer-rich {
  display: grid;
  gap: 1.5rem;
  padding-top: 2rem;
}

.footer-col h4 {
  margin: 0 0 0.75rem;
  color: var(--gold-light);
  font-size: 0.88rem;
  font-weight: 800;
}

.footer-col a,
.footer-col p {
  display: block;
  color: var(--text-muted);
  font-size: 0.86rem;
  margin: 0 0 0.4rem;
  transition: color 0.15s ease;
}

.footer-col a:hover { color: var(--gold-light); }

.footer-social {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.85rem;
}

.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid var(--border2);
  background: var(--card);
  display: grid;
  place-items: center;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-social a:hover {
  border-color: var(--gold);
  color: var(--gold-light);
}

.footer-newsletter {
  display: flex;
  gap: 0.45rem;
  margin-top: 0.65rem;
}

.footer-newsletter input {
  flex: 1;
  min-width: 0;
  padding: 0.55rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.85rem;
}

.footer-newsletter input:focus {
  outline: none;
  border-color: var(--gold);
}

.footer-newsletter .btn {
  padding: 0.55rem 0.85rem;
  min-height: auto;
  font-size: 0.82rem;
}

.footer-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}

.footer-badge {
  padding: 0.25rem 0.55rem;
  border-radius: 6px;
  background: var(--badge-green-bg);
  color: var(--green);
  font-size: 0.72rem;
  font-weight: 700;
}

.footer-trust {
  margin-top: 1.5rem;
  padding: 1rem 0;
  border-top: 1px solid color-mix(in srgb, var(--border2) 60%, transparent);
}

.footer-trust-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
}

.footer-trust .footer-social {
  margin-top: 0;
  margin-inline-start: auto;
}

html[dir="rtl"] .footer-trust .footer-social {
  margin-inline-start: 0;
  margin-inline-end: auto;
}

/* ===== Page layouts (About / Contact) ===== */
.page-hero {
  padding: 2rem 0 1.5rem;
  text-align: center;
}

.page-hero h1 {
  margin: 0 0 0.65rem;
  font-size: clamp(1.85rem, 4vw, 2.75rem);
  font-weight: 900;
}

.page-hero p {
  margin: 0 auto;
  max-width: 620px;
  color: var(--text-muted);
}

.page-grid {
  display: grid;
  gap: 1rem;
  margin-top: 1.5rem;
}

.info-card {
  padding: 1.25rem;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border2);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.info-card:hover {
  border-color: color-mix(in srgb, var(--gold) 40%, var(--border2));
  box-shadow: var(--shadow-gold);
}

.info-card-head {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.info-card h3 {
  margin: 0;
  font-size: 1.05rem;
}

.info-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.about-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.65rem;
  margin: 1.5rem 0;
}

.about-stat {
  padding: 1rem;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border2);
  text-align: center;
}

.about-stat strong {
  display: block;
  font-size: 1.5rem;
  color: var(--gold-light);
  margin-bottom: 0.2rem;
}

.about-stat span {
  color: var(--text-muted);
  font-size: 0.82rem;
}

.timeline {
  position: relative;
  padding-inline-start: 1.5rem;
  border-inline-start: 2px solid var(--border2);
  display: grid;
  gap: 1.25rem;
}

.timeline-item {
  position: relative;
}

.timeline-item::before {
  content: "";
  position: absolute;
  inset-inline-start: -1.62rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold);
  box-shadow: 0 0 0 4px var(--badge-gold-bg);
}

.timeline-item h4 { margin: 0 0 0.3rem; font-size: 0.95rem; }
.timeline-item p { margin: 0; color: var(--text-muted); font-size: 0.88rem; }

.contact-layout {
  display: grid;
  gap: 1.25rem;
}

.contact-form {
  padding: 1.5rem;
  border-radius: 14px;
  background: var(--card);
  border: 1px solid var(--border2);
}

.form-row {
  display: grid;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.form-field label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted);
}

.form-field input,
.form-field select,
.form-field textarea {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 8px;
  border: 1px solid var(--input-border);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 0.9rem;
}

.form-field textarea { min-height: 120px; resize: vertical; }

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
  outline: none;
  border-color: var(--gold);
}

.contact-cards {
  display: grid;
  gap: 0.65rem;
}

.contact-card {
  display: flex;
  gap: 0.85rem;
  padding: 1rem;
  border-radius: 12px;
  background: var(--card);
  border: 1px solid var(--border2);
}

.contact-card strong { display: block; margin-bottom: 0.15rem; }
.contact-card span { color: var(--text-muted); font-size: 0.85rem; }

.map-placeholder {
  margin-top: 1rem;
  padding: 2rem;
  border-radius: 14px;
  border: 1px dashed var(--border2);
  background: var(--card2);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

/* Pulse animation for live stats */
@keyframes statPulse {
  0%, 100% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--gold) 0%, transparent); }
  50% { box-shadow: 0 0 0 6px color-mix(in srgb, var(--gold) 12%, transparent); }
}

.metric-box.highlight {
  animation: statPulse 3s ease-in-out infinite;
}

/* Compact explainer */
.explainer-grid { gap: 1.25rem; }
.explainer-card { padding: 1.15rem; }

.platform-live-card {
  border: 1px solid color-mix(in srgb, var(--gold) 16%, var(--border2));
  background: linear-gradient(
    135deg,
    var(--card) 0%,
    color-mix(in srgb, var(--card2) 85%, var(--badge-gold-bg)) 100%
  );
  box-shadow: var(--shadow);
  padding: 1.5rem 1.25rem;
  border-radius: 14px;
}

.metric-box {
  border: 1px solid color-mix(in srgb, var(--border2) 80%, transparent);
  background: color-mix(in srgb, var(--card) 70%, transparent);
  backdrop-filter: blur(6px);
}

.metric-box.highlight {
  background: color-mix(in srgb, var(--badge-gold-bg) 80%, transparent);
}

.platform-live-card .platform-live-head {
  margin-bottom: 1rem;
}

.trades-panel,
.chart-panel {
  border: 1px solid color-mix(in srgb, var(--gold) 12%, var(--border2));
  background: color-mix(in srgb, var(--card) 85%, transparent);
  border-radius: 14px;
}

.cta-box {
  border: 1px solid color-mix(in srgb, var(--gold) 20%, var(--border2));
  background: linear-gradient(135deg, color-mix(in srgb, var(--badge-gold-bg) 70%, transparent), transparent);
  border-radius: 16px;
}

.partner-chip {
  border: 1px solid color-mix(in srgb, var(--border2) 80%, transparent);
  background: color-mix(in srgb, var(--card) 80%, transparent);
}

@media (min-width: 720px) {
  .hero-slide {
    grid-template-columns: 1.1fr 0.9fr;
    padding: 1.5rem 1.75rem;
    min-height: 260px;
  }

  .partners-grid { grid-template-columns: repeat(4, 1fr); }

  .footer-rich { grid-template-columns: repeat(4, 1fr); }

  .pst-footer .footer-top-inner {
    grid-template-columns: auto 1fr auto;
    text-align: start;
    gap: 1.5rem;
  }

  .pst-footer .footer-logo {
    justify-content: flex-start;
    margin-inline: 0;
  }

  .pst-footer .footer-lead { margin-inline: 0; }

  .pst-footer .footer-cta { justify-self: end; }

  .page-grid { grid-template-columns: repeat(2, 1fr); }

  .about-stats { grid-template-columns: repeat(4, 1fr); }

  .contact-layout { grid-template-columns: 1.1fr 0.9fr; }

  .form-row.two { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 900px) {
  .hero-slide-copy h2 { font-size: 2rem; }
}
