/* ============================================================
   EDULOGIX — COMPONENTS
   Reusable isolated component styles
   ============================================================ */

/* ---- ANNOUNCEMENT / POPUP MODAL ---- */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.5);
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.modal-overlay.is-open {
  opacity: 1;
  pointer-events: all;
}

.modal {
  background: var(--white);
  border-radius: 12px;
  max-width: 480px;
  width: 90%;
  padding: 2rem;
  position: relative;
  transform: scale(0.9);
  transition: transform 0.3s ease;
}
.modal-overlay.is-open .modal { transform: scale(1); }

.modal__close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  font-size: 1.4rem;
  cursor: pointer;
  color: #999;
}

.modal__logo { height: 32px; margin-bottom: 0.75rem; }
.modal__title { font-size: 0.85rem; color: var(--gray-text); margin-bottom: 0.5rem; }
.modal__headline { font-size: 1.5rem; font-weight: 700; color: var(--blue-dark); }

.modal__passers {
  display: flex;
  margin-top: 1rem;
  gap: 0.5rem;
}
.modal__passer-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 2px solid var(--white);
  object-fit: cover;
  margin-left: -10px;
}
.modal__passer-avatar:first-child { margin-left: 0; }

/* ---- BACK TO TOP BUTTON ---- */
.back-to-top {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 44px;
  height: 44px;
  background: var(--orange);
  color: var(--white);
  border: none;
  border-radius: 50%;
  font-size: 1.2rem;
  cursor: pointer;
  z-index: 500;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}
.back-to-top.visible {
  opacity: 1;
  pointer-events: all;
  transform: none;
}
.back-to-top:hover { background: var(--orange-dark); }

/* ---- ENQUIRY FORM SECTION (optional) ---- */
.enquiry-form {
  background: var(--gray-light);
  border-radius: 12px;
  padding: 2.5rem;
  max-width: 600px;
  margin: 0 auto;
}

.form-group { margin-bottom: 1.2rem; }
.form-label { display: block; font-weight: 600; font-size: 0.85rem; margin-bottom: 0.4rem; color: var(--blue-dark); }
.form-input, .form-select, .form-textarea {
  width: 100%;
  padding: 0.7rem 1rem;
  border: 1px solid var(--gray-border);
  border-radius: var(--radius);
  font-family: var(--font-primary);
  font-size: 0.9rem;
  color: var(--gray-text);
  background: var(--white);
  transition: border-color 0.2s ease;
}
.form-input:focus, .form-select:focus, .form-textarea:focus {
  outline: none;
  border-color: var(--blue-dark);
}
.form-textarea { resize: vertical; min-height: 110px; }

/* ============================================================
   LATEST VIDEOS (YOUTUBE SLIDER SECTION)
   ============================================================ */
.latest-videos-section {
  padding: 5rem 0 5.5rem;
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  position: relative;
  overflow: hidden;
}

.videos-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 3rem;
}

.videos-eyebrow {
  display: inline-block;
  font-family: var(--font-display, 'Satoshi', sans-serif);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  color: #0284c7;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
  background: rgba(2, 132, 199, 0.08);
  padding: 0.35rem 1rem;
  border-radius: 999px;
}

.videos-title {
  font-family: var(--font-display, 'Satoshi', sans-serif);
  font-size: clamp(2rem, 3.8vw, 2.8rem);
  font-weight: 900;
  color: #1e3a8a;
  letter-spacing: 0.02em;
  margin-bottom: 0.85rem;
  text-transform: uppercase;
}

.videos-subtext {
  font-size: 1.05rem;
  line-height: 1.6;
  color: #475569;
}

.videos-subtext strong {
  color: #0f172a;
}

/* Slider Outer Wrapper */
.yt-slider-wrapper {
  position: relative;
  margin: 0 auto;
  padding: 0 3.5rem;
}

@media (max-width: 768px) {
  .yt-slider-wrapper {
    padding: 0 1rem;
  }
}

.yt-slider-viewport {
  overflow: hidden;
  border-radius: 16px;
  padding: 0.5rem 0;
}

.yt-slider-track {
  display: flex;
  gap: 1.5rem;
  transition: transform 0.5s cubic-bezier(0.25, 1, 0.5, 1);
  will-change: transform;
}

/* Individual Video Card (Matches User Screenshot) */
.yt-card {
  flex: 0 0 calc((100% - 3rem) / 3);
  min-width: 290px;
  cursor: pointer;
  user-select: none;
}

@media (max-width: 1024px) {
  .yt-card {
    flex: 0 0 calc((100% - 1.5rem) / 2);
  }
}

