/* =============================================================
   TRIBO-TECH — Hero Split Layout + Image Slider
   File: assets/css/tribotech-hero-slider.css
   Enqueue after tribotech.css in functions.php
   ============================================================= */

/* =============================================================
   1. HERO OUTER — override the full-height centred layout
   ============================================================= */

/* Remove the old decorative panel and gear (no longer needed) */
.tt-hero--split .tt-hero-panel,
.tt-hero--split .tt-hero-gear {
  display: none !important;
}

.tt-hero--split {
  min-height: 88vh;
  align-items: stretch;   /* columns fill full height */
  padding: 0;
  overflow: hidden;
}

/* =============================================================
   2. SPLIT INNER — two-column flex container
   ============================================================= */
.tt-hero-split-inner {
  display: flex;
  width: 100%;
  min-height: 88vh;
  position: relative;
  z-index: 1;
}

/* =============================================================
   3. LEFT COLUMN — content
   ============================================================= */
.tt-hero-left {
  flex: 0 0 50%;
  display: flex;
  align-items: center;
  padding: 80px 48px 80px 5vw;   /* generous breathing room */
  position: relative;
  z-index: 2;
}

/* Diagonal right-edge clip that bleeds into the slider */
.tt-hero-left::after {
  content: '';
  position: absolute;
  top: 0; right: -40px; bottom: 0;
  width: 80px;
  background: var(--tt-blue-dark);
  clip-path: polygon(0 0, 40px 0, 40px 100%, 0 100%);
  z-index: 3;
}

/* Override the old max-width/padding on the content block */
.tt-hero--split .tt-hero-content {
  max-width: 670px;
  padding: 0;
  animation: tt-fade-up 0.85s cubic-bezier(0.4, 0, 0.2, 1) both;
}

/* Tighten the stats row for the narrower column */
.tt-hero--split .tt-hero-stats {
  margin-top: 3rem;
  padding-top: 2rem;
  grid-template-columns: repeat(3, 1fr);
}

.tt-hero--split .tt-hero-stat {
  padding: 0 1rem;
}

.tt-hero--split .tt-stat-num {
  font-size: 2.4rem;
}

/* =============================================================
   4. RIGHT COLUMN — slider
   ============================================================= */
.tt-hero-right {
  flex: 0 0 50%;
  position: relative;
  overflow: hidden;
  background: var(--tt-blue-deep);   /* fallback while images load */
}

/* Diagonal left-edge deco that overlaps the left column seam */
.tt-hero-clip-deco {
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 60px;
  background: var(--tt-blue-dark);
  clip-path: polygon(0 0, 100% 0, 60% 100%, 0 100%);
  z-index: 4;
  pointer-events: none;
}

/* Placeholder shown before images are added */
.tt-hero-slider-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 63, 96, 0.6);
  border-left: 1px solid rgba(0, 126, 179, 0.2);
}

.tt-hero-slider-placeholder span {
  font-family: var(--tt-fm);
  font-size: 0.75rem;
  letter-spacing: 0.15em;
  color: var(--tt-steel);
  text-transform: uppercase;
  text-align: center;
  padding: 0 2rem;
}

/* =============================================================
   5. SLIDER — track & slides
   ============================================================= */
.tt-slider {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.tt-slider-track {
  width: 100%;
  height: 100%;
  position: relative;
}

.tt-slider-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1);
  pointer-events: none;
}

.tt-slider-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Slide image — cover fill */
.tt-slider-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  /* Ken Burns subtle zoom on active slide */
  animation: none;
  transition: transform 0.7s ease;
}

.tt-slider-slide.is-active .tt-slider-img {
  animation: tt-ken-burns 8s ease-in-out forwards;
}

@keyframes tt-ken-burns {
  from { transform: scale(1.04); }
  to   { transform: scale(1); }
}

/* Dark gradient overlay at the bottom — keeps caption legible */
.tt-slider-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    transparent 45%,
    rgba(0, 32, 54, 0.72) 100%
  );
  pointer-events: none;
}

/* Light left-edge vignette so it blends with the content column */
.tt-slider-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to right,
    rgba(0, 63, 96, 0.55) 0%,
    transparent 30%
  );
  pointer-events: none;
  z-index: 1;
}

/* =============================================================
   6. SLIDE CAPTION
   ============================================================= */
