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

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  background: #f5f5f5;
  color: #333;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

a { color: #2a6496; text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; height: auto; }

/* ===== Header ===== */
.site-header {
  background: #fff;
  border-bottom: 3px solid #2a6496;
  padding: 1rem 1.5rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.header-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: #2a6496;
  color: #fff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  font-weight: 800;
  flex-shrink: 0;
}

.site-title {
  font-size: 1.3rem;
  font-weight: 700;
  color: #222;
  line-height: 1.2;
}

.site-subtitle {
  font-size: 0.75rem;
  color: #888;
  font-weight: 400;
}

.main-nav {
  margin-left: auto;
  display: flex;
  gap: 1rem;
  font-size: 0.85rem;
}

.main-nav a {
  color: #555;
  font-weight: 500;
  padding: 0.25rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s;
}

.main-nav a:hover,
.main-nav a.active {
  color: #2a6496;
  border-bottom-color: #2a6496;
  text-decoration: none;
}

/* ===== Main ===== */
main {
  flex: 1;
  max-width: 960px;
  margin: 0 auto;
  padding: 1.5rem 1rem;
  width: 100%;
}

/* ===== Filter Bar ===== */
.filter-bar {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
  align-items: stretch;
}

.filter-bar input,
.filter-bar select {
  font: inherit;
  font-size: 0.9rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid #ccc;
  border-radius: 6px;
  background: #fff;
  color: #333;
  transition: border-color 0.2s;
  min-width: 0;
}

.filter-bar input:focus,
.filter-bar select:focus {
  outline: none;
  border-color: #2a6496;
  box-shadow: 0 0 0 3px rgba(42,100,150,0.12);
}

#search {
  flex: 1 1 200px;
}

#location-filter {
  flex: 0 1 180px;
}

#date-filter {
  flex: 0 1 160px;
}

.result-info {
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 1rem;
}

/* ===== News Cards ===== */
.news-card {
  background: #fff;
  border-radius: 8px;
  padding: 1.25rem;
  margin-bottom: 0.75rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  transition: box-shadow 0.2s, transform 0.15s;
}

.news-card:hover {
  box-shadow: 0 2px 12px rgba(0,0,0,0.1);
}

.news-card.featured {
  border-left: 4px solid #2a6496;
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.news-card.featured h2 {
  font-size: 1.3rem;
}

.card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.8rem;
  color: #888;
  margin-bottom: 0.4rem;
  flex-wrap: wrap;
}

.card-header time {
  font-weight: 500;
}

.location {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
}

.location::before {
  content: "📍";
  font-size: 0.75rem;
}

.news-card h2 {
  font-size: 1.05rem;
  font-weight: 600;
  color: #222;
  margin-bottom: 0.4rem;
  line-height: 1.3;
}

.news-card .text {
  font-size: 0.9rem;
  color: #555;
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

.card-footer {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  color: #fff;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.play-btn {
  margin-left: auto;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid #2a6496;
  background: transparent;
  color: #2a6496;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s;
}

.play-btn:hover {
  background: #2a6496;
  color: #fff;
}

.play-btn.playing {
  background: #27ae60;
  border-color: #27ae60;
  color: #fff;
}

/* ===== Highlight ===== */
mark {
  background: #ffeb3b;
  color: inherit;
  padding: 0 0.15em;
  border-radius: 2px;
}

/* ===== No results / Error ===== */
.no-results,
.error {
  text-align: center;
  padding: 3rem 1rem;
  color: #888;
  font-size: 0.95rem;
}

.error { color: #c0392b; }

/* ===== Static pages ===== */
.static-page {
  background: #fff;
  border-radius: 8px;
  padding: 2rem;
  box-shadow: 0 1px 4px rgba(0,0,0,0.06);
  max-width: 700px;
  margin: 0 auto;
}

.static-page h1 {
  font-size: 1.5rem;
  color: #222;
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 2px solid #2a6496;
}

.static-page h2 {
  font-size: 1.1rem;
  color: #333;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}

.static-page p {
  margin-bottom: 0.75rem;
  color: #555;
  font-size: 0.95rem;
}

.static-page address {
  font-style: normal;
  background: #f9f9f9;
  padding: 1rem;
  border-radius: 6px;
  margin: 1rem 0;
  font-size: 0.9rem;
  line-height: 1.6;
}

.static-page address strong {
  color: #333;
}

/* ===== Footer ===== */
.site-footer {
  background: #fff;
  border-top: 1px solid #e0e0e0;
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: #999;
  margin-top: auto;
}

.site-footer .experiment-badge {
  display: inline-block;
  background: #fff3cd;
  color: #856404;
  padding: 0.3rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: 500;
  margin-bottom: 0.75rem;
}

.site-footer .footer-nav {
  margin: 0.75rem 0;
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.site-footer .footer-nav a {
  color: #888;
  font-size: 0.8rem;
}

.site-footer .footer-nav a:hover {
  color: #2a6496;
}

/* ===== Responsive ===== */
@media (max-width: 640px) {
  .site-header { padding: 0.75rem 1rem; }
  .header-inner { gap: 0.5rem; }
  .logo-icon { width: 32px; height: 32px; font-size: 1rem; }
  .site-title { font-size: 1.1rem; }
  .main-nav { width: 100%; justify-content: center; margin-left: 0; }
  .filter-bar { flex-direction: column; }
  #search, #location-filter, #date-filter { flex: 1 1 auto; width: 100%; }
  .news-card { padding: 1rem; }
  .news-card.featured { padding: 1.25rem; }
  .news-card.featured h2 { font-size: 1.1rem; }
  .static-page { padding: 1.25rem; }
}

@media (min-width: 768px) {
  .news-card.featured h2 { font-size: 1.4rem; }
}

.logo-icon img {
  height: 48px;
  width: auto;
}

.logo-icon {
  width: 48px;
  height: 48px;
}

.experiment-banner {
  background: #fff3cd;
  color: #856404;
  text-align: center;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  border-bottom: 1px solid #ffc107;
  width: 100%;
}

/* Audio Player */
audio {
  border-radius: 4px;
  background: #f0f0f0;
}

.news-card .card-footer audio {
  margin-left: auto;
}
