/* ── In The Media — card carousel (matches Patient Stories style) */

.itm-section {
  background: #0F0F0E;
  padding: 80px 0 60px;
  overflow: hidden;
}

.itm-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 52px 40px;
}

.itm-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 40px;
}

.itm-header-left .section-label span { color: var(--gold-light, #D4C9A8); }
.itm-header-left .section-label::before { background: var(--gold, #B8A882); }

.itm-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(28px, 4vw, 44px);
  font-weight: 300;
  color: #FAFAF8;
  line-height: 1.1;
  margin-top: 10px;
}
.itm-title em { font-style: italic; color: var(--gold-light, #D4C9A8); }

.itm-social-links {
  display: flex;
  gap: 10px;
  align-items: center;
}
.itm-social-links a {
  color: rgba(250,250,248,0.4);
  transition: color 0.2s;
  font-size: 13px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.itm-social-links a:hover { color: var(--gold, #B8A882); }

/* Track — reuses carousel-track behaviour applied via JS */
.itm-track {
  display: flex;
  gap: 16px;
  padding: 0 52px 16px;
}

/* Cards */
.itm-card {
  flex: 0 0 260px;
  width: 260px;
  scroll-snap-align: start;
  background: #1A1A18;
  overflow: hidden;
  transition: transform 0.3s;
}
.itm-card:hover { transform: translateY(-4px); }

.itm-card-img {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 13;
  overflow: hidden;
  background: #111;
}
.itm-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s;
  pointer-events: none;
}
.itm-card:hover .itm-card-img img { transform: scale(1.04); }

.itm-card-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(15,15,14,0.65) 0%, transparent 55%);
  pointer-events: none;
}

/* Gold play button — video + reel cards */
.itm-play {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: var(--gold, #B8A882);
  display: flex; align-items: center; justify-content: center;
  transition: transform 0.2s, background 0.2s;
  pointer-events: none;
}
.itm-play svg { width: 20px; height: 20px; fill: #1A1A18; margin-left: 3px; }
.itm-card:hover .itm-play { transform: translate(-50%, -50%) scale(1.1); background: #D4C9A8; }

/* Card body */
.itm-card-body { padding: 14px 16px 18px; }
.itm-tag {
  display: inline-block;
  font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold, #B8A882); margin-bottom: 7px;
}
.itm-caption {
  font-size: 14px; line-height: 1.5;
  color: rgba(250,250,248,0.6);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.itm-read-more {
  display: inline-block; margin-top: 9px;
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold, #B8A882); transition: color 0.2s;
}
.itm-card:hover .itm-read-more { color: #D4C9A8; }
.itm-card-link { text-decoration: none; color: inherit; display: block; }

/* Reel card background */
.itm-reel-bg {
  background: linear-gradient(135deg, #2a1a2e 0%, #1a1a18 100%);
}
.itm-reel-icon {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -70%);
  color: rgba(250,250,248,0.2);
}

/* ── Carousel wrapper/arrows/dots (needed at ALL breakpoints for ITM) ── */

/* Scope to itm-section so we don't break Patient Stories on desktop */
.itm-section .carousel-wrap {
  position: relative;
}

.itm-section .carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  -webkit-overflow-scrolling: touch;
  gap: 16px;
  padding: 0 52px 16px;
  scrollbar-width: none;
}
.itm-section .carousel-track::-webkit-scrollbar { display: none; }

.itm-section .carousel-dots {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin-top: 20px;
  padding: 0 52px;
}
.itm-section .carousel-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: rgba(184,168,130,0.25);
  border: none; cursor: pointer;
  padding: 0; transition: background 0.2s, transform 0.2s;
}
.itm-section .carousel-dot.active {
  background: var(--gold, #B8A882);
  transform: scale(1.3);
}

.itm-section .carousel-prev,
.itm-section .carousel-next {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  z-index: 5;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--warm-white, #FAFAF8);
  border: 1px solid var(--border, rgba(184,168,130,0.25));
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: var(--charcoal, #1A1A18);
  box-shadow: 0 2px 12px rgba(26,26,24,0.12);
  transition: background 0.2s, border-color 0.2s;
}
.itm-section .carousel-prev:hover,
.itm-section .carousel-next:hover {
  background: var(--gold, #B8A882);
  border-color: var(--gold, #B8A882);
  color: var(--warm-white, #FAFAF8);
}
.itm-section .carousel-prev { left: 4px; }
.itm-section .carousel-next { right: 4px; }
.itm-section .carousel-prev svg,
.itm-section .carousel-next svg { width: 14px; height: 14px; }

/* Hide arrows on mobile — swipe only, matching Patient Stories mobile UX */
@media (max-width: 768px) {
  .itm-section .carousel-prev,
  .itm-section .carousel-next { display: none; }
}

/* ── Responsive ─────────────────────────────────────────────── */
@media (max-width: 768px) {
  .itm-inner { padding: 0 20px 32px; }
  .itm-header { flex-direction: column; align-items: flex-start; gap: 16px; }
  .itm-section .carousel-track { padding: 0 20px 16px; }
  .itm-section .carousel-dots { padding: 0 20px; }
  .itm-card { flex: 0 0 220px; width: 220px; }
}