@media (max-width: 640px) {
  .yt-card {
    flex: 0 0 100%;
  }
}

.yt-card__inner {
  background: #090d16;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.18), 0 2px 6px rgba(0, 0, 0, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  display: flex;
  flex-direction: column;
}

.yt-card:hover .yt-card__inner {
  transform: translateY(-6px);
  box-shadow: 0 20px 38px rgba(15, 23, 42, 0.28), 0 0 20px rgba(2, 132, 199, 0.2);
  border-color: rgba(2, 132, 199, 0.4);
}

/* Card Top Overlay Header */
.yt-card__header {
  padding: 0.85rem 1rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.95) 0%, rgba(9, 13, 22, 0.9) 100%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.yt-card__avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  object-fit: cover;
  background: #ffffff;
  padding: 2px;
  border: 1.5px solid #ff0000;
  flex-shrink: 0;
}

.yt-card__meta {
  flex: 1;
  min-width: 0;
}

.yt-card__title {
  display: block;
  font-family: var(--font-primary, 'Inter', sans-serif);
  font-size: 0.82rem;
  font-weight: 700;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.3;
}

.yt-card__author {
  display: block;
  font-size: 0.72rem;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* Card Thumbnail & Play Button */
.yt-card__thumb-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  overflow: hidden;
  background: #000;
}

.yt-card__thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.yt-card:hover .yt-card__thumb {
  transform: scale(1.05);
}

.yt-card__play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s ease, filter 0.25s ease;
  filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.6));
}

.yt-card:hover .yt-card__play {
  transform: translate(-50%, -50%) scale(1.18);
  filter: drop-shadow(0 0 16px rgba(255, 0, 0, 0.85));
}

/* Card Bottom Action Bar */
.yt-card__footer {
  padding: 0.65rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #070a10;
  border-top: 1px solid rgba(255, 255, 255, 0.05);
  font-size: 0.75rem;
  color: #94a3b8;
}

.yt-card__action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  transition: color 0.2s ease;
}

.yt-card__action:hover {
  color: #ffffff;
}

.yt-card__brand {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  color: #cbd5e1;
}

/* Arrow Navigation Buttons */
.yt-slider-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(0, 0, 0, 0.1);
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all 0.2s ease;
}

.yt-slider-arrow:hover {
  background: #1e3a8a;
  color: #ffffff;
  transform: translateY(-50%) scale(1.08);
  box-shadow: 0 6px 20px rgba(30, 58, 138, 0.3);
}

.yt-slider-prev { left: 0.5rem; }
.yt-slider-next { right: 0.5rem; }

@media (max-width: 768px) {
  .yt-slider-prev { left: 0; }
  .yt-slider-next { right: 0; }
}

/* Dots and Channel CTA Row */
.videos-footer-row {
  margin-top: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1.5rem;
}

.yt-slider-dots {
  display: flex;
  gap: 0.5rem;
}

.yt-slider-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #cbd5e1;
  border: none;
  padding: 0;
  cursor: pointer;
  transition: all 0.3s ease;
}

.yt-slider-dot.is-active {
  width: 28px;
  border-radius: 6px;
  background: #1e3a8a;
}

.yt-channel-cta {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 1.35rem;
  background: #ffffff;
  border: 1.5px solid #e2e8f0;
  border-radius: 999px;
  font-family: var(--font-display, 'Satoshi', sans-serif);
  font-size: 0.86rem;
  font-weight: 700;
  color: #0f172a;
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  transition: all 0.25s ease;
}

.yt-channel-cta:hover {
  border-color: #ff0000;
  color: #ff0000;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(255, 0, 0, 0.12);
}

/* ============================================================
   LIGHTBOX VIDEO MODAL
   ============================================================ */
.yt-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.yt-modal.is-open {
  opacity: 1;
  pointer-events: auto;
}

.yt-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 15, 26, 0.85);
  backdrop-filter: blur(8px);
}

.yt-modal-content {
  position: relative;
  z-index: 2;
  width: 90%;
  max-width: 900px;
  background: #000;
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.7);
  transform: scale(0.92);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.yt-modal.is-open .yt-modal-content {
  transform: scale(1);
}

.yt-modal-close {
  position: absolute;
  top: 10px;
  right: 15px;
  z-index: 10;
  background: rgba(0, 0, 0, 0.6);
  color: #ffffff;
  border: none;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  font-size: 1.8rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s ease, transform 0.2s ease;
}

.yt-modal-close:hover {
  background: #ff0000;
  transform: scale(1.1);
}

.yt-modal-iframe-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
}

.yt-modal-iframe-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

