/* ═══════════════════════════════════════════════════════════════
   05-SOLARI — "הלוח" — Split-flap Departure Board Theme
   Palette: hall warm-charcoal, board black, brass/amber, aged paper
   Typography: Secular One (display) + Heebo (body) + JetBrains Mono (board)
   ═══════════════════════════════════════════════════════════════ */

/* ─── Google Fonts ─── */
@import url('https://fonts.googleapis.com/css2?family=Secular+One&family=Heebo:wght@300;400;500;700;900&family=JetBrains+Mono:wght@400;500;700&display=swap');

/* ─── CSS Variables ─── */
:root {
  --hall:      #1b1a17;
  --hall-mid:  #242320;
  --hall-light:#2e2c28;
  --board:     #0e0d0b;
  --board-cell:#131210;
  --flap-warm: #ece7da;
  --flap-dim:  #a09b8e;
  --brass:     #c98f3d;
  --brass-dim: #8a6029;
  --brass-pale:#e8c47a;
  --green:     #3f7d5a;
  --green-dim: #2b5640;
  --paper:     #efe7d4;
  --paper-mid: #e2d9c5;
  --paper-dark:#c9bfaa;
  --seam:      rgba(0,0,0,0.6);
  --font-display: 'Secular One', sans-serif;
  --font-body:    'Heebo', sans-serif;
  --font-mono:    'JetBrains Mono', monospace;
}

/* ─── Reset + Base ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  font-size: 16px;
  scroll-behavior: smooth;
}

body {
  background: var(--hall);
  color: var(--flap-warm);
  font-family: var(--font-body);
  direction: rtl;
  min-height: 100vh;
  overflow-x: hidden;
}

a {
  color: inherit;
  text-decoration: none;
}

/* ─── Noise texture overlay ─── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 9999;
  opacity: 0.4;
}

/* ═══════════════════════════════════════════
   STATION HEADER
   ═══════════════════════════════════════════ */
.station-header {
  background: var(--board);
  border-bottom: 2px solid var(--brass-dim);
  padding: 16px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  position: relative;
}

.station-header::after {
  content: '';
  position: absolute;
  bottom: -6px;
  left: 0; right: 0;
  height: 2px;
  background: var(--brass);
  opacity: 0.3;
}

.station-name-block {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.station-name {
  font-family: var(--font-display);
  font-size: 1.8rem;
  color: var(--brass-pale);
  letter-spacing: 0.02em;
  line-height: 1;
}

.station-subtitle {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--flap-dim);
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

/* ─── SVG Station Clock ─── */
.station-clock-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.station-clock {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
}

.clock-face {
  fill: #0a0908;
  stroke: var(--brass);
  stroke-width: 2.5;
}

.clock-rim {
  fill: none;
  stroke: var(--brass-pale);
  stroke-width: 1;
  opacity: 0.4;
}

.clock-tick {
  stroke: var(--flap-dim);
  stroke-width: 1;
}

.clock-tick-major {
  stroke: var(--flap-warm);
  stroke-width: 2;
}

.clock-hand-hour {
  stroke: var(--flap-warm);
  stroke-width: 3;
  stroke-linecap: round;
  transform-origin: 36px 36px;
}

.clock-hand-minute {
  stroke: var(--flap-warm);
  stroke-width: 2;
  stroke-linecap: round;
  transform-origin: 36px 36px;
}

.clock-hand-second {
  stroke: var(--brass);
  stroke-width: 1.5;
  stroke-linecap: round;
  transform-origin: 36px 36px;
  animation: clock-second 60s steps(60, end) infinite;
}

@keyframes clock-second {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

.clock-center {
  fill: var(--brass);
}

.clock-time-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--flap-dim);
  letter-spacing: 0.1em;
}

/* ─── Header nav links ─── */
.station-nav {
  display: flex;
  gap: 24px;
  align-items: center;
}

.station-nav a {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--flap-dim);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  transition: color 0.2s;
  border-bottom: 1px solid transparent;
  padding-bottom: 1px;
}