.tt-slider-caption {
  position: absolute;
  bottom: 56px;   /* leaves room for dots/progress */
  left: 32px;
  right: 32px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 4px;
  animation: tt-fade-up 0.5s 0.3s both;
}

.tt-slider-slide:not(.is-active) .tt-slider-caption {
  animation: none;
  opacity: 0;
}

.tt-slider-cap-label {
  font-family: var(--tt-fd);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #ffffff;
  display: block;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.5);
}

.tt-slider-cap-sub {
  font-family: var(--tt-fm);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--tt-steel-lt);
  display: block;
}

/* =============================================================
   7. NAVIGATION ARROWS
   ============================================================= */
.tt-slider-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 10;
  width: 40px; height: 40px;
  background: rgba(0, 89, 132, 0.7);
  border: 1px solid rgba(0, 126, 179, 0.4);
  border-radius: 50%;
  color: #ffffff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.tt-slider-btn:hover {
  background: var(--tt-blue-mid);
  border-color: var(--tt-blue-mid);
  transform: translateY(-50%) scale(1.08);
}

.tt-slider-btn--prev { left: 14px; }
.tt-slider-btn--next { right: 14px; }

.tt-slider-btn--prev svg { position:absolute; left:8px;}
.tt-slider-btn--next svg { position:absolute; right:8px;}

/* =============================================================
   8. DOT INDICATORS
   ============================================================= */
.tt-slider-dots {
  position: absolute;
  bottom: 0px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  display: flex;
  gap: 8px;
  align-items: center;
}

.tt-slider-dot {
  width: 24px; height: 24px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  padding: 0;
  transition: background 0.25s, width 0.25s, border-radius 0.25s;
	min-height:1em;
}

.tt-slider-dot.is-active {
  background: var(--tt-white);
  width: 24px;               /* pill shape for active dot */
  border-radius: 50%;
  border-color: var(--tt-blue-mid);
}

/* =============================================================
   9. PROGRESS BAR — auto-advance indicator
   ============================================================= */
.tt-slider-progress {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  height: 3px;
  background: rgba(255, 255, 255, 0.1);
  z-index: 10;
}

.tt-slider-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--tt-blue-mid);
  transition: width linear;   /* duration set by JS */
}

/* =============================================================
   10. RESPONSIVE
   ============================================================= */

/* Large tablet — keep split but tighten left padding */
@media (max-width: 1100px) {
  .tt-hero-left {
    padding: 60px 32px 60px 4vw;
    flex: 0 0 52%;
  }
  .tt-hero-right {
    flex: 0 0 48%;
  }
}

/* Tablet — stack vertically: slider above, content below */
@media (max-width: 900px) {
  .tt-hero--split {
    min-height: auto;
  }

  .tt-hero-split-inner {
    flex-direction: column-reverse;   /* slider on top, content below */
    min-height: auto;
  }

  .tt-hero-left,
  .tt-hero-right {
    flex: none;
    width: 100%;
  }

  .tt-hero-right {
    height: 50vw;            /* proportional height when stacked */
    min-height: 280px;
    max-height: 440px;
  }

  .tt-hero-left {
    padding: 48px 24px;
  }

  /* Remove the diagonal clip — not needed when stacked */
  .tt-hero-left::after,
  .tt-hero-clip-deco {
    display: none;
  }

  .tt-hero--split .tt-hero-content {
    max-width: 100%;
  }
}

/* Mobile */
@media (max-width: 480px) {
  .tt-hero-right {
    height: 60vw;
    min-height: 220px;
  }

  .tt-hero-left {
    padding: 36px 20px 48px;
  }

  .tt-hero--split .tt-hero-stats {
    grid-template-columns: 1fr;
    gap: 1.2rem;
    margin-top: 2rem;
  }

  .tt-hero--split .tt-hero-stat {
    border-right: none;
    border-bottom: 1px solid rgba(0, 126, 179, 0.15);
    padding: 0 0 1.2rem;
  }

  .tt-hero--split .tt-hero-stat:last-child {
    border-bottom: none;
    padding-bottom: 0;
  }

  .tt-slider-btn {
    width: 34px; height: 34px;
  }

  .tt-slider-caption {
    bottom: 44px;
    left: 16px;
    right: 16px;
  }
}
