/* ============================================================
   Therapeutic Region Page — Modern UI/UX
   Palette: brand red #e31e24 · teal #0f7490 · deep navy #1a3a52
   ============================================================ */

:root {
  --tr-red: #e31e24;
  --tr-teal: #0f7490;
  --tr-navy: #1a3a52;
  --tr-ink: #25323d;
  --tr-muted: #5d6f7c;
  --tr-line: #e6ecf1;
  --tr-bg-soft: #f5f8fa;
  --tr-radius: 18px;
  --tr-shadow-sm: 0 4px 14px rgba(26, 58, 82, 0.06);
  --tr-shadow-md: 0 14px 40px rgba(26, 58, 82, 0.12);
  --tr-shadow-lg: 0 24px 60px rgba(26, 58, 82, 0.18);
  --tr-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Buttons ---------- */
.tr-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 30px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.2px;
  text-decoration: none;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.3s var(--tr-ease), box-shadow 0.3s var(--tr-ease),
    background 0.3s var(--tr-ease), color 0.3s var(--tr-ease);
}
.tr-btn-primary {
  background: linear-gradient(135deg, var(--tr-teal) 0%, #0a5e76 100%);
  color: #fff;
  box-shadow: 0 10px 24px rgba(15, 116, 144, 0.32);
}
.tr-btn-primary:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 34px rgba(15, 116, 144, 0.42);
}
.tr-btn-ghost {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(4px);
}
.tr-btn-ghost:hover {
  background: #fff;
  color: var(--tr-navy);
  transform: translateY(-3px);
}
.tr-btn-outline {
  background: transparent;
  color: var(--tr-teal);
  border-color: var(--tr-teal);
}
.tr-btn-outline:hover {
  background: var(--tr-teal);
  color: #fff;
  transform: translateY(-3px);
}

/* ---------- Section eyebrows ---------- */
.tr-eyebrow,
.tr-section-eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
}
.tr-section-eyebrow {
  color: var(--tr-teal);
  margin-bottom: 12px;
}

/* ============================================================
   HERO
   ============================================================ */
.tr-hero {
  position: relative;
  padding: 110px 24px 120px;
  text-align: center;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
}
.tr-hero-bg {
  position: absolute;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 500px at 15% 10%, rgba(15, 116, 144, 0.55), transparent 60%),
    radial-gradient(800px 500px at 90% 80%, rgba(227, 30, 36, 0.4), transparent 60%),
    linear-gradient(135deg, #123247 0%, #0f7490 55%, #0a5e76 100%);
}
.tr-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background-image:
    radial-gradient(circle at 1px 1px, rgba(255, 255, 255, 0.18) 1px, transparent 0);
  background-size: 26px 26px;
  opacity: 0.4;
  -webkit-mask-image: radial-gradient(closest-side at 50% 40%, #000 60%, transparent 100%);
  mask-image: radial-gradient(closest-side at 50% 40%, #000 60%, transparent 100%);
}
.tr-hero-inner {
  max-width: 860px;
  margin: 0 auto;
}
.tr-hero .tr-eyebrow {
  color: rgba(255, 255, 255, 0.85);
  margin-bottom: 18px;
  padding: 6px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  border: 1px solid rgba(255, 255, 255, 0.25);
}
.tr-hero .tr-hero-title {
  font-size: clamp(32px, 5vw, 54px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -1px;
  margin: 0 0 20px;
  color: #ffffff !important;
}
.tr-hero .tr-hero-subtitle {
  font-size: clamp(16px, 2vw, 19px);
  line-height: 1.6;
  color: rgba(255, 255, 255, 0.92);
  max-width: 660px;
  margin: 0 auto 34px;
}
.tr-hero-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

/* ============================================================
   CAROUSEL HEADER ENHANCEMENTS (works with styles.css carousel)
   ============================================================ */
.therapeutic-carousel-header .section-subtitle {
  font-size: 17px;
  color: var(--tr-muted);
  max-width: 620px;
  margin: 8px auto 0;
  line-height: 1.6;
}

/* ============================================================
   STATS BAND
   ============================================================ */
.tr-stats {
  background: var(--tr-navy);
  padding: 46px 24px;
}
.tr-stats-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
  text-align: center;
}
.tr-stat {
  position: relative;
  padding: 8px 12px;
}
.tr-stat:not(:last-child)::after {
  content: "";
  position: absolute;
  right: -12px;
  top: 50%;
  transform: translateY(-50%);
  width: 1px;
  height: 46px;
  background: rgba(255, 255, 255, 0.14);
}
.tr-stat-num {
  display: block;
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 800;
  line-height: 1;
  background: linear-gradient(135deg, #fff 0%, #9fd6e6 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  margin-bottom: 8px;
}
.tr-stat-label {
  display: block;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  font-weight: 600;
}

/* ============================================================
   THERAPEUTIC AREAS GRID
   ============================================================ */
.tr-areas {
  padding: 84px 24px 90px;
  max-width: 1240px;
  margin: 0 auto;
}
.tr-areas-header {
  text-align: center;
  margin-bottom: 54px;
}
.tr-areas-title {
  font-size: clamp(28px, 4vw, 40px);
  font-weight: 800;
  color: var(--tr-navy);
  letter-spacing: -0.6px;
  margin: 0 0 14px;
}
.tr-areas-subtitle {
  font-size: 17px;
  color: var(--tr-muted);
  max-width: 600px;
  margin: 0 auto;
  line-height: 1.6;
}
.tr-areas-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 26px;
}
.tr-areas-loading {
  grid-column: 1 / -1;
  text-align: center;
  color: var(--tr-muted);
  padding: 40px 0;
  font-size: 16px;
}

/* Area card */
.tr-area-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid var(--tr-line);
  border-radius: var(--tr-radius);
  padding: 30px 28px 26px;
  text-decoration: none;
  overflow: hidden;
  box-shadow: var(--tr-shadow-sm);
  transition: transform 0.4s var(--tr-ease), box-shadow 0.4s var(--tr-ease),
    border-color 0.4s var(--tr-ease);
  opacity: 0;
  transform: translateY(22px);
}
.tr-area-card.tr-in {
  opacity: 1;
  transform: translateY(0);
}
.tr-area-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 5px;
  background: linear-gradient(90deg, var(--tr-teal), var(--tr-red));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.45s var(--tr-ease);
}
.tr-area-card:hover {
  transform: translateY(-8px);
  box-shadow: var(--tr-shadow-md);
  border-color: transparent;
}
.tr-area-card:hover::before {
  transform: scaleX(1);
}