.station-nav a:hover {
  color: var(--brass-pale);
  border-bottom-color: var(--brass);
}

.station-nav a.active {
  color: var(--brass-pale);
}

/* ═══════════════════════════════════════════
   TICKER — FLIP-DOT RIBBON
   ═══════════════════════════════════════════ */
.ticker-ribbon {
  background: var(--board);
  border-bottom: 1px solid var(--brass-dim);
  padding: 0;
  overflow: hidden;
  height: 36px;
  display: flex;
  align-items: center;
  position: relative;
}

.ticker-label-tag {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--brass);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: var(--board);
  padding: 0 16px;
  flex-shrink: 0;
  border-left: 1px solid var(--brass-dim);
  height: 100%;
  display: flex;
  align-items: center;
  z-index: 2;
  white-space: nowrap;
}

.ticker-viewport {
  overflow: hidden;
  flex: 1;
  height: 100%;
  direction: ltr; /* RTL marquee pattern */
}

.ticker-track {
  display: flex;
  align-items: center;
  height: 100%;
  animation: ticker-scroll 50s linear infinite;
  direction: ltr;
  width: max-content;
}

.ticker-item {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: #b8965a;
  letter-spacing: 0.05em;
  padding: 0 32px;
  white-space: nowrap;
  direction: rtl;
  flex-shrink: 0;
  position: relative;
}

.ticker-item::after {
  content: '·';
  position: absolute;
  left: 8px;
  color: var(--brass-dim);
}

.ticker-time {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--brass-dim);
  margin-left: 8px;
}

@keyframes ticker-scroll {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  .clock-hand-second { animation: none; }
}

/* ═══════════════════════════════════════════
   HERO SPLIT-FLAP BOARD
   ═══════════════════════════════════════════ */
.hero-board {
  background: var(--board);
  padding: 48px 48px 40px;
  border-bottom: 2px solid var(--brass-dim);
  position: relative;
}

.hero-board-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--brass-dim);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.hero-board-label::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--brass-dim);
  opacity: 0.4;
}

/* Split-flap display: single row of character cells, scrollable on small screens */
.flap-display {
  display: block;  /* use inline-block children to stay on one line */
  white-space: nowrap;
  direction: ltr;
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: none;
  width: 100%;
  padding-bottom: 4px;
  line-height: 0;  /* prevent inline spacing */
}
.flap-display::-webkit-scrollbar { display: none; }
.flap-display .flap-cell {
  display: inline-block;
  vertical-align: top;
  margin-left: 4px;
}

.flap-cell {
  width: 70px;
  height: 90px;
  position: relative;
  perspective: 300px;
  display: inline-block;
  vertical-align: top;
}

