/*
 * Styling for media added to a page from the admin settings page.
 *
 * Slot replacements need nothing here — they reuse the classes of the element
 * they replaced, which is the point of swapping in place. This file is only for
 * the `data-cms-zone` regions, which have no equivalent in any page's own CSS
 * because nothing was ever there to style.
 *
 * The variables are the ones every page already defines (--gold, --gl, --mt and
 * friends), with fallbacks so a page that names them differently still comes
 * out in the right palette rather than unstyled.
 */

.cms-zone {
  max-width: 1200px;
  margin: 0 auto;
  padding: 70px 30px;
}

.cms-zone[hidden] {
  display: none;
}

.cms-zone-label {
  color: var(--gd, #8b6914);
  font-family: 'Cinzel', serif;
  font-size: .75rem;
  letter-spacing: 4px;
  text-transform: uppercase;
  text-align: center;
  margin-bottom: 12px;
}

.cms-zone-title {
  color: var(--wh, #f5f5f5);
  font-family: 'Cinzel', serif;
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  letter-spacing: 1px;
  text-align: center;
  margin: 0 0 38px;
}

.cms-zone-title span {
  color: var(--gold, #c9a84c);
}

.cms-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 26px;
  align-items: start;
}

.cms-item {
  margin: 0;
  border: 1px solid rgba(201, 168, 76, .26);
  background: rgba(201, 168, 76, .04);
  padding: 14px;
}

.cms-item > img,
.cms-item > .cms-link > img,
.cms-item > .cms-video {
  display: block;
  width: 100%;
  height: auto;
  background: #000;
}

.cms-item > .cms-link {
  display: block;
}

/* Reserves the frame before the player has loaded, so nothing jumps. */
.cms-embed {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #000;
}

.cms-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

.cms-item-title {
  color: var(--gl, #f0d080);
  font-family: 'Cinzel', serif;
  font-size: .98rem;
  letter-spacing: .5px;
  margin: 16px 0 0;
}

.cms-caption {
  color: var(--mt, #bdbdbd);
  font-size: .86rem;
  line-height: 1.75;
  margin-top: 10px;
}

@media (max-width: 760px) {
  .cms-zone {
    padding: 46px 18px;
  }

  .cms-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
}

/*
 * Text added to a page from the admin settings page.
 *
 * Rewritten wording needs nothing here — it stays inside the page's own
 * element and keeps that element's styling, which is the point of writing into
 * it rather than replacing it. This is only for the `data-cms-text-zone`
 * regions, where blocks that no page ever had markup for are built from
 * scratch.
 */

.cms-text-stack {
  display: grid;
  gap: 30px;
  max-width: 860px;
  margin: 0 auto;
}

.cms-text-item {
  border-left: 2px solid rgba(201, 168, 76, .4);
  padding-left: 22px;
}

.cms-text-title {
  color: var(--gl, #f0d080);
  font-family: 'Cinzel', serif;
  font-size: clamp(1.1rem, 2.4vw, 1.35rem);
  letter-spacing: .5px;
  margin: 0 0 14px;
}

.cms-text-title span {
  color: var(--gold, #c9a84c);
}

.cms-text-body {
  color: var(--mt, #bdbdbd);
  font-size: .96rem;
  line-height: 1.9;
  margin: 0 0 14px;
}

.cms-text-body:last-child {
  margin-bottom: 0;
}

.cms-text-body span {
  color: var(--gl, #f0d080);
}

@media (max-width: 760px) {
  .cms-text-item {
    padding-left: 16px;
  }

  .cms-text-stack {
    gap: 24px;
  }
}
