/* ==========================================================
   TMJ Components — Consolidated from inline Code Modules
   Extracted: 2026-03-03
   Source pages: Home (8547), About (8549)
   ========================================================== */

/* ----------------------------------------------------------
   1. ANIMATE WORDS (Hero rotating text)
   Used on: Home hero, About hero
   Scoped per .hero-text container for multi-instance support
   ---------------------------------------------------------- */
.animate-words {
  display: inline-block;
  color: white;
  transform: skewX(0deg);
  transition: color 0.6s ease, transform 0.6s ease;
}

.animate-words.active {
  color: var(--accent);
  transform: skewX(-8deg);
}

/* ----------------------------------------------------------
   2. TMJ BANNER (Stats bar with logo)
   Used on: Home, About (below hero)
   ---------------------------------------------------------- */
.tmj-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(12px, 3vw, 60px);
  width: 100% !important;
  box-sizing: border-box;
}

.tmj-banner-logo {
  flex-shrink: 0;
}

.tmj-banner-logo img {
  height: clamp(28px, 3.5vw, 65px);
  width: auto;
  display: block;
}

.tmj-banner-stats {
  display: flex;
  align-items: center;
  gap: clamp(12px, 3vw, 60px);
  flex-wrap: nowrap;
  flex: 1;
}

.tmj-banner-stat {
  display: flex;
  align-items: center;
  gap: clamp(4px, 0.6vw, 12px);
  white-space: nowrap;
  flex: 1 1 0;
  min-width: 0;
  justify-content: center;
}

.tmj-banner-icon {
  flex-shrink: 0;
  display: flex;
}

.tmj-banner-icon svg {
  width: clamp(18px, 2.2vw, 40px);
  height: clamp(18px, 2.2vw, 40px);
}

.tmj-banner-stat-text {
  display: flex;
  flex-direction: column;
  line-height: 1.2;
  font-family: "Cormorant Garamond", sans-serif !important;
}

.tmj-banner-big {
  color: #e8913a;
  font-size: clamp(10px, 1.5vw, 28px);
  font-weight: 700;
  line-height: 1.15;
}

.tmj-banner-small {
  color: #ffffff;
  font-size: clamp(5px, 0.65vw, 12px);
  font-weight: 600;
  letter-spacing: clamp(0.3px, 0.08vw, 1.5px);
  text-transform: uppercase;
  line-height: 1.3;
}

@media (max-width: 600px) {
  .tmj-banner {
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(6px, 2vw, 16px);
  }
  .tmj-banner-stats {
    flex-wrap: wrap;
    justify-content: center;
    gap: clamp(10px, 3vw, 20px);
  }
}

/* ----------------------------------------------------------
   3. LOGO CAROUSEL (Affiliations scrolling bar)
   Used on: Home
   Multi-instance: scoped via .ac-logo-carousel class
   ---------------------------------------------------------- */
.ac-logo-carousel {
  --ac-carousel-speed: 30s;
  --ac-logo-gap: 3rem;
  --ac-fade-width: 120px;
  --ac-logo-height: auto;
  position: relative;
  width: 100%;
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black var(--ac-fade-width), black calc(100% - var(--ac-fade-width)), black 100%);
  mask-image: linear-gradient(to right, transparent 0%, black var(--ac-fade-width), black calc(100% - var(--ac-fade-width)), black 100%);
}

.ac-logo-carousel::before,
.ac-logo-carousel::after {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  width: var(--ac-fade-width);
  z-index: 2;
  pointer-events: none;
}

.ac-logo-track {
  display: flex;
  align-items: center;
  gap: var(--ac-logo-gap);
  width: max-content;
  animation: ac-scroll var(--ac-carousel-speed) linear infinite;
}

.ac-logo-track:hover {
  animation-play-state: paused;
}

.ac-logo-item {
  flex-shrink: 0;
  height: var(--ac-logo-height);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0.5;
  transition: opacity 0.3s ease, filter 0.3s ease;
  filter: grayscale(100%);
}

.ac-logo-item:hover {
  opacity: 1;
  filter: grayscale(0%);
}

.ac-logo-item img {
  height: 100%;
  width: auto;
  max-width: 150px;
  object-fit: contain;
  display: block;
}

@keyframes ac-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* ----------------------------------------------------------
   4. SYMPTOM CARDS (Image cards grid)
   Used on: Home, About
   ---------------------------------------------------------- */
.symptom-cards-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
}

.symptom-card {
  position: relative;
  background: var(--off-white);
  overflow: hidden;
  text-align: center;
  text-decoration: none;
  aspect-ratio: 3 / 4;
  display: block;
  transition: all 0.4s ease;
}

.symptom-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 20px 40px rgba(21, 59, 55, 0.15);
}

.symptom-card-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.symptom-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: bottom center;
  transition: transform 0.5s ease;
}

.symptom-card:hover .symptom-card-image img {
  transform: scale(1.05);
}

.symptom-card-title {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  padding: 2rem 1.5rem;
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.5rem;
  font-weight: 400;
  font-style: italic;
  color: var(--light);
  line-height: 1.3;
  z-index: 2;
  transition: all 0.4s ease;
}

.symptom-card:hover .symptom-card-title {
  font-size: 1.65rem;
  font-weight: 500;
  color: var(--mid);
}

@media (max-width: 1024px) {
  .symptom-cards-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 600px) {
  .symptom-cards-grid {
    grid-template-columns: 1fr;
    max-width: 350px;
    margin: 0 auto;
  }

  .symptom-card-title {
    font-size: 1.35rem;
  }

  .symptom-card:hover .symptom-card-title {
    font-size: 1.5rem;
  }
}