/* The actual flap card */
.flap-card {
  width: 100%;
  height: 100%;
  background: var(--board-cell);
  border-radius: 4px;
  border: 1px solid #222019;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.04),
    inset 0 -1px 0 rgba(0,0,0,0.5),
    0 2px 8px rgba(0,0,0,0.6);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Top half */
.flap-top {
  width: 100%;
  height: 50%;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 2px;
  background: linear-gradient(180deg, #1a1915 0%, var(--board-cell) 100%);
  position: relative;
  overflow: hidden;
}

/* Bottom half */
.flap-bottom {
  width: 100%;
  height: 50%;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding-top: 2px;
  background: linear-gradient(180deg, var(--board-cell) 0%, #0a0908 100%);
  position: relative;
  overflow: hidden;
}

/* Seam line between halves */
.flap-seam {
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 2px;
  background: var(--seam);
  z-index: 5;
  transform: translateY(-50%);
}

.flap-char {
  font-family: var(--font-mono);
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--flap-warm);
  line-height: 1;
  text-shadow: 0 1px 2px rgba(0,0,0,0.8);
  position: absolute;
  width: 100%;
  text-align: center;
  top: 50%;
  transform: translateY(-50%);
}

.flap-top .flap-char {
  clip-path: inset(0 0 50% 0);
}

.flap-bottom .flap-char {
  clip-path: inset(50% 0 0 0);
}

/* Space cell is narrower */
.flap-cell.flap-space {
  width: 20px;
}

/* Flip animation */
@keyframes flap-flip-top {
  0%   { transform: rotateX(0deg); }
  50%  { transform: rotateX(-90deg); }
  100% { transform: rotateX(-90deg); }
}
@keyframes flap-flip-bottom {
  0%   { transform: rotateX(90deg); }
  50%  { transform: rotateX(90deg); }
  100% { transform: rotateX(0deg); }
}

.flap-top.is-flipping {
  animation: flap-flip-top 0.16s ease-in forwards;
  transform-origin: bottom;
}
.flap-bottom.is-flipping {
  animation: flap-flip-bottom 0.16s ease-out forwards;
  transform-origin: top;
}

/* Site name sub-display (smaller, below hero) */
.flap-display-sm {
  overflow-x: auto;
  scrollbar-width: none;
  min-height: 44px;
  white-space: nowrap;
}
.flap-display-sm::-webkit-scrollbar { display: none; }
.flap-display-sm .flap-cell {
  width: 34px;
  height: 44px;
  display: inline-block;
  vertical-align: top;
  margin-left: 3px;
}
.flap-display-sm .flap-char {
  font-size: 1.3rem;
}

/* ═══════════════════════════════════════════
   DEPARTURES TABLE
   ═══════════════════════════════════════════ */
.departures-section {
  padding: 48px;
}

.departures-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--brass-dim);
}

.departures-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--brass-pale);
  display: flex;
  align-items: center;
  gap: 12px;
}

.departures-subtitle {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--flap-dim);
  letter-spacing: 0.12em;
}

/* Table structure */
.departures-board {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--brass-dim);
}

.departures-board thead tr {
  background: var(--board);
  border-bottom: 2px solid var(--brass);
}

.departures-board th {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  padding: 10px 16px;
  text-align: right;
  white-space: nowrap;
}

.departures-board tbody tr {
  background: var(--hall-mid);
  border-bottom: 1px solid rgba(201, 143, 61, 0.12);
  transition: background 0.2s, transform 0.2s, box-shadow 0.2s;
  cursor: pointer;
}

.departures-board tbody tr:nth-child(even) {
  background: var(--hall-light);
}

.departures-board tbody tr:hover {
  background: var(--hall-light);
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(0,0,0,0.4);
  position: relative;
  z-index: 2;
}

.departures-board td {
  padding: 14px 16px;
  text-align: right;
  vertical-align: middle;
}

.dep-time {
  font-family: var(--font-mono);
  font-size: 0.85rem;
  color: var(--flap-dim);
  white-space: nowrap;
}

.dep-platform {
  font-family: var(--font-mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--brass-pale);
  text-align: center;
  width: 60px;
}

/* td that wraps the platform sign */
.departures-board td:nth-child(4),
.news-board-table td:nth-child(4) {
  text-align: center;
}

/* Platform sign — circle with number */
.platform-sign {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 2px solid var(--brass-dim);
  border-radius: 50%;
  font-family: var(--font-mono);
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--brass-pale);
  background: var(--board);
}

.dep-headline {
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--flap-warm);
  max-width: 380px;
  line-height: 1.4;
}

.dep-category {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  color: var(--flap-dim);
  white-space: nowrap;
}

/* Status chips */
.status-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  padding: 3px 10px;
  border-radius: 2px;
  white-space: nowrap;
}

.status-chip.on-time {
  background: rgba(63, 125, 90, 0.15);
  border: 1px solid var(--green-dim);
  color: #6ec697;
}

.status-chip.breaking {
  background: rgba(201, 143, 61, 0.12);
  border: 1px solid var(--brass-dim);
  color: var(--brass-pale);
  animation: pulse-amber 2.5s ease-in-out infinite;
}

