/* =========================================================================
   Izuba — YouTube module ([izuba_youtube])
   Horizontal Shorts row above a video grid, in the Izuba editorial style.
   Scoped under .iz-yt.
   ========================================================================= */

.iz-yt {
  --yt-ink: #1b1b1b;
  --yt-body: #424242;
  --yt-muted: #8f8a85;
  --yt-gold: #bb9951;
  --yt-line: #e7e1d8;
  --yt-cream: #fbfaf9;
  --yt-serif: "IvyPresto", "Beaufort Pro", Georgia, serif;
  --yt-sans: "Adelle Sans", "Montserrat", -apple-system, BlinkMacSystemFont, sans-serif;
  font-family: var(--yt-sans);
  color: var(--yt-body);
  max-width: 1380px;
  margin: 0 auto;
  padding: 0 8px;
}
.iz-yt *,
.iz-yt *::before,
.iz-yt *::after {
  box-sizing: border-box;
}

.iz-yt-section {
  margin: 0 0 56px;
}
.iz-yt-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--yt-serif);
  font-weight: 100;
  font-size: 1.25rem;
  line-height: 1;
  color: var(--yt-ink);
  margin: 0 0 24px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.iz-yt-shorts-ico {
  width: 26px;
  height: 26px;
  flex: 0 0 auto;
}

/* ---- Play button overlay ---------------------------------------------- */
.iz-yt-play {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 54px;
  height: 54px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(27, 27, 27, 0.55);
  border-radius: 50%;
  transition: background-color 0.3s ease, transform 0.3s ease;
  backdrop-filter: blur(2px);
}
.iz-yt-play svg {
  width: 22px;
  height: 22px;
  fill: #fff;
  margin-left: 2px;
}

/* ---- Shorts: horizontal scroll row ------------------------------------ */
.iz-yt-shorts {
  display: flex;
  gap: 16px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 2px 6px;
  scrollbar-width: none; /* Firefox */
  -ms-overflow-style: none; /* Edge/IE */
}
.iz-yt-shorts::-webkit-scrollbar {
  display: none; /* Chrome/Safari */
}

/* Scroll arrows (shown by JS only when there's more to scroll). */
.iz-yt-shorts-wrap {
  position: relative;
}
.iz-yt-arrow {
  position: absolute;
  z-index: 6;
  top: 50%;
  transform: translateY(-50%);
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: #fff;
  border: 1px solid var(--yt-line);
  border-radius: 50%;
  box-shadow: 0 8px 20px -8px rgba(27, 27, 27, 0.4);
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.2s ease;
}
.iz-yt-arrow svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--yt-ink);
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.iz-yt-arrow:hover {
  background: var(--yt-gold);
}
.iz-yt-arrow:hover svg {
  stroke: #fff;
}
.iz-yt-arrow[hidden] {
  display: none;
}
.iz-yt-arrow--prev {
  left: -15px;
}
.iz-yt-arrow--next {
  right: -15px;
}
@media (max-width: 560px) {
  .iz-yt-arrow {
    display: none !important; /* touch devices scroll by swipe */
  }
}
.iz-yt-short {
  flex: 0 0 auto;
  /* Exactly 5 visible on big screens (4 x 16px gaps = 64px). */
  width: calc((100% - 64px) / 5);
  scroll-snap-align: start;
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
}
.iz-yt-short__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 12px;
  overflow: hidden;
  background: var(--yt-cream);
}
.iz-yt-short__media img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.iz-yt-short:hover .iz-yt-short__media img {
  transform: scale(1.05);
}
.iz-yt-short:hover .iz-yt-play {
  background: var(--yt-gold);
}
.iz-yt-short__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 12px 0 4px;
  font-size: 0.92rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--yt-ink);
}
.iz-yt-short__views {
  font-size: 0.8rem;
  color: var(--yt-muted);
}

/* ---- Videos: grid ----------------------------------------------------- */
.iz-yt-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 35px 30px;
}
.iz-yt-video {
  background: none;
  border: 0;
  padding: 0;
  text-align: left;
  cursor: pointer;
  font: inherit;
  display: flex;
  flex-direction: column;
}
.iz-yt-video__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 10px;
  overflow: hidden;
  background: var(--yt-cream);
}
.iz-yt-video__media img {
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  max-width: none;
  object-fit: cover;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.iz-yt-play--lg {
  width: 66px;
  height: 66px;
}
.iz-yt-video:hover .iz-yt-video__media img {
  transform: scale(1.04);
}
.iz-yt-video:hover .iz-yt-play {
  background: var(--yt-gold);
}
.iz-yt-video__title {
  margin: 14px 0 0;
  color: #3D3D3D;
  font-family: "Adelle Sans", Sans-serif;
  font-size: 1.08rem;
  font-weight: 500;
  text-transform: capitalize;
  line-height: 1.2em;
  letter-spacing: 0.2px;
}

.iz-yt--empty {
  text-align: center;
  padding: 40px 0;
  font-family: var(--yt-serif);
  color: var(--yt-muted);
}

/* ---- Lightbox --------------------------------------------------------- */
.iz-yt-lightbox {
  position: fixed;
  inset: 0;
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 15px 20px;
  background: rgba(20, 18, 17, 0.9);
}
.iz-yt-lightbox[hidden] {
  display: none;
}
.iz-yt-lightbox__frame {
  position: relative;
  width: min(1280px, 92vw);
  aspect-ratio: 16 / 9;
  max-height: 86vh;
}
.iz-yt-lightbox--short .iz-yt-lightbox__frame {
  width: auto;
  height: 86vh;
  max-height: none;
  aspect-ratio: 9 / 16;
  max-width: 92vw;
}
.iz-yt-lightbox__frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 10px;
}
.iz-yt-lightbox__close {
  position: absolute;
  top: 10px;
  right: 20px;
  width: 44px;
  height: 44px;
  font-size: 2rem;
  line-height: 1;
  color: #fff;
  background: none;
  border: 0;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.iz-yt-lightbox__close:hover {
  opacity: 1;
  transform: scale(1.1);
}
.iz-yt-lightbox__count {
  position: absolute;
  top: 15px;
  left: 28px;
  color: #fff;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  opacity: 0.85;
}
.iz-yt-lightbox__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  background: rgba(255, 255, 255, 0.12);
  border: 0;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.25s ease;
}
.iz-yt-lightbox__nav:hover {
  background: rgba(255, 255, 255, 0.28);
}
.iz-yt-lightbox__nav svg {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: #fff;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.iz-yt-lightbox__nav[hidden] {
  display: none;
}
.iz-yt-lightbox__nav--prev {
  left: 24px;
}
.iz-yt-lightbox__nav--next {
  right: 24px;
}
@media (max-width: 560px) {
  .iz-yt-lightbox__nav {
    width: 40px;
    height: 40px;
  }
  .iz-yt-lightbox__nav--prev {
    left: 8px;
  }
  .iz-yt-lightbox__nav--next {
    right: 8px;
  }
}

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 900px) {
  .iz-yt-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 30px 22px;
  }
  .iz-yt-heading {
    font-size: 1.8rem;
  }
  .iz-yt-short {
    width: calc((100% - 32px) / 3); /* 3 visible on tablet */
  }
}
@media (max-width: 560px) {
  .iz-yt-grid {
    grid-template-columns: 1fr;
    gap: 30px;
  }
  .iz-yt-short {
    width: 175px;
  }
  .iz-yt-video__title {
    font-size: 1.05rem;
  }
  .iz-yt-heading {
    font-size: 1.4rem;
  }
}
