/* ===============================
   Mawqif — public site styles
   Theme: White + Mawqif Blue (#055296)
   All hyperlinks: blue + underlined (global rule below)
   =============================== */

:root{
  /* Brand colors */
  --brand-accent: #00539f;
  --brand-accent-soft: rgba(0, 83, 159, 0.08);
  --brand-accent-dark: #003d75;
  --brand-accent-border: #004a8f;
  
  /* Legacy aliases (for backwards compat) */
  --blue: var(--brand-accent);
  --blue-600: #045dac;
  
  /* Surfaces */
  --surface: #ffffff;
  --surface-muted: #f9fafb;
  --surface-dark: var(--brand-accent);
  
  /* Text */
  --text: #0b0b0c;
  --text-muted: #6b7280;
  --text-on-dark: #ffffff;
  --text-on-dark-muted: rgba(255, 255, 255, 0.75);
  
  /* Legacy alias */
  --muted: var(--text-muted);
  --bg: var(--surface);
  
  /* Borders & shadows */
  --border: #e5e7eb;
  --border-on-dark: rgba(255, 255, 255, 0.15);
  --shadow: 0 8px 24px rgba(2, 28, 48, 0.08);
  --radius: 16px;

  /* Nav interaction */
  --nav-hover-bg: rgba(255,255,255,0.07);
  --nav-focus-ring: rgba(255,255,255,0.45);
  --ripple: rgba(255,255,255,0.45);
}

*{ box-sizing:border-box; }

html,body{
  margin:0;
  padding:0;
  background:var(--bg);
  color:var(--text);
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height:1.5;

  /* FIX: stop 100vw breakout from showing side colors */
  overflow-x:hidden;
}

/* Ensure main content paints white edge-to-edge */
main, .page-content{
  background:#fff;
  min-height:100vh;
}

/* Global link rule — required by you */
a{ color:var(--blue); text-decoration:underline; }
a:visited{ color:var(--blue); }
a:hover{ opacity:.9; }
a:focus{ outline:2px solid var(--blue); outline-offset:2px; }

/* Buttons with hover + click animations */
.btn{
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 14px; border-radius:999px; border:1px solid var(--blue);
  background:var(--blue); color:#fff; text-decoration:none;
  transition: transform .12s ease, box-shadow .12s ease, opacity .12s ease;
  cursor:pointer; user-select:none; font-weight:600;
}
.btn:hover{ transform:translateY(-1px); box-shadow:var(--shadow); }
.btn:active{ transform:scale(.98); }
.btn:focus{ outline:2px solid var(--blue); outline-offset:2px; }

/* Layout helpers */
.container{ width:100%; max-width:1220px; margin:0 auto; padding:0 16px; }
.muted{ color:var(--muted); }

/* Header */
.site-header{ border-bottom:none; background:var(--brand-accent); color:var(--text-on-dark); }
.site-header a{ color:var(--text-on-dark); text-decoration:underline; }
.header-row{ display:flex; align-items:center; justify-content:space-between; min-height:64px; gap:16px; }
.brand .logo{ width:140px; height:auto; display:block; user-select:none; pointer-events:none; }
.brand{ transition: transform .12s ease, opacity .12s ease; }
.brand:hover{ opacity:0.9; }
.brand:active{ transform:scale(0.97); }

/* Hide mobile menu elements on desktop */
.menu-toggle{ display:none; }
.menu-close{ display:none; }
.mobile-nav-footer{ display:none; }
.menu-overlay{ display:none; }

/* === NAV: interactive hover/click animations === */
.main-nav{ display:flex; }
.main-nav ul{ display:flex; gap:18px; margin:0; padding:0; list-style:none; }

/* Base link styling (keeps underline as requested) */
/* === NAV: interactive hover/click animations === */
.main-nav .nav-link{
  position:relative;
  display:inline-flex; align-items:center; justify-content:center;
  padding:10px 12px;
  border-radius:12px;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s ease, box-shadow .2s ease, background-color .2s ease;
  outline: none; /* we handle focus-visible below */

  /* REMOVE underline specifically for nav */
  text-decoration: none;
}

/* Subtle glow "pill" on hover */
.main-nav .nav-link::before{
  content:"";
  position:absolute; inset:0;
  border-radius:inherit;
  background: var(--nav-hover-bg);
  opacity:0; transform: scale(.98);
  transition: opacity .2s ease, transform .2s ease;
}
.main-nav .nav-link:hover::before{ opacity:1; transform: scale(1); }