@keyframes pulse-amber {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

/* ═══════════════════════════════════════════
   INFO KIOSK — CHAT PHONE SECTION
   ═══════════════════════════════════════════ */
.kiosk-section {
  padding: 64px 48px;
  background: var(--hall-mid);
  border-top: 2px solid var(--brass-dim);
  border-bottom: 2px solid var(--brass-dim);
  position: relative;
}

.kiosk-section::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--brass-dim), transparent);
  opacity: 0.3;
}

.kiosk-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  gap: 64px;
}

.kiosk-text-col {}

.kiosk-heading {
  font-family: var(--font-display);
  font-size: 2rem;
  color: var(--brass-pale);
  margin-bottom: 8px;
  line-height: 1.2;
}

.kiosk-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass-dim);
  margin-bottom: 16px;
}

.kiosk-desc {
  font-size: 0.9rem;
  color: var(--flap-dim);
  line-height: 1.7;
  max-width: 360px;
  margin-bottom: 24px;
}

/* Skin switcher buttons */
.skin-switcher {
  display: flex;
  gap: 8px;
}

.skin-btn {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.1em;
  padding: 6px 14px;
  background: transparent;
  border: 1px solid var(--brass-dim);
  color: var(--flap-dim);
  cursor: pointer;
  border-radius: 2px;
  transition: all 0.2s;
}

.skin-btn:hover, .skin-btn.active {
  background: var(--brass-dim);
  color: var(--flap-warm);
  border-color: var(--brass);
}

/* Phone device — station kiosk style */
.phone-device {
  width: 280px;
  background: #0a0908;
  border-radius: 28px;
  border: 2px solid #2a2822;
  box-shadow:
    0 0 0 1px rgba(201,143,61,0.15),
    0 24px 60px rgba(0,0,0,0.7),
    inset 0 1px 0 rgba(255,255,255,0.05);
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}

/* notch */
.phone-notch {
  width: 60px;
  height: 8px;
  background: #0a0908;
  border-radius: 0 0 8px 8px;
  margin: 0 auto;
  position: relative;
  z-index: 2;
}

.phone-screen {
  height: 480px;
  overflow: hidden;
  position: relative;
}

/* WhatsApp skin */
.phone-device.skin-whatsapp .phone-header-bar {
  background: #075e54;
}
.phone-device.skin-whatsapp .phone-bubble.them {
  background: #fff;
  color: #111;
}
.phone-device.skin-whatsapp .phone-bubble.me {
  background: #dcf8c6;
  color: #111;
}
.phone-device.skin-whatsapp .phone-messages-bg {
  background: #e5ddd5 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='80' height='80'%3E%3Cpath d='M0 0h80v80H0z' fill='%23e5ddd5'/%3E%3C/svg%3E");
}

/* Telegram skin */
.phone-device.skin-telegram .phone-header-bar {
  background: #2c5364;
}
.phone-device.skin-telegram .phone-bubble.them {
  background: #fff;
  color: #111;
}
.phone-device.skin-telegram .phone-bubble.me {
  background: #effdde;
  color: #111;
}
.phone-device.skin-telegram .phone-messages-bg {
  background: #c8d5db;
}

/* Messenger skin */
.phone-device.skin-messenger .phone-header-bar {
  background: #0a0908;
  border-bottom: 1px solid var(--brass-dim);
}
.phone-device.skin-messenger .phone-bubble.them {
  background: var(--hall-light);
  color: var(--flap-warm);
}
.phone-device.skin-messenger .phone-bubble.me {
  background: var(--brass-dim);
  color: var(--flap-warm);
}
.phone-device.skin-messenger .phone-messages-bg {
  background: var(--hall);
}

.phone-header-bar {
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.phone-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--brass-dim);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.phone-channel-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
}

.phone-channel-sub {
  font-size: 0.65rem;
  color: rgba(255,255,255,0.6);
}

.phone-messages-bg {
  height: calc(100% - 56px);
  overflow-y: auto;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  direction: rtl;
}

