/* ===== TripTea — Наш YouTube block =====================================
   Figma desktop node: 710:42441 (1920 - Main)   →  section 1920×815
   Figma mobile  node: 744:49379 (390 - main)    →  section 390×753
*/

.tt-yt {
  background: #FFFFFF;
  border-bottom: 1px solid #EAEAEA;
  padding: 80px 0;
  box-sizing: border-box;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "case", "cpsp";
  color: #2B2B2B;
}

.tt-yt--breakout {
  position: relative;
  width: 100vw;
  max-width: 100vw;
  left: 50%;
  transform: translateX(-50%);
}

/* Inner = min(1704, viewport - 32). At ≥1736 viewport it's exactly 1704 (Figma left:108). */
.tt-yt__inner {
  width: min(1704px, 100% - 32px);
  margin: 0 auto;
  padding: 0;
}

.tt-yt *, .tt-yt *::before, .tt-yt *::after {
  box-sizing: border-box;
}

/* ===== Head ============================================================ */

.tt-yt__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 48px; /* Figma column gap = 48 */
}

.tt-yt__title {
  font-family: 'Poppins', sans-serif;
  font-weight: 800;
  font-size: 36px;
  line-height: 120%;
  letter-spacing: 0;
  margin: 0;
  color: #4A3426;
}

.tt-yt__more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 8px 24px;
  height: 56px;
  background: #DE000D;
  color: #FFFFFF;
  border-radius: 16px;
  text-decoration: none;
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 16px;
  line-height: 150%;
  transition: background-color 0.15s ease, transform 0.15s ease;
}
.tt-yt__more:hover,
.tt-yt__more:focus,
.tt-yt__more:active {
  background: #B5000B;
  color: #FFFFFF;
  text-decoration: none;
}
.tt-yt__more-icon { display: block; flex: 0 0 24px; }

/* Mobile-only footer CTA — hidden on desktop */
.tt-yt__more--mobile { display: none; }

/* ===== Strip =========================================================== */

.tt-yt__strip {
  display: flex;
  gap: 24px;
  align-items: stretch;
}

/* ===== Main video card ================================================= */

.tt-yt-main {
  display: block;
  flex: 0 0 984px;
  width: 984px;
  height: 551px;
  border-radius: 24px;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  position: relative;
  isolation: isolate;
  cursor: pointer;
}
.tt-yt-main:hover, .tt-yt-main:focus, .tt-yt-main:active {
  text-decoration: none;
  color: inherit;
}

.tt-yt-main__thumb {
  position: absolute;
  inset: 0;
  background-color: #4A3426;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.tt-yt-main__thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.tt-yt-main__iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  z-index: 5;
}

/* Centered red play button (Figma: 100.98×71 at center) */
.tt-yt-main__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: block;
  pointer-events: none;
  transition: transform 0.2s ease, filter 0.2s ease;
}
.tt-yt-main:hover .tt-yt-main__play {
  transform: translate(-50%, -50%) scale(1.05);
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.3));
}

/* Bottom gradient + meta */
.tt-yt-main__overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 3;
  padding: 22px 24px 24px;
  background: linear-gradient(0deg, rgba(43, 43, 43, 1) 14%, rgba(43, 43, 43, 0.05) 100%);
  border-radius: 0 0 21px 21px;
}

.tt-yt-main__row {
  display: flex;
  align-items: flex-end;
  gap: 16px;
}

.tt-yt-main__meta {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.tt-yt-main__title {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 28px;
  line-height: 120%;
  color: #FFFFFF;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tt-yt-main__views {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #FFFFFF;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 140%;
}

.tt-yt-main__duration {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  height: 24px;
  padding: 0 11px;
  background: #FFFFFF;
  color: #2B2B2B;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 150%;
  white-space: nowrap;
}

.tt-yt-eye { color: currentColor; flex: 0 0 16px; }

/* ===== Side column (3 small cards) ===================================== */

.tt-yt__side {
  flex: 1 1 696px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}

.tt-yt-side-card {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 12px 16px;
  background: #FFFFFF;
  border: 1px solid #EAEAEA;
  border-radius: 24px;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s ease, transform 0.2s ease;
}
.tt-yt-side-card:hover {
  box-shadow: 0 4px 24px 0 rgba(63, 28, 4, 0.10);
  text-decoration: none;
  color: inherit;
}

.tt-yt-side-card__thumb {
  position: relative;
  flex: 0 0 265px;
  width: 265px;
  height: 148px;
  border-radius: 16px;
  background-color: #4A3426;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  overflow: hidden;
}
.tt-yt-side-card__thumb::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  z-index: 1;
}

.tt-yt-side-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  display: block;
  pointer-events: none;
}

.tt-yt-side-card__duration {
  position: absolute;
  right: 8px;
  bottom: 8px;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 60px;
  height: 24px;
  padding: 0 11px;
  background: #2B2B2B;
  color: #FFFFFF;
  border-radius: 6px;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 150%;
  white-space: nowrap;
}

.tt-yt-side-card__body {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  width: 376px;        /* Figma fixed width */
  max-width: 100%;
}

