/* CaDEA - Premium update overrides
   Typography per institutional brief:
   - Titles: Baskerville
   - Subtitles: Georgia
   - Body: Helvetica
*/

:root{
  --serif:'Libre Baskerville','Baskerville','Baskerville Old Face',Georgia,serif;
  --serif-2:Georgia,'Times New Roman',serif;
  --sans:'Helvetica Neue','Helvetica','Arial',sans-serif;
}

body{font-family:var(--sans);font-feature-settings:normal}
h1,h2{font-family:var(--serif);font-weight:700;letter-spacing:-.01em}
h3,h4{font-family:var(--serif-2);font-weight:700}
.brand .name{font-family:var(--serif)}

/* Cameroon flag accent */
.cm-flag{
  display:inline-block;width:24px;height:16px;border-radius:2px;
  background:linear-gradient(to right,#0a7a3b 33.33%,#cc0000 33.33% 66.66%,#fcd116 66.66%);
  position:relative;border:1px solid rgba(0,0,0,.1);vertical-align:middle;
}
.cm-flag::after{
  content:"";position:absolute;left:50%;top:50%;width:6px;height:6px;
  transform:translate(-50%,-50%);
  background:#fcd116;
  clip-path:polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
}
.flag{
  width:24px;height:16px;
  background:linear-gradient(to right,#0a7a3b 33.33%,#cc0000 33.33% 66.66%,#fcd116 66.66%);
  border-radius:2px;border:1px solid rgba(255,255,255,.25);position:relative;
}
.flag::after{
  content:"";position:absolute;left:50%;top:50%;width:6px;height:6px;
  transform:translate(-50%,-50%);
  background:#fcd116;
  clip-path:polygon(50% 0%,61% 35%,98% 35%,68% 57%,79% 91%,50% 70%,21% 91%,32% 57%,2% 35%,39% 35%);
}

/* Compact menu (no wrap) */
.menu > a, .menu .has-sub > button{
  padding:11px 11px;font-size:.88rem;white-space:nowrap;
}
.cta{padding:11px 16px;font-size:.85rem;white-space:nowrap}

/* ===== HERO SLIDESHOW ===== */
.hero-slideshow{
  position:absolute;inset:0;z-index:0;overflow:hidden;
}
.hero-slideshow .slide{
  position:absolute;inset:0;
  background-size:cover;background-position:center;
  opacity:0;transition:opacity 1.2s ease;
}
.hero-slideshow .slide.active{opacity:.32}
.hero-slideshow::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,rgba(8,40,72,.55) 0%,rgba(14,58,102,.85) 100%);
  pointer-events:none;
}
.hero .container{position:relative;z-index:2}

/* Text alternation - rotating institutional message */
.hero-rotator{position:relative;min-height:1.2em;display:inline-block}
.hero-rotator span{
  display:inline-block;opacity:0;position:absolute;left:0;top:0;
  transition:opacity .8s ease, transform .8s ease;
  transform:translateY(8px);
  white-space:nowrap;
}
.hero-rotator span.active{opacity:1;transform:translateY(0);position:relative}

/* ===== GALLERY ===== */
.gallery{
  display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:30px;
}
.gallery.two{grid-template-columns:repeat(2,1fr)}
.gallery a{
  display:block;border-radius:12px;overflow:hidden;
  background:#000;position:relative;aspect-ratio:4/3;
  box-shadow:0 8px 22px rgba(8,40,72,.12);
  transition:transform .35s cubic-bezier(.2,.8,.2,1), box-shadow .35s;
}
.gallery a:hover{transform:translateY(-4px);box-shadow:var(--shadow)}
.gallery img{
  width:100%;height:100%;object-fit:cover;display:block;
  transition:transform .6s ease, opacity .3s ease;
}
.gallery a:hover img{transform:scale(1.04)}
.gallery a::after{
  content:"";position:absolute;inset:0;
  background:linear-gradient(180deg,transparent 60%,rgba(8,40,72,.4) 100%);
  opacity:0;transition:opacity .3s;
}
.gallery a:hover::after{opacity:1}
@media (max-width:760px){
  .gallery,.gallery.two{grid-template-columns:repeat(2,1fr)}
}
@media (max-width:480px){
  .gallery,.gallery.two{grid-template-columns:1fr}
}

/* Lightbox */
.lightbox{
  position:fixed;inset:0;background:rgba(8,15,28,.92);z-index:9999;
  display:none;align-items:center;justify-content:center;padding:30px;
}
.lightbox.open{display:flex;animation:fadeIn .25s ease}
@keyframes fadeIn{from{opacity:0}to{opacity:1}}
.lightbox img{
  max-width:92vw;max-height:88vh;border-radius:8px;
  box-shadow:0 30px 80px rgba(0,0,0,.6);
}
.lightbox .lb-close{
  position:absolute;top:24px;right:28px;background:none;border:0;color:#fff;cursor:pointer;
  font-size:2rem;line-height:1;padding:8px;
}