.phone-message {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.phone-bubble {
  max-width: 80%;
  padding: 8px 12px;
  border-radius: 12px;
  font-size: 0.78rem;
  line-height: 1.5;
  direction: rtl;
}

.phone-tag-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  padding: 1px 6px;
  border-radius: 2px;
  letter-spacing: 0.08em;
  margin-bottom: 3px;
}

.phone-device.skin-whatsapp .phone-tag-pill,
.phone-device.skin-telegram .phone-tag-pill {
  background: #075e54;
  color: #fff;
}

.phone-device.skin-messenger .phone-tag-pill {
  background: var(--brass-dim);
  color: var(--flap-warm);
}

.phone-tag-urgent {
  background: #c0392b !important;
}

.phone-time {
  font-size: 0.6rem;
  color: rgba(0,0,0,0.4);
  padding: 0 4px;
}

.phone-device.skin-messenger .phone-time {
  color: rgba(255,255,255,0.3);
}

/* ═══════════════════════════════════════════
   LUGGAGE TAGS — DRAGGABLE QUOTES
   ═══════════════════════════════════════════ */
.tags-section {
  padding: 64px 48px;
  background: var(--hall);
  border-bottom: 2px solid var(--brass-dim);
  position: relative;
  min-height: 400px;
  overflow: hidden;
}

.tags-section-header {
  margin-bottom: 32px;
}

.tags-section-title {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--brass-pale);
}

.tags-section-sub {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--flap-dim);
  letter-spacing: 0.15em;
  margin-top: 4px;
}

.tags-field {
  position: relative;
  min-height: 320px;
}

/* Luggage tag — positioned absolutely, draggable */
.luggage-tag {
  position: absolute;
  cursor: grab;
  user-select: none;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
  transition: filter 0.2s;
  width: 200px;
}

.luggage-tag:active {
  cursor: grabbing;
  filter: drop-shadow(0 8px 24px rgba(0,0,0,0.7));
  z-index: 100;
}

.luggage-tag:nth-child(1) { top:  10px; right: 5%;  transform: rotate(-3deg); }
.luggage-tag:nth-child(2) { top:  40px; right: 25%; transform: rotate( 2deg); }
.luggage-tag:nth-child(3) { top:  20px; right: 48%; transform: rotate(-1.5deg); }
.luggage-tag:nth-child(4) { top:  60px; right: 68%; transform: rotate( 3deg); }
.luggage-tag:nth-child(5) { top:   0px; right: 85%; transform: rotate(-2deg); }

.tag-svg-shape {
  width: 200px;
  height: 140px;
  display: block;
}

.tag-content {
  position: absolute;
  top: 28px;
  left: 8px;
  right: 8px;
  bottom: 12px;
  padding: 8px 10px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.tag-quote-text {
  font-family: var(--font-body);
  font-size: 0.65rem;
  font-weight: 500;
  color: #3a3328;
  line-height: 1.4;
  direction: ltr;
  text-align: left;
}

.tag-author {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: #6b5d4a;
  direction: ltr;
  text-align: left;
}

/* ═══════════════════════════════════════════
   FOOTER
   ═══════════════════════════════════════════ */
.station-footer {
  background: var(--board);
  padding: 32px 48px;
  border-top: 3px double var(--brass-dim);
}

.footer-brass-rule {
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--brass-dim), var(--brass), var(--brass-dim), transparent);
  margin-bottom: 24px;
  opacity: 0.6;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-name {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--brass-pale);
}

.footer-tagline {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: var(--flap-dim);
  letter-spacing: 0.1em;
  margin-top: 4px;
}

.footer-links {
  display: flex;
  gap: 20px;
}

.footer-links a {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--flap-dim);
  letter-spacing: 0.1em;
  transition: color 0.2s;
}

.footer-links a:hover {
  color: var(--brass-pale);
}

.footer-copy {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  color: rgba(160,155,142,0.4);
  letter-spacing: 0.08em;
}

