/* mctvnews180 — fullscreen TV slideshow */

:root {
  --bg: #0a0a0a;
  --fg: #fff;
  --accent: #ffcc00;
  --shadow: 0 4px 24px rgba(0, 0, 0, 0.85);
  --slide-dur: 12s;
  --fade-dur: 1.2s;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  width: 100%;
  height: 100%;
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow: hidden;
  cursor: none; /* hide cursor on TV */
}

#stage {
  position: fixed;
  inset: 0;
  background: #000;
}

/* ---- slides ----
 *
 * Layout:
 *  - A blurred, "covered" copy of the photo fills the entire screen as
 *    atmospheric backdrop.
 *  - The actual photo (contained) sits on the LEFT ~58% — works for portrait
 *    AND landscape because object-fit: contain.
 *  - Top-right: a small rectangular sponsor ad.
 *  - Bottom-right: kicker + headline + excerpt (small, vertically stacked).
 */

.slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity var(--fade-dur) ease-in-out;
  background-color: #0a0a0a;
}

.slide.active {
  opacity: 1;
}

/* Blurred backdrop — same image, covered + heavy blur. */
.slide .backdrop {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  filter: blur(40px) brightness(0.45) saturate(1.2);
  transform: scale(1.15);
  z-index: 0;
}

/* The contained article photo, left side. */
.slide .photo {
  position: absolute;
  top: 4vh;
  bottom: 4vh;
  left: 3vw;
  width: 58vw;
  height: 92vh;
  object-fit: contain;
  object-position: center center;
  z-index: 1;
  animation: photo-breathe var(--slide-dur) ease-in-out forwards;
}

@keyframes photo-breathe {
  from { transform: scale(1.00); }
  to   { transform: scale(1.03); }
}

/* Right-side darkening so ad + text stay readable over a busy backdrop. */
.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to left,
    rgba(0, 0, 0, 0.80) 0%,
    rgba(0, 0, 0, 0.55) 25%,
    rgba(0, 0, 0, 0.15) 45%,
    rgba(0, 0, 0, 0.00) 65%
  );
  pointer-events: none;
  z-index: 2;
}

/* ---- top-right sponsor ad ---- */

#ad {
  position: fixed;
  top: 4vh;
  right: 3vw;
  z-index: 6;
  width: 32vw;
  max-height: 38vh;
  object-fit: contain;
  object-position: top right;
  border-radius: 4px;
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.6);
}

#ad[hidden] { display: none; }

/* ---- bottom-right text ---- */

.slide .text {
  position: absolute;
  right: 3vw;
  bottom: 5vh;
  width: 36vw;
  text-align: right;
  z-index: 3;
}

.slide .kicker {
  display: inline-block;
  background: var(--accent);
  color: #000;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 1vw;
  padding: 0.35em 0.8em;
  margin-bottom: 1.4vh;
  border-radius: 2px;
}

.slide h1 {
  font-size: 2.6vw;
  line-height: 1.1;
  margin: 0 0 1.2vh 0;
  font-weight: 800;
  letter-spacing: -0.005em;
  text-shadow: var(--shadow);
}

.slide p.excerpt {
  font-size: 1.2vw;
  line-height: 1.4;
  margin: 0;
  font-weight: 400;
  text-shadow: var(--shadow);
  opacity: 0.92;
}

/* No-image fallback: text takes the full width, no photo pane. */
.slide.no-photo .photo { display: none; }
.slide.no-photo::after {
  background: linear-gradient(
    to top,
    rgba(0, 0, 0, 0.85) 0%,
    rgba(0, 0, 0, 0.55) 40%,
    rgba(0, 0, 0, 0.10) 75%,
    rgba(0, 0, 0, 0.00) 100%
  );
}
.slide.no-photo .text {
  left: 5vw;
  right: 5vw;
  width: auto;
  bottom: 8vh;
  text-align: left;
}
.slide.no-photo h1        { font-size: 4vw; }
.slide.no-photo p.excerpt { font-size: 1.6vw; }

/* ---- brand ---- */

#brand {
  position: fixed;
  top: 4vh;
  left: 5vw;
  z-index: 5;
  font-weight: 800;
  font-size: 1.6vw;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #fff;
  text-shadow: var(--shadow);
  opacity: 0.85;
}

/* ---- status (errors / loading) ---- */

#status {
  position: fixed;
  bottom: 2vh;
  right: 2vw;
  z-index: 90;
  background: rgba(0, 0, 0, 0.7);
  color: #fff;
  padding: 0.8em 1.2em;
  border-radius: 4px;
  font-size: 1vw;
  max-width: 30vw;
}

#status[hidden] { display: none; }
