/* AVIAWKS - YouTube videos (home carousel + /videos page) */

.videos-section {
  background: radial-gradient(circle at 85% 15%, rgba(255, 216, 0, 0.06), transparent 45%),
              radial-gradient(circle at 10% 90%, rgba(255, 30, 39, 0.07), transparent 45%),
              rgba(0, 0, 0, 0.82);
}

.videos-intro {
  max-width: 680px;
  color: var(--white-soft);
  font-size: 0.98rem;
  margin-top: -18px;
  margin-bottom: 28px;
}

.videos-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.yt-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border: 1px solid var(--line-yellow);
  color: var(--white);
  background: transparent;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
}
.yt-btn:hover { background: var(--yellow); color: #000; border-color: var(--yellow); transform: translateY(-2px); }
.yt-btn--red { background: var(--red); border-color: var(--red); color: #fff; }
.yt-btn--red:hover { background: #fff; border-color: #fff; color: #000; }
.yt-btn:focus-visible, .yt-thumb:focus-visible, .yt-arrow:focus-visible, .yt-close:focus-visible {
  outline: 2px solid var(--yellow);
  outline-offset: 3px;
}

/* ---------- Carousel (home page) ---------- */
.yt-carousel { position: relative; }

.yt-track {
  display: flex;
  gap: 20px;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  padding: 4px 2px 18px;
  scrollbar-width: thin;
  scrollbar-color: var(--red) transparent;
  -webkit-overflow-scrolling: touch;
}
.yt-track::-webkit-scrollbar { height: 6px; }
.yt-track::-webkit-scrollbar-thumb { background: var(--red); border-radius: 6px; }
.yt-track .yt-card { flex: 0 0 clamp(260px, 30vw, 380px); scroll-snap-align: start; }

.yt-arrow {
  position: absolute;
  top: 34%;
  transform: translateY(-50%);
  z-index: 3;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-yellow);
  background: rgba(0, 0, 0, 0.82);
  color: var(--yellow);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: background 0.25s ease, color 0.25s ease, opacity 0.25s ease;
}
.yt-arrow:hover { background: var(--yellow); color: #000; }
.yt-arrow[disabled] { opacity: 0; pointer-events: none; }
.yt-arrow--prev { left: -14px; }
.yt-arrow--next { right: -14px; }

/* ---------- Grid (videos page) ---------- */
.yt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 24px;
}

.videos-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 28px;
}
.videos-search {
  flex: 1 1 260px;
  max-width: 420px;
  padding: 12px 18px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.04);
  color: var(--white);
  font-size: 0.92rem;
}
.videos-search::placeholder { color: var(--white-muted); }
.videos-search:focus { outline: none; border-color: var(--yellow); }
.videos-count { color: var(--white-muted); font-size: 0.82rem; letter-spacing: 0.08em; text-transform: uppercase; }

/* ---------- Card ---------- */
.yt-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-width: 0;
}

.yt-thumb {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #0a0a0a;
  cursor: pointer;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.yt-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.yt-card:hover .yt-thumb { border-color: var(--line-yellow); transform: translateY(-3px); }
.yt-card:hover .yt-thumb img { transform: scale(1.05); }

.yt-play {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 58px;
  height: 58px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 30, 39, 0.92);
  box-shadow: 0 0 0 6px rgba(255, 30, 39, 0.22);
  transition: transform 0.25s ease, background 0.25s ease;
}
.yt-play::after {
  content: "";
  position: absolute;
  left: 22px;
  top: 17px;
  border-style: solid;
  border-width: 12px 0 12px 19px;
  border-color: transparent transparent transparent #fff;
}
.yt-card:hover .yt-play { transform: translate(-50%, -50%) scale(1.1); background: var(--red); }

.yt-badge {
  position: absolute;
  top: 10px;
  left: 10px;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--yellow);
  color: #000;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.yt-meta h3 {
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1.4;
  color: var(--white);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.yt-meta time {
  display: block;
  margin-top: 4px;
  font-size: 0.74rem;
  color: var(--yellow);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 600;
}

/* ---------- Skeleton / messages ---------- */
.yt-skel .yt-thumb { cursor: default; animation: yt-pulse 1.4s ease-in-out infinite; }
.yt-skel .yt-line { height: 14px; border-radius: 6px; background: rgba(255, 255, 255, 0.08); animation: yt-pulse 1.4s ease-in-out infinite; }
.yt-skel .yt-line + .yt-line { width: 40%; margin-top: 8px; }
@keyframes yt-pulse { 50% { opacity: 0.45; } }

.yt-message {
  grid-column: 1 / -1;
  padding: 36px 24px;
  text-align: center;
  border: 1px dashed var(--line-yellow);
  border-radius: 12px;
  color: var(--white-soft);
}
.yt-message p { margin-bottom: 16px; }

/* ---------- Player pop-up ---------- */
.yt-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(0, 0, 0, 0.92);
}
.yt-modal.open { display: flex; }
.yt-modal-box { width: min(1080px, 100%); }
.yt-modal-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 12px;
  overflow: hidden;
  background: #000;
  border: 1px solid var(--line-yellow);
}
.yt-modal-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.yt-modal-title { margin-top: 14px; font-size: 1rem; font-weight: 600; color: var(--white); }
.yt-modal-link { display: inline-block; margin-top: 6px; font-size: 0.8rem; color: var(--yellow); letter-spacing: 0.06em; }
.yt-modal-link:hover { text-decoration: underline; }
.yt-close {
  position: absolute;
  top: 16px;
  right: 18px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line-yellow);
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}
.yt-close:hover { background: var(--red); border-color: var(--red); }
body.yt-lock { overflow: hidden; }

@media (max-width: 720px) {
  .yt-arrow { display: none; }
  .yt-track .yt-card { flex-basis: 78vw; }
  .yt-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .yt-track { scroll-behavior: auto; }
  .yt-skel .yt-thumb, .yt-skel .yt-line { animation: none; }
  .yt-card:hover .yt-thumb, .yt-card:hover .yt-thumb img, .yt-btn:hover { transform: none; }
}