/* ═══════════════════════════════════════════
   ARTICLE PAGE — LEAFLET IN GLASS CASE
   ═══════════════════════════════════════════ */
.article-case {
  padding: 48px;
  display: flex;
  justify-content: center;
}

.article-leaflet {
  background: var(--paper);
  color: #2c2720;
  max-width: 720px;
  width: 100%;
  border-radius: 2px;
  overflow: hidden;
  box-shadow:
    0 0 0 1px rgba(0,0,0,0.2),
    0 4px 2px rgba(0,0,0,0.08),
    0 12px 40px rgba(0,0,0,0.5),
    inset 0 0 60px rgba(0,0,0,0.04);
  position: relative;
}

/* Top board-strip for title flip-in */
.leaflet-board-strip {
  background: var(--board);
  padding: 16px 24px;
  border-bottom: 2px solid var(--brass-dim);
  min-height: 80px;
  display: flex;
  align-items: center;
}

.leaflet-title-flap {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  direction: rtl;
  justify-content: flex-start;
}

.leaflet-title-cell {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 42px;
  background: var(--board-cell);
  border-radius: 3px;
  border: 1px solid #1e1c18;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
  position: relative;
  overflow: hidden;
}

.leaflet-title-cell::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 50%;
  height: 1px;
  background: rgba(0,0,0,0.5);
}

.leaflet-title-char {
  font-family: var(--font-mono);
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--flap-warm);
}

/* Paper body */
.leaflet-body {
  padding: 32px 36px;
  direction: rtl;
}

/* Category badge */
.leaflet-category-badge {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  padding: 4px 12px;
  border: 1px solid var(--paper-dark);
  color: #7a6b55;
  margin-bottom: 16px;
}

/* Stamps row */
.leaflet-stamps {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--paper-dark);
}

.stamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  border: 1px solid var(--paper-dark);
  padding: 4px 12px;
  min-width: 80px;
}

.stamp-label {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #9a8b77;
}

.stamp-value {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  font-weight: 700;
  color: #3a3228;
}

/* Paragraphs */
.leaflet-paragraphs p {
  font-size: 0.92rem;
  line-height: 1.8;
  color: #3a3228;
  margin-bottom: 1rem;
  text-align: justify;
}

.leaflet-paragraphs p:first-child::first-letter {
  font-family: var(--font-display);
  font-size: 3rem;
  float: right;
  margin-left: 8px;
  line-height: 0.8;
  color: #4a3d2e;
  padding-top: 4px;
}

/* TL;DR box */
.leaflet-tldr {
  background: var(--paper-mid);
  border: 1.5px solid var(--brass-dim);
  border-right: 4px solid var(--brass);
  padding: 16px 20px;
  margin: 24px 0;
  position: relative;
}

.leaflet-tldr::before {
  content: 'תקציר';
  position: absolute;
  top: -1px;
  right: -4px;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  letter-spacing: 0.15em;
  background: var(--brass);
  color: var(--board);
  padding: 2px 8px;
  font-weight: 700;
}

.leaflet-tldr-text {
  font-size: 0.88rem;
  font-weight: 600;
  color: #3a3228;
  line-height: 1.6;
  margin-top: 8px;
}

/* Takeaways */
.leaflet-takeaways {
  margin: 24px 0;
}

.takeaways-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #9a8b77;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.takeaways-label::before {
  content: '';
  width: 24px;
  height: 1px;
  background: var(--paper-dark);
}

.takeaway-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 10px;
}

.takeaway-platform {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1.5px solid var(--paper-dark);
  border-radius: 2px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  color: #7a6b55;
  flex-shrink: 0;
  background: var(--paper);
}

.takeaway-text {
  font-size: 0.85rem;
  color: #3a3228;
  line-height: 1.5;
  padding-top: 4px;
}

/* Sources */
.leaflet-sources {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--paper-dark);
}

.sources-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #9a8b77;
  margin-bottom: 8px;
}

