/* ==========================================================================
   TRADEX History Timeline — premium editorial section
   All classes are prefixed with .tradex-history- to avoid theme conflicts.
   ========================================================================== */

.tradex-history-section,
.tradex-history-section *,
.tradex-history-section *::before,
.tradex-history-section *::after {
  box-sizing: border-box;
}

.tradex-history-section {
  --th-red: #FD292D;
  --th-red-strong: #F00000;
  --th-black: #000000;
  --th-ink: #1F1F1F;
  --th-text: #505050;
  --th-muted: #747474;
  --th-line: #E7E7E7;
  --th-inactive: #D1D1D1;
  --th-white: #ffffff;
  --th-bg: #FFFFFF;

  --th-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --th-dur: 0.65s;

  display: block;
  width: 100%;
  padding: 60px 16px;
  background: var(--th-bg);
  font-family: 'Montserrat', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  color: var(--th-ink);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.tradex-history-container {
  position: relative;
  width: 100%;
  max-width: 1440px;
  min-height: 1091px;
  margin: 0 auto;
  padding: 90px 80px 100px;
  background: var(--th-white);
  border-radius: 0;
  overflow: hidden;
  box-shadow: none;
}

/* Subtle noise texture */
.tradex-history-container::before {
  content: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.035;
  mix-blend-mode: multiply;
}

/* Cinematic ambient light */
.tradex-history-container::after {
  content: none;
  position: absolute;
  top: -200px;
  right: -200px;
  width: 700px;
  height: 700px;
  pointer-events: none;
}

/* ---------- Header ---------- */
.tradex-history-header {
  position: relative;
  text-align: center;
  z-index: 2;
}

.tradex-history-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 29px;
  padding: 20px 20px;
  background: var(--th-black);
  border-radius: 25px;
  font-size: 14px;
  font-weight: 500;
  color: var(--th-white);
  letter-spacing: 0.01em;
}

.tradex-history-title {
  max-width: 932px;
  margin: 28px auto 0;
  font-size: 40px;
  font-weight: 600;
  line-height: 140%;
  letter-spacing: -0.01em;
  color: var(--th-black);
}

.tradex-history-title-accent {
  color: var(--th-red);
}

.tradex-history-intro {
  max-width: 984px;
  margin: 22px auto 0;
  font-size: 16px;
  line-height: 180%;
  color: var(--th-text);
  font-weight: 400;
}

/* ---------- Timeline ---------- */
.tradex-history-timeline {
  position: relative;
  margin-top: 70px;
  z-index: 2;
}

.tradex-history-years {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: 0 4px;
  overflow: hidden;
}

.tradex-history-year {
  flex: 0 0 auto;
  white-space: nowrap !important;
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: 78px;
  font-weight: 600;
  line-height: 140%;
  letter-spacing: -0.02em;
  color: var(--th-inactive);
  transition: color var(--th-dur) var(--th-ease),
              transform var(--th-dur) var(--th-ease),
              text-shadow var(--th-dur) var(--th-ease);
}

.tradex-history-section .tradex-history-year:hover,
.tradex-history-section .tradex-history-year:focus,
.tradex-history-section .tradex-history-year:active {
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  color: var(--th-inactive);
  outline: none;
  text-decoration: none;
  transform: translateY(-6px);
}

.tradex-history-year.is-active {
  color: var(--th-red);
  text-shadow: none;
  transform: scale(1.08);
  transform-origin: center bottom;
}

.tradex-history-section .tradex-history-year.is-active:hover,
.tradex-history-section .tradex-history-year.is-active:focus,
.tradex-history-section .tradex-history-year.is-active:active {
  color: var(--th-red);
  transform: translateY(-6px) scale(1.08);
}

/* Line + dots */
.tradex-history-track {
  position: relative;
  margin-top: 18px;
  height: 28px;
}

.tradex-history-line {
  position: absolute;
  left: 0;
  right: 0;
  top: 50%;
  height: 1px;
  background: var(--th-line);
  transform: translateY(-50%);
}

.tradex-history-dots {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: 100%;
  padding: 0 4px;
}