/* Highlighted event card with image */
.event-card{
  display:grid;grid-template-columns:1.4fr 1fr;gap:30px;align-items:center;
  background:#fff;border:1px solid var(--line);border-radius:var(--radius-lg);
  padding:34px;margin:30px 0;transition:.3s;
}
.event-card:hover{box-shadow:var(--shadow)}
.event-card .visual{
  border-radius:var(--radius);overflow:hidden;aspect-ratio:4/5;
  background:#000;
}
.event-card .visual img{width:100%;height:100%;object-fit:cover}
.event-card .body h3{font-size:1.4rem;margin:6px 0 14px;font-family:var(--serif)}
.event-card .body p{color:var(--ink-2);font-family:var(--sans);font-size:.95rem;line-height:1.7}
@media (max-width:820px){
  .event-card{grid-template-columns:1fr;padding:24px}
  .event-card .visual{aspect-ratio:16/10;max-height:320px}
}

/* ===== CONTACT ICONS ===== */
.info-block{display:flex;gap:16px;align-items:flex-start}
.info-block .ico{
  flex:0 0 44px;width:44px;height:44px;border-radius:12px;
  background:linear-gradient(135deg,var(--navy),var(--navy-3));
  color:var(--gold);display:grid;place-items:center;
}
.info-block .ico svg{width:22px;height:22px}
.info-block .body{flex:1}
.info-block .body b{font-family:var(--serif-2);color:var(--navy);display:block;margin-bottom:4px;font-size:.95rem}
.info-block .body span,.info-block .body a{color:var(--ink-2);font-size:.92rem;font-family:var(--sans)}

/* ===== NEWS TICKER ===== */
.news-ticker{
  background:#fff;border:1px solid var(--line);border-radius:var(--radius);
  overflow:hidden;
}
.news-ticker .tk-head{
  display:flex;align-items:center;gap:14px;padding:14px 22px;
  border-bottom:1px solid var(--line);background:var(--bg-soft);
}
.news-ticker .tk-head b{
  font-family:var(--serif-2);color:var(--navy);font-size:.95rem;
  display:inline-flex;align-items:center;gap:8px;
}
.news-ticker .tk-head .live{
  display:inline-flex;align-items:center;gap:6px;
  font-size:.7rem;color:var(--red);font-weight:700;text-transform:uppercase;letter-spacing:.1em;
  background:rgba(200,16,46,.08);padding:3px 10px;border-radius:999px;
}
.news-ticker .tk-head .live::before{
  content:"";width:7px;height:7px;border-radius:50%;background:var(--red);
  animation:livePulse 1.6s ease-in-out infinite;
}
@keyframes livePulse{0%,100%{opacity:1}50%{opacity:.3}}
.news-ticker .tk-feed{padding:6px 0;max-height:560px;overflow-y:auto}
.news-ticker .tk-item{
  display:block;padding:16px 22px;border-bottom:1px solid var(--line-2);
  transition:background .2s;
}
.news-ticker .tk-item:hover{background:var(--bg-soft)}
.news-ticker .tk-item:last-child{border-bottom:0}
.news-ticker .tk-item .src{
  font-size:.7rem;color:var(--gold-2);font-weight:700;text-transform:uppercase;letter-spacing:.08em;
  display:inline-block;margin-bottom:5px;
}
.news-ticker .tk-item h4{
  margin:0 0 4px;font-family:var(--serif-2);font-size:.96rem;color:var(--navy);font-weight:600;
  line-height:1.4;
}
.news-ticker .tk-item p{
  margin:0;font-size:.83rem;color:var(--muted);line-height:1.5;
}
.news-ticker .tk-foot{
  padding:10px 22px;font-size:.74rem;color:var(--muted);text-align:center;
  border-top:1px solid var(--line-2);background:var(--bg-soft);
}

/* ===== DASHBOARD live counters ===== */
.live-stat{
  display:flex;align-items:flex-end;gap:10px;margin-top:6px;
}
.live-stat .arrow{
  font-size:.78rem;font-weight:700;color:var(--green);
  display:inline-flex;align-items:center;gap:3px;margin-bottom:8px;
}
.live-stat .arrow.down{color:var(--red)}
.live-stat .arrow svg{width:12px;height:12px}

/* Sparkline */
.spark{display:block;width:100%;height:48px;margin-top:10px}

/* Top pages list */
.toppages{list-style:none;padding:0;margin:10px 0 0}
.toppages li{
  display:flex;align-items:center;gap:14px;padding:10px 0;
  border-bottom:1px solid var(--line-2);font-size:.9rem;
}
.toppages li:last-child{border-bottom:0}
.toppages .pn{
  flex:0 0 26px;height:26px;border-radius:50%;background:var(--bg-soft);
  display:grid;place-items:center;font-family:var(--serif-2);font-weight:700;font-size:.78rem;color:var(--navy);
}
.toppages .nm{flex:1;color:var(--ink-2);font-family:var(--sans)}
.toppages .vl{font-weight:700;color:var(--navy);font-family:var(--serif-2)}

/* Engagement gauge */
.gauge{position:relative;height:120px;display:grid;place-items:center;margin:8px 0}
.gauge svg{width:200px;height:120px}
.gauge .gv{position:absolute;font-family:var(--serif);font-size:1.8rem;color:var(--navy);font-weight:700;bottom:0}
.gauge .gv small{display:block;font-family:var(--sans);font-size:.7rem;color:var(--muted);font-weight:500;text-align:center;text-transform:uppercase;letter-spacing:.06em}

/* Partners refined */
.partner img{
  max-height:44px;max-width:140px;object-fit:contain;display:block;
}
.partner.with-img{padding:14px 24px;height:auto;min-height:90px}
.partner.with-img small{margin-top:8px}

/* Section reveal scroll */
.reveal{will-change:opacity, transform}