.tr-area-icon {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 22px;
  background: linear-gradient(135deg, rgba(15, 116, 144, 0.12), rgba(15, 116, 144, 0.04));
  color: var(--tr-teal);
  transition: transform 0.4s var(--tr-ease), background 0.4s var(--tr-ease),
    color 0.4s var(--tr-ease);
}
.tr-area-icon svg {
  width: 30px;
  height: 30px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.tr-area-card:hover .tr-area-icon {
  background: linear-gradient(135deg, var(--tr-teal), #0a5e76);
  color: #fff;
  transform: rotate(-6deg) scale(1.05);
}

.tr-area-name {
  font-size: 21px;
  font-weight: 700;
  color: var(--tr-navy);
  margin: 0 0 10px;
  letter-spacing: -0.3px;
}
.tr-area-desc {
  font-size: 15px;
  line-height: 1.6;
  color: var(--tr-muted);
  margin: 0 0 22px;
  flex-grow: 1;
}
.tr-area-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  color: var(--tr-teal);
  letter-spacing: 0.2px;
}
.tr-area-link svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.3s var(--tr-ease);
}
.tr-area-card:hover .tr-area-link {
  color: var(--tr-red);
}
.tr-area-card:hover .tr-area-link svg {
  transform: translateX(5px);
}

/* ============================================================
   CTA
   ============================================================ */
.tr-cta {
  padding: 70px 24px 90px;
}
.tr-cta-inner {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
  background: linear-gradient(135deg, #f5f8fa 0%, #eaf3f6 100%);
  border: 1px solid var(--tr-line);
  border-radius: 26px;
  padding: 54px 32px;
  position: relative;
  overflow: hidden;
}
.tr-cta-inner::before {
  content: "";
  position: absolute;
  width: 320px;
  height: 320px;
  right: -120px;
  top: -120px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(15, 116, 144, 0.12), transparent 70%);
}
.tr-cta-title {
  font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 800;
  color: var(--tr-navy);
  margin: 0 0 12px;
  letter-spacing: -0.4px;
  position: relative;
}
.tr-cta-text {
  font-size: 17px;
  color: var(--tr-muted);
  margin: 0 0 28px;
  position: relative;
}
.tr-cta-actions {
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  position: relative;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .tr-stats-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 32px 24px;
  }
  .tr-stat:nth-child(2)::after {
    display: none;
  }
}
@media (max-width: 768px) {
  .tr-hero {
    padding: 84px 20px 90px;
  }
  .tr-areas {
    padding: 60px 20px 64px;
  }
  .tr-areas-grid {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 560px) {
  .tr-stats-inner {
    grid-template-columns: 1fr 1fr;
  }
  .tr-stat::after {
    display: none !important;
  }
  .tr-hero-actions,
  .tr-cta-actions {
    flex-direction: column;
  }
  .tr-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tr-area-card {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

