/* ========================================
   IRAN WAR UPDATES — Pages Styles
   Shared styles for all expansion pages
   ======================================== */

/* ---- Page Hero ---- */
.page-hero {
  position: relative;
  padding: calc(var(--ticker-height) + var(--navbar-height) + 3rem) 1.5rem 3rem;
  background: linear-gradient(180deg, #1a0000 0%, var(--bg-primary) 100%);
  text-align: center;
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 0%, rgba(204,0,0,0.15) 0%, transparent 70%);
  pointer-events: none;
}

.page-hero-inner {
  position: relative;
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-hero .live-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: rgba(204,0,0,0.2);
  border: 1px solid var(--accent-red);
  padding: 0.35rem 1rem;
  border-radius: 2px;
  font-family: var(--font-subheadline);
  font-size: 0.85rem;
  color: var(--accent-red);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 1.25rem;
}

.page-hero h1 {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: clamp(1.75rem, 4.5vw, 3rem);
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 1rem;
}

.page-hero .page-subtitle {
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 1.5vw, 1.15rem);
  color: var(--text-secondary);
  max-width: 700px;
  margin: 0 auto 1.5rem;
  line-height: 1.6;
}

.page-hero .last-updated {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-family: var(--font-body);
}

.page-hero .last-updated time {
  color: var(--accent-orange);
}

/* ---- Section Container ---- */
.page-section {
  padding: 3rem 1.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.page-section .section-title {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.5vw, 1.75rem);
  color: var(--text-primary);
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent-red);
  display: inline-block;
}

/* ---- Stat Grid ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  margin-bottom: 3rem;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 1.5rem;
  text-align: center;
  transition: border-color 0.3s;
}

.stat-card:hover {
  border-color: var(--accent-red);
}

.stat-card .stat-number {
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: var(--accent-orange);
  line-height: 1;
  margin-bottom: 0.5rem;
}

.stat-card .stat-label {
  font-family: var(--font-subheadline);
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-card .stat-detail {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-top: 0.35rem;
}

/* ---- Category Filter Pills ---- */
.category-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.filter-pill {
  background: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.1);
  color: var(--text-secondary);
  font-family: var(--font-subheadline);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.4rem 1rem;
  border-radius: 2px;
  cursor: pointer;
  transition: all 0.2s;
}

.filter-pill:hover,
.filter-pill.active {
  background: var(--accent-red);
  border-color: var(--accent-red);
  color: #fff;
}

/* ---- Update Cards (categorized) ---- */
.update-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.cat-update-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.06);
  border-left: 3px solid var(--accent-red);
  border-radius: 0 4px 4px 0;
  padding: 1.25rem 1.5rem;
  transition: border-color 0.3s, transform 0.2s;
}

.cat-update-card:hover {
  border-left-color: var(--accent-orange);
  transform: translateX(4px);
}

.cat-update-card .card-category {
  font-family: var(--font-subheadline);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.5rem;
  display: inline-block;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
}