.tt-yt-side-card__title {
  margin: 0;
  font-family: 'Poppins', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 130%;
  color: #4A3426;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.tt-yt-side-card__views {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #6B6B6B;
  font-family: 'Poppins', sans-serif;
  font-weight: 400;
  font-size: 12px;
  line-height: 140%;
}

/* ===== Tablet / smaller desktop (1101..1735) ============================
   2-col stays viable: main shrinks proportionally, side thumbs go to 200×112. */
@media (max-width: 1735px) and (min-width: 1101px) {
  .tt-yt-main {
    flex: 0 0 58%;
    width: auto;
    height: auto;
    aspect-ratio: 984 / 551;
  }
  .tt-yt-side-card__thumb {
    flex: 0 0 200px;
    width: 200px;
    height: 112px;
  }
  .tt-yt-side-card__title {
    font-size: 16px;
  }
}

/* ===== Narrow desktop / large tablet (769..1100) ========================
   2-col stops being viable (side card body squeezed below 120px), so we
   stack the strip vertically — main on top, 3 side cards below — but keep
   desktop typography & the head CTA on the right. */
@media (max-width: 1100px) and (min-width: 769px) {
  .tt-yt__strip {
    flex-direction: column;
    gap: 24px;
  }
  .tt-yt-main {
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 984 / 551;
  }
  .tt-yt__side {
    flex: none;
    width: 100%;
    flex-direction: row;
    gap: 16px;
    justify-content: stretch;
  }
  .tt-yt-side-card {
    flex: 1 1 0;
    min-width: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px;
  }
  .tt-yt-side-card__thumb {
    flex: 0 0 auto;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }
  .tt-yt-side-card__body {
    width: 100%;
    gap: 8px;
  }
  .tt-yt-side-card__title {
    font-size: 16px;
    -webkit-line-clamp: 2;
  }
}

/* ===== Mobile (Figma 390 - main, node 744:49379) ====================== */
@media (max-width: 768px) {
  .tt-yt {
    padding: 40px 0;
  }
  .tt-yt__inner {
    width: 100%;
    padding: 0 24px;
  }

  /* Head: title only — desktop CTA hidden, mobile CTA at bottom.
     Gap 40 here matches Figma 390-main absolute layout: head y=40, strip y=114,
     so head→strip gap = 114 − (40 padding + 34 title) = 40. */
  .tt-yt__head {
    margin-bottom: 40px;
  }
  .tt-yt__title {
    font-size: 28px;
    line-height: 120%;
  }
  .tt-yt__head .tt-yt__more {
    display: none;
  }

  /* Strip = column on mobile */
  .tt-yt__strip {
    flex-direction: column;
    gap: 24px;
  }

  /* Main card: full-width, aspect ~342×192 (Figma) → keep ratio */
  .tt-yt-main {
    flex: none;
    width: 100%;
    height: auto;
    aspect-ratio: 342 / 192;
    border-radius: 8px;
  }
  .tt-yt-main__overlay {
    padding: 12px;
    border-radius: 0 0 7.3px 7.3px;
  }
  .tt-yt-main__title {
    font-size: 12px;
    line-height: 120%;
    -webkit-line-clamp: 2;
  }
  .tt-yt-main__row {
    align-items: center;
    gap: 8px;
  }
  .tt-yt-main__meta {
    gap: 6px;
  }
  .tt-yt-main__views {
    font-size: 12px;
    line-height: 150%;
  }
  .tt-yt-main__duration {
    min-width: 0;
    height: auto;
    padding: 4px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 150%;
  }
  .tt-yt-main__play svg {
    width: 54px;
    height: 38px;
  }

  /* Side stack — 3 small cards, 8 gap (Figma 287 / 3 ≈ 92h each, padding 8) */
  .tt-yt__side {
    flex: none;
    width: 100%;
    gap: 8px;
  }

  .tt-yt-side-card {
    padding: 8px;
    gap: 12px;
    border-radius: 12px;
    border-width: 0.5px;
  }
  .tt-yt-side-card__thumb {
    flex: 0 0 137px;
    width: 137px;
    height: 77px;
    border-radius: 8px;
  }
  .tt-yt-side-card__play svg {
    width: 30px;
    height: 21px;
  }
  .tt-yt-side-card__duration {
    right: 4px;
    bottom: 4px;
    min-width: 0;
    height: 16px;
    padding: 0 4px;
    border-radius: 4px;
    font-size: 12px;
    line-height: 150%;
  }
  .tt-yt-side-card__body {
    width: auto;
    gap: 5px;
  }
  .tt-yt-side-card__title {
    font-size: 12px;
    line-height: 130%;
    -webkit-line-clamp: 3;
  }
  .tt-yt-side-card__views {
    font-size: 12px;
    line-height: 150%;
  }

  /* Mobile footer CTA — full-width, 56h.
     margin-top 40 matches Figma: strip ends at y=617 (114 + 503), CTA at y=657. */
  .tt-yt__more--mobile {
    display: inline-flex;
    width: 100%;
    margin-top: 40px;
  }
}
