/* ===========================================================================
   HERO + NEWS OVERRIDES — loaded AFTER minicom-theme.css so it wins.
   Two changes ONLY:
     1 · Hero: the photo slideshow becomes the FULL-BLEED background of the
         hero section (with a dark overlay so the text stays readable).
     2 · News feed: horizontal right-to-left slideshow + pop-up modal.
   Nothing else on the site is touched by this file.
   =========================================================================== */

/* ---------------------------------------------------------------------------
   1 · HERO — full-width / full-height background slideshow
   --------------------------------------------------------------------------- */
html[data-mc="on"] section.hero {
  position: relative;
  min-height: clamp(480px, 70vh, 780px);
  background: #0E0E0C;                 /* base behind photos while they load */
  padding: clamp(56px, 9vw, 120px) 0;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}

/* Semi-transparent dark overlay over the photos → text stays readable */
html[data-mc="on"] section.hero::after {
  content: "";
  display: block !important;
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(120% 90% at 50% 45%, rgba(0,0,0,0.16) 0%, rgba(0,0,0,0.45) 100%),
    rgba(0, 0, 0, 0.34);
}

/* The container must NOT be positioned, so the photo layer anchors to the
   full hero section instead of the centered column */
html[data-mc="on"] section.hero .container { position: static; }
html[data-mc="on"] .mc-hero-grid { display: block; }

/* Slideshow → full-bleed background layer */
html[data-mc="on"] .mc-hero-grid .mc-hero-photos {
  position: absolute;
  inset: 0;
  z-index: 0;
  width: auto;
  margin: 0;
  aspect-ratio: auto;
  border-radius: 0;
  box-shadow: none;
  overflow: hidden;
  pointer-events: none;
  display: block;
}
html[data-mc="on"] .mc-hero-grid .mc-hero-photos .mc-slide {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  /* "popping" feel: cross-fade + gentle Ken-Burns drift.
     ADJUST FADE SPEED here (and HOLD time in the hero <script> below it). */
  transition: opacity 1.4s ease-in-out;
  transform: scale(1.06);
  animation: mc-hero-kenburns 16s ease-in-out infinite alternate;
  border-radius: 0;
  box-shadow: none;
}
html[data-mc="on"] .mc-hero-grid .mc-hero-photos .mc-slide.is-active { opacity: 1; }

/* Text + buttons stay in the same left position — only colors gain contrast */
html[data-mc="on"] section.hero .mc-hero-head {
  position: relative;
  z-index: 2;
  text-align: left;
  max-width: 640px;
  margin: 0;
}
html[data-mc="on"] section.hero h1 {
  color: #FFFFFF !important;
  text-shadow: 0 2px 22px rgba(0,0,0,0.55), 0 1px 4px rgba(0,0,0,0.45) !important;
}
html[data-mc="on"] section.hero .mc-hero-lede {
  color: rgba(255,255,255,0.93);
  text-shadow: 0 1px 14px rgba(0,0,0,0.55);
}

@media (prefers-reduced-motion: reduce) {
  html[data-mc="on"] .mc-hero-grid .mc-hero-photos .mc-slide { animation: none; transform: none; }
}

/* ---------------------------------------------------------------------------
   2 · NEWS FEED — horizontal right-to-left slideshow + modal
   --------------------------------------------------------------------------- */
.news-carousel { position: relative; }

/* Scrolling viewport (touch-friendly: native horizontal scroll on mobile) */
.news-viewport {
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.news-viewport::-webkit-scrollbar { display: none; }

.news-track {
  display: flex;
  gap: 16px;
  padding: 4px 2px 14px;
  width: max-content;
}

/* One news card in the strip */
.news-card {
  flex: 0 0 320px;
  width: 320px;
  background: #fff;
  border: 1px solid var(--border-soft);
  border-radius: 12px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(29,33,30,.06);
  transition: box-shadow .22s ease, border-color .22s ease, transform .22s ease;
  display: flex;
  flex-direction: column;
  gap: 10px;
  cursor: pointer;
  text-align: left;
  font-family: inherit;
}
.news-card:hover {
  box-shadow: 0 6px 18px rgba(29,33,30,.14);
  border-color: rgba(110,143,116,.25);
  transform: translateY(-2px);
}
.news-card-thumb {
  position: relative;
  height: 150px;
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg-secondary);
}
.news-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.news-card-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.25);
  color: #fff;
  font-size: 2rem;
  pointer-events: none;
}
.news-card .news-post-title { font-size: 1.02rem; }
.news-card .news-post-description {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card-more {
  margin-top: auto;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary-green);
}

/* Left / right arrows */
.news-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--border-soft);
  box-shadow: 0 4px 14px rgba(29,33,30,.16);
  color: var(--primary-green);
  font-size: 1.1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background .2s ease, transform .2s ease;
}
.news-arrow:hover { background: var(--bg-secondary); }
.news-arrow-prev { left: -14px; }
.news-arrow-next { right: -14px; }
@media (max-width: 720px) {
  .news-arrow { display: none; } /* mobile: swipe instead */
}

/* Pop-up modal (lightbox) */
.news-modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 1200;
  background: rgba(14,14,12,.6);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  transition: opacity .25s ease, visibility .25s ease;
}
.news-modal-overlay.is-open { opacity: 1; visibility: visible; }
.news-modal {
  background: #fff;
  border-radius: 14px;
  width: min(720px, 94vw);
  max-height: 86vh;
  overflow-y: auto;
  padding: 24px;
  position: relative;
  box-shadow: 0 24px 70px rgba(0,0,0,.35);
  transform: translateY(12px) scale(.98);
  transition: transform .25s ease;
}
.news-modal-overlay.is-open .news-modal { transform: translateY(0) scale(1); }
.news-modal-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-secondary);
  color: var(--text-primary);
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border: none;
}
.news-modal-close:hover { background: var(--border-soft); }
.news-modal-media { margin: 14px 0; border-radius: 10px; overflow: hidden; }
.news-modal-media img { width: 100%; display: block; }
.news-modal-media iframe,
.news-modal-media video {
  width: 100%;
  aspect-ratio: 16 / 9;
  display: block;
  border: 0;
  background: #000;
}
.news-modal h3 {
  font-size: 1.45rem;
  margin: 6px 40px 4px 0;
  line-height: 1.25;
}
.news-modal-body {
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.65;
}
.news-modal-body p { margin: 0 0 12px; }

/* No-JS fallback: plain vertical list */
.news-nojs-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