/* Lift on hover + soft shadow */
.main-nav .nav-link:hover{
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0,0,0,.22);
}

/* Press feedback */
.main-nav .nav-link:active{
  transform: translateY(0) scale(.98);
  box-shadow: 0 2px 10px rgba(0,0,0,.18);
}

/* Keyboard focus ring (accessible) */
.main-nav .nav-link:focus-visible{
  box-shadow: 0 0 0 3px var(--nav-focus-ring);
  border-radius:12px;
}

/* Ripple element created by JS */
.nav-ripple{
  position:absolute;
  border-radius:50%;
  transform: translate(-50%, -50%);
  pointer-events:none;
  width:10px; height:10px;
  background: var(--ripple);
  opacity:0.6;
  animation: nav-ripple .5s ease-out forwards;
}
@keyframes nav-ripple{
  to{
    opacity:0;
    width:220px; height:220px;
  }
}

/* Reduce motion preference */
@media (prefers-reduced-motion: reduce){
  .main-nav .nav-link,
  .main-nav .nav-link::before{
    transition:none;
  }
}

/* Ticker */
.ticker{
  display:flex; gap:10px; align-items:center; overflow:hidden;
  padding:10px 16px; border-top:1px solid var(--brand-accent-border); border-bottom:1px solid var(--brand-accent-border);
  background:var(--brand-accent-dark);
}
.badge-live{ background:#ef4444; color:var(--text-on-dark); padding:4px 8px; border-radius:999px; font-size:12px; font-weight:800; }
.ticker-link{ color:var(--text-on-dark-muted); }

/* Hero grid (legacy - not used by new home, but safe to keep) */
.hero-grid{
  display:grid; grid-template-columns: 2fr 1fr; gap:24px; margin:24px 0;
}
.hero-lead{ display:block; }
.hero-img-link{ display:block; border-radius:var(--radius); overflow:hidden; }
.hero-img{
  width:100%; height:auto; display:block;
  aspect-ratio:16/9; object-fit:cover; /* hard restraint */
  max-height:520px;
}
.hero-title{ font-size: clamp(28px, 3.5vw, 46px); line-height:1.1; margin:16px 0 8px; }
.hero-title a{ color:var(--text); }
.hero-dek{ color:#374151; margin:0 0 10px; max-width:75ch; }
.meta{ display:flex; gap:8px; align-items:center; color:var(--muted); font-size:14px; }
.meta a{ color:var(--blue); }

/* Side column (legacy) */
.hero-side{ display:flex; flex-direction:column; gap:20px; }
.now-box, .latest-box{
  border:1px solid var(--border); border-radius:var(--radius); padding:14px; background:#fff; box-shadow: var(--shadow);
}
.now-box h3, .latest-box h3{ margin:0 0 10px; }
.now-video img{
  width:100%; height:auto; display:block; aspect-ratio:16/9; object-fit:cover; border-radius:12px;
}
.latest-list{ list-style:none; margin:0; padding:0; display:grid; gap:10px; }
.latest-list li{ display:flex; align-items:center; justify-content:space-between; gap:10px; }
.latest-list time{ color:var(--muted); font-size:12px; white-space:nowrap; }

/* Cards grid (legacy) */
.cards-grid{
  display:grid; grid-template-columns: repeat(3, 1fr); gap:24px; margin:10px 0 24px;
}
.card{
  border:1px solid var(--border); border-radius:var(--radius); padding:12px;
  background:linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
  box-shadow:var(--shadow);
  display:flex; flex-direction:column; gap:8px; min-height:100%;
  border-left:3px solid var(--blue);
  transition: transform .2s ease, box-shadow .2s ease;
}
.card:hover{
  transform:translateY(-2px);
  box-shadow:0 12px 32px rgba(0,83,159,0.12);
}
.card-img-wrap{ display:block; width:100%; border-radius:12px; overflow:hidden; }
.card-img{
  width:100%; height:auto; display:block;
  aspect-ratio:4/3; object-fit:cover; /* restraint */
}
.card-title{ margin:4px 0; font-size: clamp(18px, 2.2vw, 22px); line-height:1.25; }
.card-title a{ color:var(--text); }
.card-title a:hover{ color:var(--blue); }
.card-excerpt{
  color:#374151; margin:0;
  display:-webkit-box; -webkit-line-clamp:2; line-clamp:2; -webkit-box-orient:vertical; overflow:hidden;
}
.section-divider{ border:0; border-top:1px solid var(--border); margin:24px 0; }

/* Footer */
.site-footer{ background:var(--brand-accent); color:var(--text-on-dark); margin-top:40px; }
.site-footer a{ color:var(--text-on-dark); text-decoration:underline; }
.site-footer a:hover{ opacity:0.9; }
.site-footer h4{ color:var(--text-on-dark); margin:0 0 14px; font-size:18px; font-weight:700; letter-spacing:-0.01em; text-transform:uppercase; }
.site-footer ul{ list-style:none; margin:0; padding:0; }
.site-footer ul li{ margin:8px 0; }
.site-footer ul li a{ font-size:14px; }
.site-footer p{ color:var(--text-on-dark); opacity:0.9; font-size:14px; line-height:1.65; margin:12px 0 0; }
.site-footer .footer-desc{ max-width:320px; }
.footer-grid{ 
  display:grid; 
  grid-template-columns: 1.4fr 1fr 1fr; 
  gap:32px; 
  padding:32px 16px 28px;
  align-items:start;
}
.footer-brand{ display:flex; align-items:center; gap:16px; margin-bottom:12px; flex-wrap:wrap; }
.footer-brand img{ height:34px; width:auto; }
.footer-brand .unesco-link{ display:inline-flex; }
.footer-brand .unesco-logo{ height:28px; width:auto; opacity:0.95; }
.footnote{ border-top:1px solid var(--border-on-dark); padding:14px 16px 20px; }
.footnote p{ margin:0; font-size:13px; opacity:0.8; }

@media (max-width: 768px){
  .footer-grid{ grid-template-columns:1fr; gap:28px; }
  .footer-brand{ margin-bottom:8px; }
}

/* Responsive */
@media (max-width: 1024px){
  .cards-grid{ grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 820px){
  .hero-grid{ grid-template-columns: 1fr; }
  
  /* Mobile menu toggle button */
  .menu-toggle{
    display:flex;
    align-items:center;
    justify-content:center;
    background:transparent;
    border:none;
    color:var(--text-on-dark);
    cursor:pointer;
    padding:8px;
    border-radius:8px;
    transition: background .15s ease;
  }
  .menu-toggle:hover{ background:var(--nav-hover-bg); }
  .menu-toggle:focus{ outline:2px solid var(--nav-focus-ring); outline-offset:2px; }
  
  /* Slide-out menu */
  .main-nav{
    position:fixed;
    top:0;
    right:-280px;
    width:280px;
    height:100vh;
    background:var(--brand-accent);
    z-index:1000;
    display:flex;
    flex-direction:column;
    padding:20px 24px;
    transition: right .3s ease;
    box-shadow: -4px 0 20px rgba(0,0,0,0.3);
  }
  .main-nav.open{ right:0; }
  .main-nav ul{ flex-direction:column; gap:0; padding:16px 0; margin:0; }
  .main-nav ul li{ border-bottom:1px solid var(--border-on-dark); }
  .main-nav ul li:last-child{ border-bottom:none; }
  .main-nav .nav-link{
    display:block;
    padding:14px 0;
    font-size:17px;
  }
  
  /* Close button */
  .menu-close{
    display:block;
    align-self:flex-end;
    background:transparent;
    border:none;
    color:var(--text-on-dark);
    font-size:32px;
    cursor:pointer;
    padding:4px 12px;
    line-height:1;
    border-radius:8px;
    transition: background .15s ease;
  }
  .menu-close:hover{ background:var(--nav-hover-bg); }
  
  /* Mobile nav footer links - override desktop display:none */
  .mobile-nav-footer{
    display:flex !important;
    margin-top:auto;
    padding-top:20px;
    border-top:1px solid var(--border-on-dark);
    flex-direction:column;
    gap:12px;
  }
  .mobile-nav-footer a{
    color:var(--text-on-dark-muted);
    font-size:14px;
  }
  
  /* Overlay */
  .menu-overlay{
    display:block;
    position:fixed;
    inset:0;
    background:rgba(0,0,0,0.5);
    z-index:999;
    opacity:0;
    visibility:hidden;
    transition: opacity .3s ease, visibility .3s ease;
  }
  .menu-overlay.active{
    opacity:1;
    visibility:visible;
  }
}
@media (max-width: 520px){
  .cards-grid{ grid-template-columns: 1fr; }
  .brand .logo{ width:120px; }
}

/* Golden Pen Award Badge */
.golden-pen-badge{
  display:inline-flex;
  align-items:center;
  gap:5px;
  background:linear-gradient(135deg, #fbbf24, #f59e0b);
  color:#78350f;
  font-size:12px;
  font-weight:700;
  padding:4px 10px;
  border-radius:999px;
  text-decoration:none;
  box-shadow:0 2px 8px rgba(245, 158, 11, 0.3);
  transition: transform .12s ease, box-shadow .12s ease;
}
.golden-pen-badge:hover{
  transform:translateY(-1px);
  box-shadow:0 4px 12px rgba(245, 158, 11, 0.4);
  color:#78350f;
}
.golden-pen-badge svg{
  width:12px;
  height:12px;
  fill:#78350f;
}
.golden-pen-badge--large{
  font-size:14px;
  padding:6px 14px;
  gap:6px;
}
.golden-pen-badge--large svg{
  width:16px;
  height:16px;
}

/* Utility: ensure ANY image never blows layout */
img{ max-width:100%; height:auto; }

/* Optional: subtle focus state for cards & hero images */
.card-img-wrap:focus-visible, .hero-img-link:focus-visible{
  outline:3px solid var(--blue); outline-offset:3px;
}

/* ===============================
   HOME (ARIJ-style layout)
   Keep Mawqif colors. Change layout.
   =============================== */

/* FIXED Full-width breakout inside <main class="page-content container">
   (replaces the 100vw + calc() version that causes blue side bleed) */
.home-hero,
.investigations-strip{
  position:relative;
  left:50%;
  right:50%;
  margin-left:-50vw;
  margin-right:-50vw;
  width:100vw;
  background:#fff; /* force white behind these strips */
}

/* Full-width hero with overlay */
.home-hero{ margin-top: 0; }
.hero-feature{
  position:relative;
  border-bottom:1px solid var(--border);
  background:#000;
}
.hero-bg{
  position:relative;
  display:block;
  width:100%;
  height: clamp(380px, 56vh, 620px);
  overflow:hidden;
}
.hero-bg img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transform: scale(1.02);
}
.hero-overlay{
  position:absolute;
  inset:0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,.15) 0%,
    rgba(0,0,0,.55) 55%,
    rgba(0,0,0,.78) 100%
  );
}

.hero-content{
  position:absolute;
  left:0; right:0;
  bottom: 34px;
  z-index:2;
}
.hero-pill-row{ margin-bottom:12px; }

.hero-h{
  margin:0;
  font-size: clamp(34px, 4vw, 56px);
  line-height:1.05;
  letter-spacing:-0.02em;
}
.hero-h a{
  color:#fff;
  text-decoration:none;
}
.hero-h a:hover{ opacity:.95; }

.hero-sub{
  margin: 12px 0 14px;
  max-width: 75ch;
  color: rgba(255,255,255,.88);
  font-size: clamp(14px, 1.2vw, 18px);
  line-height:1.65;
}

.hero-meta{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

/* Pills */
.pill{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .02em;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(0,0,0,.35);
  color: rgba(255,255,255,.92);
  backdrop-filter: blur(10px);
}
.pill-cat{
  background: rgba(0,83,159,.35);
  border-color: rgba(0,83,159,.45);
}
.pill-author{ background: rgba(0,0,0,.35); }
.pill-date{ background: rgba(0,0,0,.35); }

/* Investigations strip */
.investigations-strip{
  padding: 26px 0 34px;
  background: #fff;
}
.strip-head{
  display:flex;
  align-items:center;
  gap:18px;
  margin-bottom: 18px;
}
.strip-title{
  margin:0;
  font-size: 28px;
  font-weight: 900;
  letter-spacing: -.01em;
  color: var(--text);
}
.strip-line{
  height:1px;
  flex:1;
  background: var(--border);
}

/* Stage layout */
.strip-stage{
  display:grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 18px;
  align-items: stretch;
}

/* Cards */
.strip-card{
  position:relative;
  border-radius: 18px;
  overflow:hidden;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  background:#000;
  height: 280px;
  max-height: 280px;
  transition: transform .18s ease, box-shadow .18s ease;
}
.strip-main{ height: 340px; max-height: 340px; }

.strip-link{
  position:relative;
  display:block;
  width:100%;
  height:100%;
  text-decoration:none;
  color:#fff;
}
.strip-link img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
  transform: scale(1.02);
  position:absolute;
  inset:0;
}
.strip-dim{
  position:absolute;
  inset:0;
  background: linear-gradient(
    to bottom,
    rgba(0,0,0,.12) 0%,
    rgba(0,0,0,.45) 60%,
    rgba(0,0,0,.75) 100%
  );
}
.strip-pill{
  position:absolute;
  top: 18px;
  left: 18px;
  z-index:2;
}

/* Text at bottom */
.strip-text{
  position:absolute;
  left: 18px;
  right: 18px;
  bottom: 18px;
  z-index:2;
  display:flex;
  flex-direction:column;
  gap:10px;
}
.strip-text h4{
  margin:0;
  font-size: 20px;
  line-height:1.15;
  letter-spacing:-0.01em;
  color:#fff;
  text-decoration:none;
}
.strip-side .strip-text h4{ font-size: 18px; }

/* Hover feedback */
.strip-card:hover{
  transform: translateY(-2px);
  box-shadow: 0 14px 40px rgba(2, 28, 48, 0.18);
}
.strip-card:active{ transform: translateY(0) scale(.99); }

/* Latest block under strip */
.latest-row{ margin-top: 18px; }
.latest-block{
  border:1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
  box-shadow: var(--shadow);
  background:#fff;
}
.latest-block h3{ margin:0 0 10px; }

/* Make latest list more “newsroom” */
.latest-list li{
  padding: 10px 0;
  border-bottom: 1px solid rgba(229,231,235,.9);
}
.latest-list li:last-child{ border-bottom:0; }

/* ===============================
   ABOUT PAGE
   =============================== */

.about-hero{
  border:1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow:hidden;
  background: #fff;
}

.about-hero-inner{ padding: 28px 22px; }

.about-kicker{
  margin:0 0 8px;
  display:inline-flex;
  padding: 7px 12px;
  border-radius: 999px;
  border:1px solid rgba(0,83,159,.18);
  background: rgba(0,83,159,.06);
  font-weight: 800;
  font-size: 12px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--blue);
}