.tradex-history-dot {
  position: relative;
  flex: 0 0 auto;
  width: 28px;
  height: 28px;
  border: 0 !important;
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  appearance: none;
  -webkit-appearance: none;
  padding: 0;
  margin: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform var(--th-dur) var(--th-ease);
}

.tradex-history-section .tradex-history-dot:hover,
.tradex-history-section .tradex-history-dot:focus,
.tradex-history-section .tradex-history-dot:active {
  background: transparent !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  box-shadow: none !important;
  outline: none;
  transform: translateY(-3px);
}

.tradex-history-dot span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #C9C9C9;
  transition: all var(--th-dur) var(--th-ease);
}

.tradex-history-dot.is-active span {
  width: 18px;
  height: 18px;
  background: var(--th-red);
  border: 2px solid var(--th-red-strong);
  box-shadow: none;
  animation: tradexHistoryPulse 2.4s var(--th-ease) infinite;
}

@keyframes tradexHistoryPulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.08); }
}

/* Align dots with their year (best-effort: each year-button visually sits above its dot via flex order) */

/* ---------- Content ---------- */
.tradex-history-content {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 64px;
  margin-top: 64px;
  z-index: 2;
}

.tradex-history-left {
  display: grid;
  grid-template-rows: auto auto;
  position: relative;
}

.tradex-history-panel {
  grid-row: 1;
  grid-column: 1;
  opacity: 0;
  transform: translateY(14px);
  pointer-events: none;
  transition: opacity var(--th-dur) var(--th-ease),
              transform var(--th-dur) var(--th-ease);
}

.tradex-history-panel.is-active {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.tradex-history-panel-title {
  margin: 0 0 22px;
  font-size: 40px;
  font-weight: 600;
  line-height: 140%;
  letter-spacing: -0.01em;
  color: var(--th-ink);
}

.tradex-history-panel-desc {
  max-width: 643px;
  font-size: 16px;
  line-height: 160%;
  color: var(--th-muted);
}

.tradex-history-panel-desc p {
  margin: 0 0 14px;
}

.tradex-history-panel-desc p:last-child {
  margin-bottom: 0;
}

/* Nav arrows */
.tradex-history-nav {
  grid-row: 2;
  grid-column: 1;
  display: flex;
  gap: 12px;
  margin-top: 24px;
}

.tradex-history-arrow {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 0 !important;
  background: #EDEDED !important;
  background-color: #EDEDED !important;
  background-image: none !important;
  appearance: none;
  -webkit-appearance: none;
  color: #9A9A9A;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
  transition: background var(--th-dur) var(--th-ease),
              color var(--th-dur) var(--th-ease),
              transform var(--th-dur) var(--th-ease);
}

.tradex-history-section .tradex-history-arrow:hover,
.tradex-history-section .tradex-history-arrow:focus,
.tradex-history-section .tradex-history-arrow:active {
  background: #EDEDED !important;
  background-color: #EDEDED !important;
  background-image: none !important;
  border: 0 !important;
  color: #9A9A9A !important;
  outline: none;
  transform: translateY(-3px);
}

.tradex-history-arrow svg {
  width: 16px;
  height: 16px;
}

.tradex-history-arrow.is-red {
  background: var(--th-red) !important;
  background-color: var(--th-red) !important;
  background-image: none !important;
  color: #fff !important;
  box-shadow: none;
}

.tradex-history-section .tradex-history-arrow.is-red:hover,
.tradex-history-section .tradex-history-arrow.is-red:focus,
.tradex-history-section .tradex-history-arrow.is-red:active {
  background: var(--th-red) !important;
  background-color: var(--th-red) !important;
  background-image: none !important;
  color: #fff !important;
  box-shadow: none !important;
}

/* ---------- Right image ---------- */
.tradex-history-right {
  position: relative;
}

.tradex-history-image-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 11;
  border-radius: 24px;
  overflow: hidden;
  background: #0c0c10;
  box-shadow: 0 30px 60px -20px rgba(15, 23, 42, 0.18);
  transition: transform var(--th-dur) var(--th-ease),
              box-shadow var(--th-dur) var(--th-ease);
}

.tradex-history-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.7s var(--th-ease),
              transform 1.6s var(--th-ease);
}