.source-link {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: #7a6b55;
  text-decoration: underline;
  text-underline-offset: 3px;
  margin-bottom: 4px;
  direction: ltr;
  text-align: left;
}

/* Related articles mini rows */
.leaflet-related {
  background: var(--paper-mid);
  border-top: 2px solid var(--paper-dark);
  padding: 16px 24px;
}

.related-label {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #9a8b77;
  margin-bottom: 12px;
}

.related-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--paper-dark);
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.related-row:hover {
  background: rgba(0,0,0,0.03);
}

.related-headline {
  font-size: 0.82rem;
  color: #3a3228;
  font-weight: 500;
}

.related-cat {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: #9a8b77;
}

/* ═══════════════════════════════════════════
   NEWS PAGE — FULL DEPARTURE BOARD
   ═══════════════════════════════════════════ */
.news-board-container {
  padding: 48px;
}

.news-board-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--brass-dim);
}

.news-board-title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  color: var(--brass-pale);
}

.news-board-meta {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--flap-dim);
  letter-spacing: 0.12em;
}

.news-board-table {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--brass-dim);
}

.news-board-table thead tr {
  background: var(--board);
  border-bottom: 2px solid var(--brass);
}

.news-board-table th {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--brass);
  padding: 10px 16px;
  text-align: right;
}

.news-board-table tbody tr {
  background: var(--hall-mid);
  border-bottom: 1px solid rgba(201, 143, 61, 0.1);
  transition: background 0.2s;
}

.news-board-table tbody tr:nth-child(even) {
  background: var(--hall-light);
}

.news-board-table td {
  padding: 12px 16px;
  text-align: right;
  vertical-align: middle;
}

.news-headline-cell {
  font-family: var(--font-body);
  font-size: 0.92rem;
  color: var(--flap-warm);
  font-weight: 500;
}

.news-dek-cell {
  font-size: 0.75rem;
  color: var(--flap-dim);
  max-width: 320px;
  line-height: 1.4;
}

.news-source-cell {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  color: var(--flap-dim);
  white-space: nowrap;
}

/* Row re-flip effect */
.news-row-reflip .news-headline-cell {
  transition: opacity 0.12s ease;
}

/* ═══════════════════════════════════════════
   RESPONSIVE — MOBILE 390px
   ═══════════════════════════════════════════ */
@media (max-width: 600px) {
  .station-header {
    padding: 12px 16px;
    flex-wrap: wrap;
    gap: 12px;
  }

  .station-name {
    font-size: 1.3rem;
  }

  .station-nav {
    gap: 12px;
    width: 100%;
    justify-content: center;
  }

  .hero-board {
    padding: 24px 16px 20px;
  }

  .flap-cell {
    width: 38px;
    height: 50px;
  }

  .flap-char {
    font-size: 1.5rem;
  }

  .departures-section,
  .kiosk-section,
  .tags-section,
  .article-case,
  .news-board-container {
    padding: 24px 16px;
  }

  .departures-board th:nth-child(1),
  .departures-board td:nth-child(1) { display: none; }

  .departures-board th:nth-child(3),
  .departures-board td:nth-child(3) { display: none; }

  .dep-headline { max-width: 180px; font-size: 0.82rem; }

  .kiosk-inner {
    grid-template-columns: 1fr;
    gap: 32px;
  }

  .phone-device {
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
  }

  .luggage-tag {
    width: 160px;
  }

  .luggage-tag:nth-child(1) { top:  10px; right: 2%;  }
  .luggage-tag:nth-child(2) { top: 170px; right: 5%;  }
  .luggage-tag:nth-child(3) { top:  10px; right: 50%; }
  .luggage-tag:nth-child(4) { top: 170px; right: 50%; }
  .luggage-tag:nth-child(5) { top: 330px; right: 30%; }

  .tags-field { min-height: 520px; }

  .news-board-table th:nth-child(3),
  .news-board-table td:nth-child(3) { display: none; }

  .footer-inner { flex-direction: column; text-align: center; }

  .leaflet-body { padding: 20px 16px; }
}
