/* ============================================================
   NATIONAL MEMORIAL — Sacred page for Israel's wars + terror
   Dark, somber, gold accents, never frivolous
   ============================================================ */

.nm-body{
  background: linear-gradient(180deg, #12192e 0%, #1a2440 50%, #12192e 100%) !important;
  color: #f0e2b8 !important;
  min-height: 100vh;
}
.nm-body .topbar{
  background: linear-gradient(180deg, rgba(18,25,46,.95), rgba(26,36,64,.88)) !important;
  border-bottom: 1px solid rgba(212,176,122,.35);
}
.nm-body .topbar a, .nm-body .nav a, .nm-body .brand-main, .nm-body .brand-sub{
  color: #f0e2b8 !important;
}
.nm-body .topbar .star{
  background: rgba(241,213,151,.14) !important;
  color: #f1d597 !important;
}

.nm-main{
  max-width: 1280px;
  margin: 0 auto;
  padding: clamp(20px, 3vw, 40px);
}

/* ─── Hero ─────────────────────────────────────────── */
.nm-hero{
  position: relative;
  text-align: center;
  padding: clamp(40px, 6vw, 80px) clamp(20px, 3vw, 40px);
  border-radius: clamp(20px, 2vw + 14px, 32px);
  background:
    radial-gradient(ellipse 60% 80% at 50% 0%, rgba(241,213,151,.28), transparent 55%),
    radial-gradient(ellipse 40% 60% at 80% 20%, rgba(212,176,122,.15), transparent 50%),
    linear-gradient(180deg, rgba(18,25,46,.5), rgba(26,36,64,.35));
  border: 1px solid rgba(212,176,122,.35);
  overflow: hidden;
  margin-bottom: 30px;
}
.nm-hero-glow{
  position: absolute;
  inset: -10%;
  background:
    radial-gradient(ellipse 50% 50% at 50% 50%, rgba(255,200,100,.22), transparent 55%);
  pointer-events: none;
  filter: blur(50px);
  animation: hero-breathe 14s ease-in-out infinite;
}

/* Eternal flame in center */
.nm-hero-flame{
  width: 80px;
  height: 100px;
  margin: 0 auto 20px;
  position: relative;
}
.nm-hero-flame::before{
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 28px;
  height: 70px;
  background: linear-gradient(180deg, #f5e3b0, #b8935a);
  border-radius: 4px 4px 6px 6px;
  box-shadow: inset -4px 0 8px rgba(0,0,0,.25);
}
.nm-hero-flame span{
  position: absolute;
  bottom: 65px;
  left: 50%;
  transform: translateX(-50%);
  width: 26px;
  height: 40px;
  background: radial-gradient(ellipse at center bottom, #fffaeb 0%, #ffd66e 30%, #ff7a18 70%, transparent 100%);
  border-radius: 50% 50% 35% 35%;
  box-shadow: 0 0 32px rgba(255,180,80,.7), 0 0 64px rgba(255,140,60,.5);
  animation: flame-flicker 1.6s ease-in-out infinite, flame-sway 3.4s ease-in-out infinite;
  transform-origin: 50% 100%;
}

.nm-tag{
  display: inline-block;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  background: rgba(212,176,122,.15);
  color: #f1d597;
  padding: 5px 14px;
  border-radius: 100px;
  border: 1px solid rgba(212,176,122,.3);
  font-weight: 700;
  margin-bottom: 14px;
}

.nm-title{
  font-family: var(--serif);
  font-size: clamp(32px, 4vw + 16px, 56px);
  margin: 8px 0 14px;
  line-height: 1.1;
  position: relative;
  z-index: 1;
}
.nm-title .kz-vocalized{
  background: linear-gradient(180deg, #fff8e0 0%, #f1d597 40%, #d4b07a 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: inherit !important;
}

.nm-lead{
  max-width: 720px;
  margin: 0 auto;
  color: rgba(240,226,184,.92);
  font-size: clamp(14px, 1.2vw + 8px, 17px);
  line-height: 1.7;
  position: relative;
  z-index: 1;
}

.nm-hero-stats{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  max-width: 540px;
  margin: 30px auto 0;
  position: relative;
  z-index: 1;
}
.nm-hero-stats > div{
  text-align: center;
  padding: 14px;
  background: rgba(212,176,122,.06);
  border: 1px solid rgba(212,176,122,.18);
  border-radius: 14px;
}
.nm-hero-stats strong{
  display: block;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  color: #f1d597;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
.nm-hero-stats span{
  display: block;
  font-size: 12px;
  color: rgba(233,213,160,.6);
  margin-top: 4px;
  letter-spacing: .04em;
}
@media (max-width: 520px){
  .nm-hero-stats{ grid-template-columns: 1fr; }
}

/* ─── Tabs ─────────────────────────────────────────── */
.nm-tabs{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 16px;
  background: rgba(212,176,122,.04);
  border: 1px solid rgba(212,176,122,.18);
  border-radius: 100px;
  margin-bottom: 26px;
  position: sticky;
  top: 70px;
  z-index: 20;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}
.nm-tab{
  background: transparent;
  border: 1px solid transparent;
  color: rgba(233,213,160,.7);
  padding: 8px 16px;
  border-radius: 100px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  cursor: pointer;
  transition: all .25s var(--ease-spring, cubic-bezier(.34,1.56,.64,1));
  white-space: nowrap;
}
.nm-tab:hover{
  background: rgba(212,176,122,.1);
  color: #f1d597;
  transform: translateY(-2px);
}
.nm-tab.is-active{
  background: linear-gradient(135deg, var(--gold-2, #D4B07A), var(--gold, #B8935A));
  color: #0a1124;
  border-color: #f1d597;
  box-shadow: 0 6px 16px rgba(184,147,90,.3);
}

/* ─── Wars list ────────────────────────────────────── */
.nm-wars{
  display: flex;
  flex-direction: column;
  gap: 60px;
}

.nm-war{
  position: relative;
  background:
    radial-gradient(ellipse 60% 80% at 0% 0%, rgba(212,176,122,.08), transparent 60%),
    linear-gradient(180deg, rgba(13,22,51,.7), rgba(10,17,36,.8));
  border: 1px solid rgba(212,176,122,.2);
  border-radius: clamp(20px, 2vw + 14px, 28px);
  overflow: hidden;
  scroll-margin-top: 100px;
}

.nm-war-header{
  position: relative;
  padding: clamp(28px, 4vw + 12px, 48px);
  text-align: center;
  border-bottom: 1px solid rgba(212,176,122,.15);
  overflow: hidden;
}
.nm-war-header::before{
  content: "";
  position: absolute;
  top: -40px;
  inset-inline-end: -40px;
  width: 200px;
  height: 200px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,176,122,.18), transparent 60%);
  filter: blur(40px);
  pointer-events: none;
}
.nm-war-emblem{
  font-size: clamp(40px, 4vw + 16px, 56px);
  margin-bottom: 12px;
  display: inline-block;
}
.nm-war-name{
  font-family: var(--serif);
  font-size: clamp(28px, 3vw + 14px, 42px);
  font-weight: 700;
  margin: 0 0 8px;
  background: linear-gradient(180deg, #fff8e0, #d4b07a);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  line-height: 1.1;
}
.nm-war-dates{
  font-size: 14px;
  color: rgba(233,213,160,.6);
  letter-spacing: .04em;
  margin-bottom: 18px;
}
.nm-war-summary{
  max-width: 640px;
  margin: 0 auto 20px;
  font-size: 15px;
  line-height: 1.7;
  color: rgba(233,213,160,.85);
}
.nm-war-stats{
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 16px;
}
.nm-war-stat{
  background: rgba(212,176,122,.08);
  border: 1px solid rgba(212,176,122,.2);
  border-radius: 12px;
  padding: 10px 18px;
  font-size: 13px;
  color: rgba(233,213,160,.75);
}
.nm-war-stat strong{
  display: block;
  color: #f1d597;
  font-size: 22px;
  font-family: var(--serif);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

/* Action buttons */
.nm-war-actions{
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 24px;
}
.nm-war-btn{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 100px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14px;
  cursor: pointer;
  transition: transform .25s var(--ease-spring), box-shadow .25s;
  border: none;
}
.nm-war-btn-primary{
  background: linear-gradient(135deg, var(--gold-2, #D4B07A), var(--gold, #B8935A));
  color: #0a1124;
  box-shadow: 0 8px 20px rgba(184,147,90,.3);
}
.nm-war-btn-secondary{
  background: rgba(255,255,255,.06);
  color: #f1d597;
  border: 1px solid rgba(212,176,122,.3);
}
.nm-war-btn:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(0,0,0,.4);
}

/* Quote */
.nm-war-quote{
  margin: 26px auto 0;
  max-width: 600px;
  padding: 16px 24px;
  border-inline-start: 3px solid #f1d597;
  font-style: italic;
  font-family: var(--serif);
  font-size: 16px;
  color: #f1d597;
  text-align: start;
  background: rgba(241,213,151,.04);
  border-radius: 0 12px 12px 0;
}

/* War body — candles + stories */
.nm-war-body{
  padding: clamp(20px, 3vw + 10px, 32px);
}
.nm-war-section-title{
  font-family: var(--serif);
  font-size: 18px;
  color: #f1d597;
  margin: 0 0 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.nm-war-section-title::before{
  content: "";
  width: 4px;
  height: 18px;
  background: linear-gradient(180deg, #f1d597, transparent);
  border-radius: 2px;
}

/* Candles wall (per war) */
.nm-candles-wall{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 12px;
  margin-bottom: 30px;
  max-height: 400px;
  overflow-y: auto;
  padding: 4px;
}
.nm-candle{
  position: relative;
  text-align: center;
  padding: 16px 8px 12px;
  background: rgba(212,176,122,.06);
  border: 1px solid rgba(212,176,122,.2);
  border-radius: 14px;
  transition: transform .35s var(--ease-spring), box-shadow .35s;
}
.nm-candle:hover{
  transform: translateY(-4px);
  background: rgba(212,176,122,.1);
  box-shadow: 0 12px 24px rgba(0,0,0,.4), 0 0 24px rgba(241,213,151,.1);
}
.nm-candle-flame{
  width: 26px;
  height: 38px;
  margin: 0 auto 10px;
  position: relative;
}
.nm-candle-flame::before{
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 12px;
  height: 24px;
  background: linear-gradient(180deg, #f5e3b0, #b8935a);
  border-radius: 2px 2px 4px 4px;
}
.nm-candle-flame::after{
  content: "";
  position: absolute;
  bottom: 22px;
  left: 50%;
  transform: translateX(-50%);
  width: 10px;
  height: 16px;
  background: radial-gradient(ellipse at center bottom, #fffaeb 0%, #ffd66e 30%, #ff7a18 70%, transparent 100%);
  border-radius: 50% 50% 35% 35%;
  box-shadow: 0 0 16px rgba(255,180,80,.7), 0 0 32px rgba(255,140,60,.4);
  animation: flame-flicker 1.6s ease-in-out infinite, flame-sway 3.4s ease-in-out infinite;
  transform-origin: 50% 100%;
}
.nm-candle-name{
  font-family: var(--serif);
  font-weight: 700;
  font-size: 13px;
  color: #f1d597;
  line-height: 1.3;
  margin-bottom: 3px;
}
.nm-candle-relation{
  font-size: 10px;
  color: rgba(233,213,160,.5);
}
.nm-candle-note{
  font-size: 11px;
  color: rgba(233,213,160,.7);
  font-style: italic;
  margin-top: 4px;
  line-height: 1.3;
}

/* Stories */
.nm-stories{
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}
.nm-story{
  background: rgba(212,176,122,.05);
  border: 1px solid rgba(212,176,122,.2);
  border-radius: 14px;
  padding: 16px 20px;
  position: relative;
}
.nm-story::before{
  content: "";
  position: absolute;
  top: 0;
  inset-inline-start: 0;
  width: 3px;
  height: 100%;
  background: linear-gradient(180deg, #f1d597, transparent);
  border-radius: 0 2px 2px 0;
}
.nm-story-name{
  font-family: var(--serif);
  font-weight: 700;
  font-size: 16px;
  color: #f1d597;
  margin-bottom: 4px;
}
.nm-story-by{
  font-size: 11px;
  color: rgba(233,213,160,.5);
  margin-bottom: 10px;
}
.nm-story-text{
  font-size: 14px;
  line-height: 1.7;
  color: rgba(233,213,160,.85);
  white-space: pre-wrap;
}

.nm-empty{
  text-align: center;
  padding: 30px 20px;
  color: rgba(233,213,160,.5);
  font-style: italic;
}

/* ─── Modals ──────────────────────────────────────── */
.nm-modal{
  position: fixed;
  inset: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.nm-modal[hidden]{ display: none; }
.nm-modal-back{
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(0,0,0,.6), rgba(0,0,0,.85));
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.nm-modal-card{
  position: relative;
  z-index: 1;
  max-width: min(480px, 94vw);
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  background: linear-gradient(180deg, #1a2342, #0a1124);
  border: 1px solid rgba(212,176,122,.3);
  border-radius: 20px;
  padding: 30px;
  box-shadow: 0 60px 140px rgba(0,0,0,.6);
  animation: modal-spring .4s var(--ease-spring, cubic-bezier(.34,1.56,.64,1));
  color: #e9d5a0;
}
.nm-modal-wide{ max-width: min(620px, 94vw); }
.nm-modal-close{
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.2);
  color: #fff;
  cursor: pointer;
  font-size: 14px;
  transition: transform .25s;
}
.nm-modal-close:hover{ transform: rotate(90deg); }
.nm-tag-mini{
  display: inline-block;
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
  background: rgba(212,176,122,.15);
  color: #f1d597;
  padding: 3px 10px;
  border-radius: 100px;
  border: 1px solid rgba(212,176,122,.3);
  font-weight: 700;
  margin-bottom: 8px;
}
.nm-modal-card h2{
  font-family: var(--serif);
  color: #f1d597;
  margin: 0 0 14px !important;
  font-size: 24px !important;
}
.nm-modal-card p{
  color: rgba(233,213,160,.75);
  font-size: 14px;
  margin-bottom: 14px;
  line-height: 1.6;
}
.nm-modal-card label{
  display: block;
  font-size: 12px;
  color: rgba(233,213,160,.7);
  letter-spacing: .04em;
  margin: 14px 0 6px;
  font-weight: 600;
}
.nm-modal-card input,
.nm-modal-card textarea{
  width: 100%;
  padding: 11px 14px;
  background: rgba(255,255,255,.04);
  border: 1.5px solid rgba(212,176,122,.3);
  border-radius: 10px;
  font-family: var(--sans);
  font-size: 14px;
  color: #f1d597;
  outline: none;
  transition: border-color .25s, box-shadow .25s;
}
.nm-modal-card input::placeholder,
.nm-modal-card textarea::placeholder{
  color: rgba(233,213,160,.4);
}
.nm-modal-card input:focus,
.nm-modal-card textarea:focus{
  border-color: #f1d597;
  box-shadow: 0 0 0 3px rgba(241,213,151,.15);
}
.nm-modal-card textarea{
  resize: vertical;
  min-height: 120px;
  font-family: var(--sans);
}
.nm-btn-primary{
  width: 100%;
  margin-top: 18px;
  padding: 14px;
  background: linear-gradient(135deg, var(--gold-2, #D4B07A), var(--gold, #B8935A));
  color: #0a1124;
  border: none;
  border-radius: 10px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 15px;
  cursor: pointer;
  transition: transform .25s var(--ease-spring, cubic-bezier(.34,1.56,.64,1)), box-shadow .25s;
}
.nm-btn-primary:hover{
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(184,147,90,.4);
}

/* Toast */
.nm-toast{
  position: fixed;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%) translateY(20px);
  background: linear-gradient(135deg, #f1d597, #b8935a);
  color: #0a1124;
  padding: 12px 24px;
  border-radius: 100px;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 14px;
  z-index: 300;
  box-shadow: 0 16px 40px rgba(0,0,0,.4);
  opacity: 0;
  transition: opacity .35s, transform .35s var(--ease-spring, cubic-bezier(.34,1.56,.64,1));
}
.nm-toast.is-visible{
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}

/* Hidden state for war filtering */
.nm-war[hidden]{ display: none !important; }

/* Stagger reveal */
.nm-war{
  animation: nm-war-in .8s var(--ease-out-quart, cubic-bezier(.165,.84,.44,1)) backwards;
}
.nm-war:nth-child(1){ animation-delay: .1s; }
.nm-war:nth-child(2){ animation-delay: .2s; }
.nm-war:nth-child(3){ animation-delay: .3s; }
.nm-war:nth-child(4){ animation-delay: .4s; }
.nm-war:nth-child(5){ animation-delay: .5s; }
.nm-war:nth-child(6){ animation-delay: .6s; }
.nm-war:nth-child(7){ animation-delay: .7s; }
@keyframes nm-war-in{
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}

@media (prefers-reduced-motion: reduce){
  .nm-war, .nm-hero-flame span, .nm-candle-flame::after{ animation: none !important; }
}
