/* Media V4 — page-scoped styling (keeps main.css global tokens intact) */

.a-hero--mediaV4{
  position: relative;
  overflow: hidden;
}

/* keep your existing hero V3 look, but allow minor spacing tuning */
.a-hero--mediaV4 .a-heroV3__content{
  padding-top: clamp(4.2rem, 5.2vw, 5.8rem);
}

/* section navigation rail */
.a-pageNavWrap{
  position: sticky;
  top: calc(var(--a-header-h) + 8px);
  z-index: 90;
  margin-top: -1rem;
  margin-bottom: .55rem;
}
.a-pageNav{
  display:flex;
  gap: .45rem;
  flex-wrap: wrap;
  padding: .4rem;
  border-radius: 999px;
  background: rgba(255,255,255,.93);
  border: 1px solid rgba(11,44,72,.10);
  box-shadow: 0 10px 24px rgba(12,36,59,.10);
  backdrop-filter: blur(6px);
}
.a-pageNav a{
  display:inline-flex;
  align-items:center;
  padding: .35rem .7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-size: .82rem;
  font-weight: 850;
  color: rgba(11,44,72,.78);
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.a-pageNav button{
  display:inline-flex;
  align-items:center;
  padding: .35rem .7rem;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  font-size: .82rem;
  font-weight: 850;
  color: rgba(11,44,72,.78);
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.a-pageNav a:hover,
.a-pageNav a:focus-visible,
.a-pageNav button:hover,
.a-pageNav button:focus-visible{
  color: #175cdd;
  background: rgba(23,92,221,.09);
  border-color: rgba(23,92,221,.16);
}

/* Highlights */
.a-mediaHighlights{
  padding: .85rem 0 .75rem;
  background: #f7fbff;
}
.a-mediaHighlights__head{
  padding: 0 0 .55rem;
}

.a-mediaHighlights__grid{
  display:grid;
  gap: 12px;
  grid-template-columns: 1fr;
}
@media (min-width: 992px){
  .a-mediaHighlights__grid{ grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

/* Card (local, no logo use) */
.a-hCard{
  background: rgba(255,255,255,.96);
  border: 1px solid rgba(11,44,72,.10);
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(12, 36, 59, .08);
  padding: 14px 14px;
  text-decoration: none;
  color: inherit;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.a-hCard:hover{
  transform: translateY(-2px);
  border-color: rgba(23,92,221,.18);
  box-shadow: 0 18px 44px rgba(12, 36, 59, .10);
}
.a-hCard__top{ display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom: 8px; }
.a-hCard__k{ font-weight: 950; color:#0b2c48; display:flex; align-items:center; gap:8px; }
.a-badgeInit{
  width: 28px; height: 28px;
  border-radius: 10px;
  display:flex; align-items:center; justify-content:center;
  font-weight: 950;
  background: rgba(11,44,72,.06);
  border: 1px solid rgba(11,44,72,.14);
  color:#0b2c48;
}
.a-hCard__t{ font-weight: 950; line-height: 1.2; margin: 0 0 6px 0; }
.a-hCard__s{ color: rgba(11,44,72,.74); font-weight:650; margin: 0; }
.a-hCard__d{ color: rgba(11,44,72,.60); font-weight:800; font-size:.88rem; }

/* Main section */
.a-mediaGridSection{
  padding: .7rem 0 2.4rem;
  background: #f7fbff;
}

/* Panels (local component) */
.a-panel{
  background:#fff;
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(12, 36, 59, .10);
  border: 1px solid rgba(11,44,72,.08);
  overflow:hidden;
}
.a-panel__head{
  display:flex; justify-content:space-between; align-items:flex-start; gap:14px;
  padding: 14px 16px 10px;
  border-bottom: 1px solid rgba(11,44,72,.08);
}
.a-panel__foot{
  padding: 12px 16px;
  border-top: 1px solid rgba(11,44,72,.08);
  display:flex; gap:10px; flex-wrap:wrap;
}

.a-kicker{ font-size:.78rem; letter-spacing:.12em; font-weight:900; text-transform:uppercase; color: rgba(11,44,72,.70); }
.a-divider{ height:1px; background: rgba(11,44,72,.08); margin: 14px 0; }
.a-subhead{ padding: 12px 18px 0; display:flex; gap:10px; align-items:center; flex-wrap:wrap; }
.a-filterRow{ min-width: 180px; }

.a-empty{
  border-radius: 16px;
  border: 1px solid rgba(17,24,39,.10);
  background: rgba(245,248,250,.75);
  padding: .9rem 1rem;
  color: rgba(17,24,39,.70);
  font-weight: 700;
}

/* Ticker */
.a-tickerWrap { background: #071b2e; border-bottom: 1px solid rgba(255,255,255,.08); }
.a-ticker{
  display:flex; gap:12px; align-items:center;
  padding: 12px 14px; border-radius: 14px;
  background: rgba(255,255,255,.08);
  box-shadow: 0 12px 30px rgba(0,0,0,.20);
  margin: -10px 0 12px;
}
.a-ticker__label{
  display:flex; align-items:center; gap:8px;
  color:#fff; font-weight:800;
  padding:8px 12px; border-radius: 999px;
  background: rgba(25,198,167,.18);
  border:1px solid rgba(25,198,167,.25);
  white-space: nowrap;
}
.a-ticker__viewport{
  position: relative;
  overflow: hidden;
  flex: 1;
  mask-image: linear-gradient(90deg, transparent 0, #000 8%, #000 92%, transparent 100%);
}
.a-ticker__track{
  display:flex;
  width: max-content;
  animation: aTicker 120s linear infinite;
}
.a-ticker__track.is-paused{ animation-play-state: paused; }
.a-ticker__track > a, .a-ticker__track > div{
  display:inline-flex; align-items:center; gap:10px;
  color:#f8fbff; text-decoration:none;
  padding: 7px 12px; margin-right: 10px;
  border-radius: 999px;
  background: rgba(13,39,63,.62);
  border: 1px solid rgba(255,255,255,.16);
  white-space: nowrap;
  max-width: 680px;
}
.a-ticker__track > a:hover{
  background: rgba(16,56,89,.88);
}
.a-ticker__src{
  font-weight:900;
  opacity:.96;
  font-size: .76rem;
  letter-spacing: .05em;
  text-transform: uppercase;
  color: #9fe7ff;
}
.a-ticker__title{
  opacity:.92;
  overflow: hidden;
  text-overflow: ellipsis;
}
.a-ticker__date{ opacity:.76; font-size:.86rem; }
.a-ticker__btn{
  border:1px solid rgba(255,255,255,.24);
  background: rgba(13,39,63,.62);
  color:#fff; border-radius: 10px;
  padding: 8px 12px; font-weight:800;
}
@keyframes aTicker { from { transform: translateX(0);} to { transform: translateX(-50%);} }

/* Gallery */
.a-mediaMasonry{
  display:grid; gap: 12px; padding: 16px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (min-width: 992px){
  .a-mediaMasonry{ grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.a-mediaTile{
  border:0; padding:0; text-align:left; background: transparent;
  position:relative; border-radius: 16px; overflow:hidden;
  cursor:pointer; min-height: 210px;
}
.a-mediaTile__img img{ width:100%; height:100%; object-fit:cover; display:block; }
.a-mediaTile__overlay{ position:absolute; inset:0; background: linear-gradient(180deg, rgba(0,0,0,.02), rgba(0,0,0,.62)); }
.a-mediaTile__content{ position:absolute; inset:auto 12px 12px 12px; color:#fff; }
.a-mediaTile__chips{ display:flex; gap:8px; flex-wrap:wrap; margin-bottom:8px; }
.a-mediaTile__title{ font-size: 1.02rem; font-weight: 900; margin:0; }

/* Feeds */
.a-feedList{ padding: 12px 14px; display:grid; gap: 12px; }
.a-intelTabs .a-feedList{
  max-height: 560px;
  overflow: auto;
  scrollbar-width: thin;
}
.a-feedItem{
  padding: 12px 12px;
  border-radius: 14px;
  border: 1px solid rgba(11,44,72,.10);
  background: #fff;
}
.a-feedItem__top{ display:flex; justify-content:space-between; align-items:center; gap:10px; margin-bottom:8px; }
.a-feedItem__date{ color: rgba(11,44,72,.65); font-weight:700; font-size:.92rem; }
.a-feedItem__title{ display:block; font-weight: 900; text-decoration:none; margin-bottom:6px; color:#0b2c48; }
.a-feedItem__sum{ color: rgba(11,44,72,.75); font-weight:600; }

/* Signals layout */
.a-signalsGridSimple{
  display:grid;
  gap: 14px;
  grid-template-columns: 1fr;
}
@media (min-width: 992px){
  .a-signalsGridSimple{ grid-template-columns: 1fr 1.25fr; }
}
.a-dir{
  border: 1px solid rgba(11,44,72,.10);
  border-radius: 16px;
  overflow:hidden;
  background: rgba(245,248,250,.55);
}
.a-dir__head{
  padding: 10px 12px;
  font-weight: 950;
  background: rgba(11,44,72,.04);
  border-bottom: 1px solid rgba(11,44,72,.08);
}
.a-dir__list{ padding: 10px; display:grid; gap:8px; max-height: 520px; overflow:auto; }
.a-dirBtn{
  width:100%;
  border-radius: 14px;
  border: 1px solid rgba(17,24,39,.10);
  background: rgba(255,255,255,.88);
  padding: 10px 10px;
  display:flex; align-items:flex-start; justify-content:space-between; gap:10px;
  text-align:left;
  font-weight: 900;
}
.a-dirBtn:hover{ background: #fff; }
.a-dirBtn.is-active{
  border-color: rgba(23,92,221,.22);
  background: rgba(23,92,221,.06);
}
.a-dirBtn__left{ display:flex; align-items:flex-start; gap:10px; }
.a-dirBtn__meta{ font-weight: 800; color: rgba(11,44,72,.62); font-size:.85rem; padding-top: 4px; }
.a-dirBtn__sub{ font-weight: 700; color: rgba(11,44,72,.60); font-size: .82rem; line-height: 1.2; margin-top: 2px; }

.a-viewer{
  border: 1px solid rgba(11,44,72,.10);
  border-radius: 16px;
  overflow:hidden;
  background: #fff;
}
.a-viewer__top{
  display:flex; justify-content:space-between; align-items:center; gap:10px;
  padding: 10px 12px;
  background: rgba(11,44,72,.04);
  border-bottom: 1px solid rgba(11,44,72,.08);
}
.a-viewer__title{ display:flex; align-items:center; gap:10px; font-weight: 950; color:#0b2c48; }
.a-viewer__actions{ display:flex; gap:8px; flex-wrap:wrap; }
.a-viewer__body{ padding: 10px; background: rgba(245,248,250,.55); }
.a-stage{
  border-radius: 16px;
  overflow:hidden;
  border: 1px solid rgba(17,24,39,.10);
  background: rgba(255,255,255,.92);
  padding: 10px;
}
.a-stage iframe{ width:100% !important; }
.a-xBoard{
  border-radius: 16px;
  border: 1px solid rgba(17,24,39,.10);
  background: linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,250,255,.96));
  padding: 8px;
}
.a-xBoardGrid{
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 860px){
  .a-xBoardGrid{ grid-template-columns: 1fr 1fr; }
}
.a-xCard{
  border: 1px solid rgba(11,44,72,.10);
  border-radius: 12px;
  padding: 7px 9px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(12,36,59,.04);
}
.a-xCard__title{
  display: block;
  color: #0b2c48;
  text-decoration: none;
  font-weight: 800;
  font-size: .9rem;
  line-height: 1.24;
  min-height: 2.1em;
}
.a-xCard__title:hover{ text-decoration: underline; }
.a-xCard__sum{
  margin-top: 2px;
  color: rgba(11,44,72,.74);
  font-weight: 600;
  font-size: .8rem;
  line-height: 1.2;
  max-height: 2.2em;
  overflow: hidden;
}
.a-xCard__metaLine{
  font-size: .76rem;
  font-weight: 780;
  color: rgba(11,44,72,.65);
  margin-bottom: 2px;
}
.a-xCard__metaLine i,
.a-xMini__metaLine i{
  margin-right: 4px;
  color: #0b2c48;
}
.a-xFeedItem{
  border-color: rgba(23,92,221,.16);
  box-shadow: inset 0 0 0 1px rgba(23,92,221,.05);
}
.a-xMini{
  padding: 9px 10px;
  border-radius: 12px;
}
.a-xMini__metaLine{
  color: rgba(11,44,72,.68);
  font-size: .78rem;
  font-weight: 760;
  margin-bottom: 1px;
}
.a-xMini__title{
  margin-bottom: 2px;
  font-size: .89rem;
  line-height: 1.2;
}
.a-xMini__sum{
  font-size: .8rem;
  line-height: 1.2;
}
.a-xStream{
  max-height: 360px;
  overflow: auto;
}

.a-signalHint{
  padding: 18px 16px;
  border-radius: 16px;
  border: 1px dashed rgba(11,44,72,.18);
  background: rgba(245,248,250,.8);
}
.a-signalHint__title{ font-weight: 950; color:#0b2c48; margin-bottom:6px; }
.a-signalHint__sub{ color: rgba(11,44,72,.74); font-weight:650; }

/* YouTube shell */
.a-ytShell{
  border: 1px solid rgba(11,44,72,.10);
  border-radius: 16px;
  background: rgba(255,255,255,.92);
  overflow:hidden;
}
.a-ytShell__tabs{
  display:flex;
  gap:8px;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(11,44,72,.08);
  align-items:center;
  flex-wrap:wrap;
}
.a-ytTab{
  border: 1px solid rgba(17,24,39,.10);
  background: rgba(245,248,250,.65);
  color: #0b2c48;
  font-weight: 900;
  border-radius: 999px;
  padding: 6px 10px;
}
.a-ytTab.is-active{
  background: rgba(23,92,221,.10);
  border-color: rgba(23,92,221,.22);
}
.a-ytShell__grid{
  display:grid;
  gap: 12px;
  padding: 12px;
  grid-template-columns: 1fr;
}
.a-ytList{
  max-height: 540px;
  overflow: auto;
  padding-right: 2px;
}
@media (min-width: 992px){
  .a-ytShell__grid{ grid-template-columns: 1.2fr .8fr; }
}
.a-ytPane{ display:none; }
.a-ytPane.is-active{
  display:grid;
  gap: 10px;
  grid-template-columns: 1fr;
}
@media (min-width: 992px){
  .a-ytPane.is-active{ grid-template-columns: 1fr 1fr; }
}
.a-ytPane .a-ytItem{
  padding: 10px 10px;
  border-radius: 12px;
}
.a-ytPane .a-ytItem .a-feedItem__title{
  font-size: .92rem;
  line-height: 1.25;
  margin-bottom: 2px;
}
.a-ytPane .a-ytItem .a-feedItem__sum{
  font-size: .82rem;
  line-height: 1.25;
  max-height: 2.5em;
  overflow: hidden;
}

.a-intelTabs .nav-link{
  border-radius: 999px;
  font-weight: 820;
  color: rgba(11,44,72,.78);
  border: 1px solid rgba(17,24,39,.10);
  background: rgba(255,255,255,.86);
}
.a-intelTabs .nav-link.active{
  color: #fff;
  background: linear-gradient(90deg, #0b2c48, #175cdd);
  border-color: transparent;
}

/* Lightbox + Modal */
.a-lightbox{ position:fixed; inset:0; display:none; background: rgba(0,0,0,.60); z-index: 9999; padding: 24px; }
.a-lightbox.is-open{ display:flex; align-items:center; justify-content:center; }
.a-lightbox__panel{ max-width: 980px; width: 100%; background:#fff; border-radius: 18px; overflow:hidden; }
.a-lightbox__top{ display:flex; justify-content:space-between; align-items:center; padding: 12px 14px; border-bottom:1px solid rgba(11,44,72,.10); }
.a-lightbox__btn{ border:0; background: transparent; font-size: 1.6rem; font-weight: 900; }
.a-lightbox__img{ width:100%; height:auto; display:block; }

.a-modal{
  position: fixed;
  inset: 0;
  display: none;
  background: rgba(11,44,72,.58);
  z-index: 999999;
  padding: 18px;
  align-items: center;
  justify-content: center;
}
.a-modal.is-open{ display:flex; }
.a-modal__panel{
  width: min(920px, 96vw);
  background: rgba(255,255,255,.96);
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 28px 70px rgba(0,0,0,.28);
  overflow: hidden;
}
.a-modal__top{
  display:flex; justify-content:space-between; align-items:center;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(17,24,39,.08);
  background: linear-gradient(180deg, #f7fafc, #ffffff);
}
.a-modal__title{ font-weight: 950; color: #0b2c48; margin: 0; }
.a-modal__close{
  width: 44px; height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(17,24,39,.10);
  background: rgba(255,255,255,.92);
  font-weight: 950;
  font-size: 1.4rem;
}
.a-form{ padding: 16px; }
body.a-modalOpen{ overflow: hidden; }

#aighap-action,
#signals,
#intelligence{
  scroll-margin-top: calc(var(--a-header-h) + 74px);
}
#aighap-action.g-4,
#signals.g-4,
#intelligence.g-4{
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
}
.a-mediaGridSection .row.g-4{
  --bs-gutter-x: 1rem;
  --bs-gutter-y: 1rem;
}

@media (max-width: 991.98px){
  .a-pageNavWrap{
    position: static;
    margin-top: .45rem;
  }
  .a-pageNav{
    border-radius: 16px;
  }
}

/* If reveal/AOS is not running, never hide content */
.a-reveal,
[data-reveal],
.reveal-up, .reveal-left, .reveal-right {
  opacity: 1 !important;
  transform: none !important;
}

/* Ensure hero content layers above gradient */
.a-hero--mediaV4 { position: relative; }
.a-heroV3__bg { position:absolute; inset:0; z-index:0; }
.a-heroV3__content { position:relative; z-index:2; }