.tradex-history-image.is-active {
  opacity: 1;
  transform: scale(1);
}

/* ---------- Reveal on scroll ---------- */
.tradex-history-reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.9s var(--th-ease), transform 0.9s var(--th-ease);
}

.tradex-history-reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 1200px) {
  .tradex-history-container {
    padding: 70px 56px 80px;
    min-height: 0;
border-radius: 0px 0px 0 0;  }
  .tradex-history-year { font-size: 64px; }
  .tradex-history-title { font-size: 34px; }
  .tradex-history-panel-title { font-size: 32px; }
  .tradex-history-content { gap: 44px; }
}

@media (max-width: 900px) {
  .tradex-history-section { padding: 40px 12px; }
  .tradex-history-container {
  }
  .tradex-history-title { font-size: 28px; }
  .tradex-history-intro { font-size: 15px; }

  .tradex-history-years {
    justify-content: flex-start;
    gap: 36px;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    padding-bottom: 6px;
    scrollbar-width: none;
  }
  .tradex-history-years::-webkit-scrollbar { display: none; }
  .tradex-history-year {
    font-size: 54px;
    scroll-snap-align: center;
  }
  .tradex-history-dots {
    justify-content: flex-start;
    gap: 36px;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .tradex-history-dots::-webkit-scrollbar { display: none; }

  .tradex-history-content {
    grid-template-columns: 1fr;
    gap: 36px;
    margin-top: 48px;
  }
  .tradex-history-panel-title { font-size: 26px; margin-bottom: 16px; }
  .tradex-history-image-frame { aspect-ratio: 16 / 10; }
}

@media (max-width: 540px) {
  .tradex-history-container { padding: 44px 20px 52px; }
  .tradex-history-badge { font-size: 12px; height: 26px; }
  .tradex-history-title { font-size: 24px; }
  .tradex-history-year { font-size: 44px; }
  .tradex-history-panel-title { font-size: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .tradex-history-section *,
  .tradex-history-section *::before,
  .tradex-history-section *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* Final override against Hello Elementor / Elementor global button hover styles. */
html body .tradex-history-section .tradex-history-years button.tradex-history-year,
html body .tradex-history-section .tradex-history-years button.tradex-history-year:hover,
html body .tradex-history-section .tradex-history-years button.tradex-history-year:focus,
html body .tradex-history-section .tradex-history-years button.tradex-history-year:focus-visible,
html body .tradex-history-section .tradex-history-years button.tradex-history-year:active,
html body .tradex-history-section .tradex-history-years button.tradex-history-year.is-active,
html body .tradex-history-section .tradex-history-years button.tradex-history-year.is-active:hover,
html body .tradex-history-section .tradex-history-years button.tradex-history-year.is-active:focus,
html body .tradex-history-section .tradex-history-years button.tradex-history-year.is-active:focus-visible,
html body .tradex-history-section .tradex-history-years button.tradex-history-year.is-active:active,
html body .elementor .tradex-history-section .tradex-history-years button.tradex-history-year,
html body .elementor .tradex-history-section .tradex-history-years button.tradex-history-year:hover,
html body .elementor .tradex-history-section .tradex-history-years button.tradex-history-year:focus,
html body .elementor .tradex-history-section .tradex-history-years button.tradex-history-year:focus-visible,
html body .elementor .tradex-history-section .tradex-history-years button.tradex-history-year:active,
html body .elementor .tradex-history-section .tradex-history-years button.tradex-history-year.is-active,
html body .elementor .tradex-history-section .tradex-history-years button.tradex-history-year.is-active:hover,
html body .elementor .tradex-history-section .tradex-history-years button.tradex-history-year.is-active:focus,
html body .elementor .tradex-history-section .tradex-history-years button.tradex-history-year.is-active:focus-visible,
html body .elementor .tradex-history-section .tradex-history-years button.tradex-history-year.is-active:active {
  background: none !important;
  background-color: transparent !important;
  background-image: none !important;
  border: 0 !important;
  border-color: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  outline: 0 !important;
  padding: 0 !important;
}

html body .tradex-history-section .tradex-history-years button.tradex-history-year:hover,
html body .tradex-history-section .tradex-history-years button.tradex-history-year:focus-visible {
  color: var(--th-inactive) !important;
  transform: translateY(-6px);
}

html body .tradex-history-section .tradex-history-years button.tradex-history-year.is-active,
html body .tradex-history-section .tradex-history-years button.tradex-history-year.is-active:hover,
html body .tradex-history-section .tradex-history-years button.tradex-history-year.is-active:focus-visible {
  color: var(--th-red) !important;
  transform: scale(1.08);
  transform-origin: center bottom;
}

html body .tradex-history-section .tradex-history-years button.tradex-history-year.is-active:hover,
html body .tradex-history-section .tradex-history-years button.tradex-history-year.is-active:focus-visible {
  transform: translateY(-6px) scale(1.08);
}

/* Force a pure white canvas, even when Elementor/Hello applies section effects. */
html body .tradex-history-section,
html body .tradex-history-section .tradex-history-container,
html body .elementor .tradex-history-section,
html body .elementor .tradex-history-section .tradex-history-container,
html body .elementor-section:has(.tradex-history-section),
html body .elementor-column:has(.tradex-history-section),
html body .elementor-widget:has(.tradex-history-section),
html body .elementor-widget-container:has(.tradex-history-section),
html body .elementor-container:has(.tradex-history-section),
html body .elementor-column-wrap:has(.tradex-history-section),
html body .elementor-widget-wrap:has(.tradex-history-section),
html body .e-con:has(.tradex-history-section),
html body .e-con-inner:has(.tradex-history-section) {
  background: #fff !important;
  background-color: #fff !important;
  background-image: none !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

html body .tradex-history-section::before,
html body .tradex-history-section::after,
html body .tradex-history-section .tradex-history-container::before,
html body .tradex-history-section .tradex-history-container::after,
html body .elementor-section:has(.tradex-history-section)::before,
html body .elementor-section:has(.tradex-history-section)::after,
html body .elementor-widget-container:has(.tradex-history-section)::before,
html body .elementor-widget-container:has(.tradex-history-section)::after,
html body .e-con:has(.tradex-history-section)::before,
html body .e-con:has(.tradex-history-section)::after {
  content: none !important;
  display: none !important;
  background: none !important;
  box-shadow: none !important;
}

/* ==========================================================================
   Horizontal Slider (added)
   ========================================================================== */

.tradex-history-slider .tradex-history-years-viewport,
.tradex-history-slider .tradex-history-dots-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  touch-action: pan-y;
}

.tradex-history-slider .tradex-history-years,
.tradex-history-slider .tradex-history-dots {
  display: flex !important;
  flex-wrap: nowrap !important;
  justify-content: flex-start !important;
  gap: 0 !important;
  overflow: visible !important;
  scroll-snap-type: none !important;
  padding: 0 !important;
  will-change: transform;
  cursor: grab;
  user-select: none;
}

.tradex-history-slider.is-dragging .tradex-history-years,
.tradex-history-slider.is-dragging .tradex-history-dots,
.tradex-history-slider.is-dragging .tradex-history-track {
  cursor: grabbing;
}

.tradex-history-slider .tradex-history-year {
  text-align: center;
  scroll-snap-align: none !important;
  pointer-events: auto !important;
  touch-action: pan-y;
  user-select: none;
}

.tradex-history-slider .tradex-history-dot {
  margin: 0 auto;
  pointer-events: auto !important;
  touch-action: pan-y;
}

/* Track: full-width clickable / draggable progression line */
.tradex-history-slider .tradex-history-track {
  position: relative;
  cursor: grab;
  touch-action: pan-y;
}

/* Override responsive auto-overflow rules from earlier media queries */
@media (max-width: 900px) {
  .tradex-history-slider .tradex-history-years,
  .tradex-history-slider .tradex-history-dots {
    overflow: visible !important;
    scroll-snap-type: none !important;
    gap: 0 !important;
  }
  .tradex-history-slider .tradex-history-year { font-size: 44px; }
}

@media (max-width: 540px) {
  .tradex-history-slider .tradex-history-year { font-size: 36px; }
}
