/* =========================================================
   MEDIA PAGE
   White page, big two-tone title, one large video on top,
   two videos side by side below. Click a video to play it full size.
========================================================= */

.media-wrap {
  width: min(1280px, 92%);
  margin-inline: auto;
}

/* ---------- SECTION + TITLE ---------- */

.media-section {
  --header-h: 153px; /* height of the header strip. Set to 0px if the header does NOT overlay the page */
  padding: calc(var(--header-h) + 1rem) 0 clamp(3rem, 6vw, 6rem) !important;
  background: #ffffff;
}

.media-title {
  margin: 0 0 clamp(1.5rem, 2.6vw, 2rem);

  font-family: var(--serif, "Playfair Display", Georgia, serif);
  font-size: clamp(3.4rem, 5.25vw, 6.25rem);
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.01em;
  color: #050505;
}

.media-title .accent {
  color: var(--gold, #eba42d);
}

/* ---------- VIDEO GRID ---------- */

.media-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(1rem, 1.6vw, 2rem);
}

.video-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  padding: 0;
  border: 0;
  overflow: hidden;
  background: #000;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.video-card--featured {
  grid-column: 1 / -1;   /* full width */
}

.video-thumb {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;   /* tall videos show black sides, wide ones fill the box */
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.video-card:hover .video-thumb,
.video-card:focus-visible .video-thumb {
  transform: scale(1.03);
  opacity: 0.9;
}

.video-card:focus-visible {
  outline: 3px solid var(--gold, #eba42d);
  outline-offset: 3px;
}

/* Round play button in the middle */
.video-play {
  position: absolute;
  top: 50%;
  left: 50%;
  width: clamp(48px, 6vw, 64px);
  aspect-ratio: 1;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
  transition: background 0.3s ease, transform 0.3s ease;
}

.video-play::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 54%;
  transform: translate(-50%, -50%);
  border-top: 0.6em solid transparent;
  border-bottom: 0.6em solid transparent;
  border-left: 0.95em solid #1a1a1a;
  font-size: clamp(14px, 1.6vw, 18px);
}

.video-card:hover .video-play,
.video-card:focus-visible .video-play {
  background: var(--gold, #eba42d);
  transform: translate(-50%, -50%) scale(1.1);
}

/* ---------- VIDEO VIEWER (opens when a video is clicked) ---------- */

.video-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.85);
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.video-lightbox.is-open {
  opacity: 1;
  visibility: visible;
}

.vl-stage {
  position: relative;
}

.vl-frame {
  --ar: 1.7778;                                    /* set by the script per video */
  width: min(92vw, 1400px, calc(85vh * var(--ar)));
  aspect-ratio: var(--ar);
  background: #000;
  box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
  transform: scale(0.95);
  transition: transform 0.3s ease;
}

.video-lightbox.is-open .vl-frame {
  transform: scale(1);
}

.vl-frame iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* × button, top right of the video */
.vl-close {
  position: absolute;
  top: -2.75rem;
  right: -0.5rem;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  background: none;
  color: #fff;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  opacity: 0.85;
}

.vl-close:hover {
  opacity: 1;
}

/* ---------- MOBILE ---------- */

@media (max-width: 860px) {
  .media-section {
    --header-h: 100px;
  }

  .media-title {
    text-align: center;
  }
}

@media (max-width: 560px) {
  .media-grid {
    grid-template-columns: 1fr;
  }

  .vl-frame {
    width: min(96vw, calc(80vh * var(--ar)));
  }
}


/* =========================================================
   FOOTER LINKS: no underline (email, phone, "Developed by")
========================================================= */

.site-footer a,
.site-footer a:hover,
.site-footer a:focus-visible {
  text-decoration: none !important;
  border-bottom: 0 !important;
}


/* =========================================================
   BUY SECTION (small banner with image background)
========================================================= */

.buy-section {
  position: relative;
  isolation: isolate;
  overflow: hidden;

  display: flex;
  align-items: center;

  height: clamp(380px, 35vw, 680px);
  min-height: 0;
  padding: 0 !important;

  background-color: #2cadbb;
}

/* Background image. If "buy-bg.jpg" is missing, the gradients
   recreate the teal background with the rose/grey left corner. */
.buy-section::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;

  background-image:
    url("Images/buy-bg.jpg"),
    radial-gradient(ellipse 32% 110% at 0% 100%,
      #d4868c 0%, rgba(212, 134, 140, 0) 100%),
    linear-gradient(90deg,
      rgba(150, 160, 165, 0.55) 0%, rgba(150, 160, 165, 0) 28%);

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.buy-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(2rem, 8vw, 9rem);
}

.buy-books img {
  width: clamp(340px, 30vw, 600px);
  height: auto;
  margin: 0;
  filter: drop-shadow(0 14px 18px rgba(0, 0, 0, 0.25));
}

.buy-title {
  margin: 0 0 1.4rem;
  font-family: var(--serif, "Playfair Display", Georgia, serif);
  font-size: clamp(2.2rem, 3.6vw, 3.6rem);
  font-weight: 600;
  line-height: 1.1;
  color: #ffffff;
  white-space: nowrap;
}

.buy-accent {
  color: #e2b865;
}

/* Amazon button image */
.amazon-link {
  display: inline-block;
  line-height: 0;
  transition: transform 0.3s ease, filter 0.3s ease;
}

.amazon-link img {
  width: 250px;      /* change this to resize your button */
  height: auto;
}

.amazon-link:hover {
  transform: translateY(-3px);
  filter: drop-shadow(0 10px 16px rgba(0, 0, 0, 0.3));
}

/* Mobile */
@media (max-width: 860px) {
  .buy-section {
    height: auto;
    padding: 3rem 0 !important;
  }

  .buy-inner {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .buy-books img {
    width: min(380px, 90%);
    margin-inline: auto;
  }

  .buy-title {
    white-space: normal;
  }
}