.about-title{
  margin: 10px 0 10px;
  font-size: clamp(30px, 3.6vw, 46px);
  letter-spacing: -0.02em;
  line-height: 1.08;
}

.about-lede{
  margin: 0;
  max-width: 78ch;
  color: #374151;
  font-size: 16px;
  line-height: 1.8;
}

.about-cta-row{
  display:flex;
  gap:14px;
  align-items:center;
  margin-top: 18px;
  flex-wrap:wrap;
}

.about-link{
  color: var(--blue);
  text-decoration: underline;
  font-weight: 700;
}

.about-grid{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-top: 18px;
}

.about-card{
  border:1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  background:#fff;
  padding: 16px;
}

.about-card h2,
.about-card h3{
  margin: 0 0 8px;
  font-size: 18px;
  letter-spacing: -0.01em;
}

.about-card p{
  margin:0;
  color:#374151;
  line-height:1.75;
}

.about-section{ margin-top: 22px; }

.about-section-head{
  display:flex;
  align-items:center;
  gap:18px;
  margin: 0 0 14px;
}

.about-section-head h2{
  margin:0;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: -.01em;
}

.about-standards{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.about-standard{
  border:1px solid var(--border);
  border-radius: 16px;
  box-shadow: var(--shadow);
  background:#fff;
  padding: 16px;
}

.about-standard h3{
  margin:0 0 8px;
  font-size: 17px;
}

.about-standard p{
  margin:0;
  color:#374151;
  line-height:1.75;
}

.about-two-col{
  display:grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
}

.about-join{
  border:1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  background: #fff;
  padding: 18px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 16px;
  flex-wrap:wrap;
}

.about-join h2{
  margin:0;
  font-size: 22px;
  letter-spacing: -0.01em;
}

.about-join-actions{
  display:flex;
  gap: 14px;
  align-items:center;
  flex-wrap:wrap;
}

@media (max-width: 1024px){
  .about-grid{ grid-template-columns: 1fr; }
  .about-standards{ grid-template-columns: 1fr; }
  .about-two-col{ grid-template-columns: 1fr; }
}

/* Responsive */
@media (max-width: 1024px){
  .strip-stage{ grid-template-columns: 1fr; }
  .strip-main{ min-height: 320px; }
  .strip-side{ min-height: 260px; }
  .hero-content{ bottom: 22px; }
}

@media (max-width: 520px){
  .hero-bg{ height: 420px; }
  .hero-sub{ display:none; }
  .pill{ padding: 7px 12px; }
}