.card-category--military { background: rgba(204,0,0,0.2); color: #ff4444; }
.card-category--diplomatic { background: rgba(0,100,200,0.2); color: #4499ff; }
.card-category--civilian { background: rgba(255,165,0,0.2); color: #ffaa33; }
.card-category--economic { background: rgba(0,180,0,0.2); color: #44cc44; }
.card-category--nuclear { background: rgba(180,0,255,0.2); color: #bb66ff; }
.card-category--naval { background: rgba(0,150,200,0.2); color: #33bbdd; }

.cat-update-card .card-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.cat-update-card .card-headline {
  font-family: var(--font-subheadline);
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.cat-update-card .card-detail {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---- Dual Timeline ---- */
.dual-timeline {
  position: relative;
  padding: 1rem 0;
}

.dual-timeline::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(180deg, var(--accent-red), var(--accent-orange));
  transform: translateX(-50%);
}

.timeline-entry {
  display: flex;
  align-items: flex-start;
  margin-bottom: 2rem;
  position: relative;
}

.timeline-entry--left {
  flex-direction: row;
  padding-right: calc(50% + 2rem);
  text-align: right;
}

.timeline-entry--right {
  flex-direction: row-reverse;
  padding-left: calc(50% + 2rem);
  text-align: left;
}

.timeline-entry .timeline-dot {
  position: absolute;
  left: 50%;
  top: 0.5rem;
  width: 12px;
  height: 12px;
  background: var(--accent-red);
  border-radius: 50%;
  transform: translateX(-50%);
  border: 2px solid var(--bg-primary);
  z-index: 1;
}

.timeline-entry .timeline-time {
  font-size: 0.75rem;
  color: var(--accent-orange);
  font-family: var(--font-subheadline);
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}

.timeline-entry .timeline-title {
  font-family: var(--font-subheadline);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.timeline-entry .timeline-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

.timeline-entry .timeline-side-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 0.35rem;
}

.timeline-side-label--israel { color: #4499ff; }
.timeline-side-label--iran { color: #44cc44; }
.timeline-side-label--us { color: #ff4444; }

/* ---- Scenario Cards ---- */
.scenario-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.scenario-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.3s;
}

.scenario-card:hover {
  border-color: var(--accent-red);
}

.scenario-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.25rem 1.5rem;
}

.scenario-card-header h3 {
  font-family: var(--font-subheadline);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}

.scenario-probability {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: 0.85rem;
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
}

.scenario-probability--high { background: rgba(204,0,0,0.2); color: #ff4444; }
.scenario-probability--medium { background: rgba(255,165,0,0.2); color: #ffaa33; }
.scenario-probability--low { background: rgba(0,180,0,0.2); color: #44cc44; }

.scenario-card-toggle {
  font-size: 0.75rem;
  color: var(--text-muted);
  transition: transform 0.3s;
}

.scenario-card.open .scenario-card-toggle {
  transform: rotate(180deg);
}

.scenario-card-body {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease;
  padding: 0 1.5rem;
}

.scenario-card.open .scenario-card-body {
  max-height: 600px;
  padding: 0 1.5rem 1.5rem;
}

.scenario-card-body p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.scenario-card-body ul {
  list-style: none;
  padding: 0;
}

.scenario-card-body ul li {
  font-size: 0.85rem;
  color: var(--text-secondary);
  padding: 0.3rem 0 0.3rem 1rem;
  border-left: 2px solid var(--accent-red);
  margin-bottom: 0.4rem;
}

/* ---- Key Figures Grid ---- */
.figures-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.figure-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 1.25rem;
  text-align: center;
  transition: border-color 0.3s;
}

.figure-card:hover {
  border-color: var(--accent-red);
}

.figure-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto 0.75rem;
  background: var(--bg-tertiary);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-headline);
  font-weight: 900;
  font-size: 1.25rem;
  color: var(--accent-orange);
  border: 2px solid rgba(255,255,255,0.1);
}

.figure-card .figure-name {
  font-family: var(--font-subheadline);
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.figure-card .figure-role {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* ---- Weapons Inventory Cards ---- */
.weapons-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.weapon-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.06);
  border-left: 3px solid var(--accent-orange);
  border-radius: 0 4px 4px 0;
  padding: 1.25rem 1.5rem;
}

.weapon-card .weapon-name {
  font-family: var(--font-subheadline);
  font-size: 1rem;
  font-weight: 600;
  color: var(--accent-orange);
  margin-bottom: 0.25rem;
}

.weapon-card .weapon-type {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.weapon-card .weapon-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.5;
}

/* ---- Quote Cards ---- */
.quote-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.quote-card {
  background: var(--bg-secondary);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 1.5rem;
  position: relative;
}

.quote-card::before {
  content: '\201C';
  font-family: var(--font-headline);
  font-size: 3rem;
  color: var(--accent-red);
  opacity: 0.3;
  position: absolute;
  top: 0.5rem;
  left: 1rem;
  line-height: 1;
}

.quote-card blockquote {
  font-size: 0.95rem;
  color: var(--text-primary);
  line-height: 1.6;
  font-style: italic;
  padding-left: 0.5rem;
  margin-bottom: 0.75rem;
}

.quote-card .quote-attribution {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.quote-card .quote-attribution strong {
  color: var(--accent-orange);
  font-weight: 600;
}

/* ---- Related Coverage Grid ---- */
.related-coverage {
  padding: 3rem 1.5rem;
  background: var(--bg-secondary);
  margin-top: 3rem;
}

.related-coverage-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.related-coverage .section-title {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  color: var(--text-primary);
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent-red);
  display: inline-block;
}

.related-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

.related-link {
  display: block;
  background: var(--bg-primary);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 4px;
  padding: 1.25rem 1.5rem;
  text-decoration: none;
  transition: border-color 0.3s, transform 0.2s;
}

.related-link:hover {
  border-color: var(--accent-red);
  transform: translateY(-2px);
  text-decoration: none;
}

.related-link .related-label {
  font-family: var(--font-subheadline);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-red);
  margin-bottom: 0.35rem;
}

.related-link .related-title {
  font-family: var(--font-subheadline);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}

.related-link .related-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ---- Conflict Phases Timeline ---- */
.phases-timeline {
  position: relative;
  padding-left: 2rem;
}

.phases-timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: linear-gradient(180deg, var(--accent-red), var(--accent-orange), var(--accent-red));
}

.phase-block {
  position: relative;
  margin-bottom: 2.5rem;
  padding-left: 1.5rem;
}

.phase-block::before {
  content: '';
  position: absolute;
  left: -2rem;
  top: 0.4rem;
  width: 14px;
  height: 14px;
  background: var(--accent-red);
  border-radius: 50%;
  border: 3px solid var(--bg-primary);
  transform: translateX(-5.5px);
}

.phase-block .phase-label {
  font-family: var(--font-subheadline);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--accent-orange);
  margin-bottom: 0.35rem;
}

.phase-block .phase-title {
  font-family: var(--font-subheadline);
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.phase-block .phase-desc {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
}

/* ---- Maps Page ---- */
.maps-container {
  position: relative;
  width: 100%;
  min-height: calc(100vh - var(--ticker-height) - var(--navbar-height) - 200px);
  background: var(--bg-secondary);
  overflow: hidden;
}

.maps-inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 500px;
  transition: transform 0.3s ease;
}

.map-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 55% 45%, rgba(20,40,20,0.6) 0%, transparent 50%),
    radial-gradient(ellipse at 45% 55%, rgba(20,20,40,0.4) 0%, transparent 40%),
    linear-gradient(180deg, #0d1117 0%, #0a0e14 100%);
}

.map-grid-overlay {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
  background-size: 40px 40px;
  pointer-events: none;
}

/* Map Pins */
.map-pin {
  position: absolute;
  cursor: pointer;
  z-index: 10;
  transition: transform 0.2s;
}

.map-pin:hover {
  transform: scale(1.3);
  z-index: 20;
}

.map-pin-inner {
  position: relative;
  width: 16px;
  height: 16px;
}

.map-pin-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  position: absolute;
  top: 3px;
  left: 3px;
}

.map-pin-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid;
  opacity: 0.5;
  animation: pulse 2s ease-in-out infinite;
}

.map-pin--nuclear .map-pin-dot { background: #bb66ff; }
.map-pin--nuclear .map-pin-ring { border-color: #bb66ff; }
.map-pin--military .map-pin-dot { background: #ff4444; }
.map-pin--military .map-pin-ring { border-color: #ff4444; }
.map-pin--government .map-pin-dot { background: #ffaa33; }
.map-pin--government .map-pin-ring { border-color: #ffaa33; }
.map-pin--naval .map-pin-dot { background: #33bbdd; }
.map-pin--naval .map-pin-ring { border-color: #33bbdd; }

.map-pin-label {
  position: absolute;
  top: -1.5rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-subheadline);
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-secondary);
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}

.map-pin:hover .map-pin-label {
  opacity: 1;
}

/* Map Info Panel */
.map-info-panel {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 320px;
  max-width: 90vw;
  background: rgba(10,10,10,0.95);
  border-left: 2px solid var(--accent-red);
  transform: translateX(100%);
  transition: transform 0.3s ease;
  z-index: 50;
  overflow-y: auto;
  padding: 1.5rem;
}

.map-info-panel.open {
  transform: translateX(0);
}

.map-info-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
}

.map-info-panel h3 {
  font-family: var(--font-subheadline);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  margin-top: 0.5rem;
}

.map-info-panel .info-type {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 0.15rem 0.5rem;
  border-radius: 2px;
  display: inline-block;
  margin-bottom: 1rem;
}

.map-info-panel .info-detail {
  font-size: 0.85rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-bottom: 0.75rem;
}

.map-info-panel .info-detail strong {
  color: var(--text-primary);
}

/* Map Controls */
.map-controls {
  position: absolute;
  bottom: 1.5rem;
  left: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  z-index: 30;
}

.map-zoom-btn {
  width: 36px;
  height: 36px;
  background: rgba(20,20,20,0.9);
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 4px;
  color: var(--text-primary);
  font-size: 1.2rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
}

.map-zoom-btn:hover {
  background: var(--accent-red);
  border-color: var(--accent-red);
}

/* Map Filters Bar */
.map-filters {
  position: absolute;
  top: 1rem;
  left: 1rem;
  right: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  z-index: 30;
}

/* Map Timeline Slider */
.map-timeline {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(10,10,10,0.9);
  border-top: 1px solid rgba(255,255,255,0.1);
  padding: 0.75rem 1.5rem;
  z-index: 30;
}

.map-timeline-label {
  font-family: var(--font-subheadline);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
}

.map-timeline input[type="range"] {
  width: 100%;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  background: rgba(255,255,255,0.1);
  border-radius: 2px;
  outline: none;
}

.map-timeline input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 16px;
  height: 16px;
  background: var(--accent-red);
  border-radius: 50%;
  cursor: pointer;
}

.map-timeline input[type="range"]::-moz-range-thumb {
  width: 16px;
  height: 16px;
  background: var(--accent-red);
  border-radius: 50%;
  cursor: pointer;
  border: none;
}

.map-timeline-time {
  font-family: var(--font-headline);
  font-size: 0.85rem;
  color: var(--accent-orange);
  margin-top: 0.35rem;
}

/* ---- Full Coverage (Homepage Internal Links) ---- */
.full-coverage {
  padding: 3rem 1.5rem;
  background: var(--bg-secondary);
}

.full-coverage-inner {
  max-width: var(--max-width);
  margin: 0 auto;
}

.full-coverage .section-title {
  font-family: var(--font-headline);
  font-weight: 700;
  font-size: clamp(1.25rem, 2.5vw, 1.5rem);
  color: var(--text-primary);
  margin-bottom: 2rem;
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--accent-red);
  display: inline-block;
}

/* ---- Responsive ---- */
@media (min-width: 768px) {
  .stat-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .update-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .scenario-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .figures-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .weapons-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .quote-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .related-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .stat-grid {
    grid-template-columns: repeat(6, 1fr);
  }

  .update-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .scenario-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .figures-grid {
    grid-template-columns: repeat(4, 1fr);
  }

  .weapons-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .quote-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .related-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .dual-timeline::before {
    left: 50%;
  }
}

/* Mobile dual timeline fallback */
@media (max-width: 767px) {
  .dual-timeline::before {
    left: 1rem;
  }

  .timeline-entry--left,
  .timeline-entry--right {
    padding-left: 3rem;
    padding-right: 0;
    text-align: left;
    flex-direction: row;
  }

  .timeline-entry .timeline-dot {
    left: 1rem;
  }
}
