/* ==========================================================================
   Tema e Variáveis de Design do Correio Lageano
   ========================================================================== */

:root {
  /* Paleta Escura Padrão (Dark Mode Premium) */
  --bg-main: #0c0f17;
  --bg-card: rgba(22, 27, 40, 0.75);
  --bg-card-hover: rgba(30, 37, 54, 0.9);
  --bg-glass: rgba(16, 21, 33, 0.85);
  --border-subtle: rgba(255, 255, 255, 0.08);
  --border-focus: #f59e0b;
  --border-highlight: rgba(245, 158, 11, 0.35);

  --text-main: #f3f4f6;
  --text-muted: #9ca3af;
  --text-dim: #6b7280;
  
  --primary: #f59e0b;        /* Âmbar histórico */
  --primary-hover: #d97706;
  --primary-glow: rgba(245, 158, 11, 0.25);
  
  --accent: #3b82f6;         /* Azul acento */
  --accent-light: #60a5fa;
  --success: #10b981;
  --tag-bg: rgba(245, 158, 11, 0.12);
  --tag-text: #fbbf24;

  --mark-bg: #fbbf24;
  --mark-text: #1e1b18;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.6);

  --radius-sm: 6px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;

  --font-main: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-serif: 'Playfair Display', Georgia, serif;
}

[data-theme="light"] {
  --bg-main: #f8fafc;
  --bg-card: rgba(255, 255, 255, 0.9);
  --bg-card-hover: #ffffff;
  --bg-glass: rgba(255, 255, 255, 0.85);
  --border-subtle: rgba(0, 0, 0, 0.08);
  --border-focus: #d97706;
  --border-highlight: rgba(217, 119, 6, 0.3);

  --text-main: #111827;
  --text-muted: #4b5563;
  --text-dim: #9ca3af;

  --primary: #d97706;
  --primary-hover: #b45309;
  --primary-glow: rgba(217, 119, 6, 0.15);

  --accent: #2563eb;
  --accent-light: #3b82f6;
  --tag-bg: rgba(217, 119, 6, 0.1);
  --tag-text: #b45309;

  --mark-bg: #fde047;
  --mark-text: #1f2937;

  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
  --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.08);
  --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.12);
}

/* ==========================================================================
   Reset & Estrutura Base
   ========================================================================== */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-main);
  background-color: var(--bg-main);
  color: var(--text-main);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  line-height: 1.5;
  transition: background-color 0.25s ease, color 0.25s ease;
  overflow-x: hidden;
}

/* ==========================================================================
   Header
   ========================================================================== */

.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg-glass);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border-subtle);
  padding: 14px 24px;
}

.header-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.brand-icon {
  font-size: 2rem;
  background: linear-gradient(135deg, var(--primary), #ef4444);
  -webkit-background-clip: text;
  background-clip: text;
  filter: drop-shadow(0 2px 8px var(--primary-glow));
}

.brand-title {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.brand-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.stats-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  color: var(--text-muted);
}

.pulse-dot {
  width: 8px;
  height: 8px;
  background-color: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 8px var(--success);
  animation: pulseAnim 2s infinite ease-in-out;
}

@keyframes pulseAnim {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(0.8); }
}

.icon-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s ease;
}

.icon-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  transform: translateY(-1px);
}

/* ==========================================================================
   Conteúdo Principal & Hero
   ========================================================================== */

.main-content {
  flex: 1;
  max-width: 1280px;
  width: 100%;
  margin: 0 auto;
  padding: 36px 24px;
  display: flex;
  flex-direction: column;
  gap: 32px;
}

.search-section {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.search-hero-content {
  text-align: center;
  max-width: 840px;
  margin: 0 auto;
}

.search-headline {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
}

.gradient-text {
  background: linear-gradient(135deg, var(--primary) 0%, #f97316 50%, #ec4899 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.search-description {
  color: var(--text-muted);
  font-size: 1.05rem;
  margin-bottom: 28px;
}

/* Caixa de Busca */
.search-box-container {
  display: flex;
  gap: 12px;
  position: relative;
  background: var(--bg-card);
  padding: 6px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border-subtle);
  box-shadow: var(--shadow-md);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
}

.search-box-container:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow), var(--shadow-md);
}

.search-input-wrapper {
  flex: 1;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 12px;
}

.search-icon {
  font-size: 1.2rem;
  color: var(--text-dim);
}

.search-input {
  width: 100%;
  border: none;
  outline: none;
  background: transparent;
  color: var(--text-main);
  font-size: 1.1rem;
  font-family: inherit;
}

.search-input::placeholder {
  color: var(--text-dim);
  font-size: 1rem;
}

.clear-btn {
  background: transparent;
  border: none;
  color: var(--text-dim);
  cursor: pointer;
  font-size: 1rem;
  padding: 6px;
  border-radius: 50%;
  transition: color 0.2s;
}

.clear-btn:hover {
  color: var(--text-main);
}

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-hover));
  color: #111827;
  border: none;
  padding: 12px 28px;
  border-radius: var(--radius-md);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: 0 4px 14px var(--primary-glow);
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.08);
}

.btn-primary:active {
  transform: translateY(0);
}

/* Sugestões Rápidas */
.quick-suggestions {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 16px;
}

.suggestion-label {
  font-size: 0.85rem;
  color: var(--text-dim);
}

.chip-btn {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  padding: 5px 12px;
  border-radius: var(--radius-full);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s ease;
}

.chip-btn:hover {
  background: var(--bg-card-hover);
  color: var(--primary);
  border-color: var(--border-highlight);
  transform: translateY(-1px);
}

/* ==========================================================================
   Painel de Filtros
   ========================================================================== */

.filters-panel {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px 20px;
}

.filters-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 20px;
}

.filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.filter-label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.decade-selector {
  display: flex;
  gap: 6px;
  background: rgba(0, 0, 0, 0.15);
  padding: 4px;
  border-radius: var(--radius-full);
  border: 1px solid var(--border-subtle);
}

.pill-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s ease;
}

.pill-btn.active {
  background: var(--primary);
  color: #111827;
  font-weight: 600;
}

.pill-btn:hover:not(.active) {
  color: var(--text-main);
}

.select-input {
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  font-family: inherit;
  outline: none;
  cursor: pointer;
  transition: border-color 0.2s;
}

.select-input:focus {
  border-color: var(--primary);
}

/* ==========================================================================
   Linha do Tempo / Histograma
   ========================================================================== */

.timeline-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.timeline-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.timeline-title-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timeline-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.timeline-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.timeline-bars {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 80px;
  padding-top: 10px;
  overflow-x: auto;
}

.timeline-bar-col {
  flex: 1;
  min-width: 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  transition: transform 0.15s ease;
}

.timeline-bar-col:hover {
  transform: translateY(-2px);
}

.timeline-bar-col.active .bar-fill {
  background: var(--primary);
  box-shadow: 0 0 10px var(--primary);
}

.timeline-bar-col.active .bar-year {
  color: var(--primary);
  font-weight: 700;
}

.bar-wrapper {
  width: 100%;
  height: 52px;
  display: flex;
  align-items: flex-end;
  background: rgba(255, 255, 255, 0.03);
  border-radius: 4px;
}

.bar-fill {
  width: 100%;
  background: var(--accent);
  border-radius: 3px 3px 0 0;
  transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1), background-color 0.2s;
  min-height: 4px;
}

.bar-year {
  font-size: 0.68rem;
  color: var(--text-dim);
}

/* ==========================================================================
   Resultados da Busca
   ========================================================================== */

.results-section {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.results-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border-subtle);
}

.results-count-text {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-main);
}

.active-filter-tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.75rem;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  margin-left: 10px;
  font-weight: 600;
}

.clear-filters-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  font-size: 0.8rem;
  padding: 4px 12px;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all 0.2s;
}

.clear-filters-btn:hover {
  color: var(--text-main);
  border-color: var(--text-dim);
}

/* Loading & Empty State */
.loading-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
}

.spinner {
  width: 44px;
  height: 44px;
  border: 3px solid var(--border-subtle);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 16px;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--text-muted);
  max-width: 800px;
  margin: 0 auto;
}

.empty-icon {
  font-size: 3rem;
  margin-bottom: 16px;
  opacity: 0.8;
}

.empty-state h3 {
  font-size: 1.3rem;
  color: var(--text-main);
  margin-bottom: 8px;
}

.search-tips {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 36px;
  text-align: left;
}

.tip-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 16px;
}

.tip-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  display: block;
  margin-bottom: 6px;
}

.tip-card p {
  font-size: 0.8rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.tip-card code {
  background: rgba(0, 0, 0, 0.2);
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--text-main);
  font-size: 0.78rem;
}

/* Grid de Resultados */
.results-grid {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.result-card {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  box-shadow: var(--shadow-sm);
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.result-card:hover {
  background: var(--bg-card-hover);
  border-color: var(--border-highlight);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
}

.card-meta-left {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
}

.edition-badge {
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--text-main);
  font-family: var(--font-serif);
}

.year-tag {
  background: var(--tag-bg);
  color: var(--tag-text);
  font-size: 0.75rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
}

.date-text {
  font-size: 0.85rem;
  color: var(--text-muted);
}

.page-badge {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent-light);
  background: rgba(59, 130, 246, 0.12);
  padding: 3px 10px;
  border-radius: var(--radius-full);
}

/* Snippet em destaque */
.card-snippet {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--text-muted);
  background: rgba(0, 0, 0, 0.15);
  border-left: 3px solid var(--primary);
  padding: 12px 16px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  word-break: break-word;
}

.card-snippet mark {
  background-color: var(--mark-bg);
  color: var(--mark-text);
  font-weight: 700;
  padding: 1px 4px;
  border-radius: 3px;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 4px;
  flex-wrap: wrap;
}

.action-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
}

.action-btn:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateY(-1px);
}

.action-btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #111827;
  font-weight: 600;
}

.action-btn-primary:hover {
  background: var(--primary-hover);
  color: #111827;
}

/* Paginação */
.pagination-bar {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding: 20px 0;
}

.btn-page {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 8px 18px;
  border-radius: var(--radius-sm);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s;
}

.btn-page:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-page:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.page-info {
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ==========================================================================
   Modal do Leitor de Texto
   ========================================================================== */

.modal {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
}

.modal-dialog {
  position: relative;
  z-index: 101;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 860px;
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 18px 24px;
  border-bottom: 1px solid var(--border-subtle);
  background: var(--bg-glass);
}

.modal-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--text-main);
}

.modal-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.modal-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.modal-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s;
}

.modal-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.modal-btn-primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #111827;
  font-weight: 600;
}

.modal-btn-primary:hover {
  background: var(--primary-hover);
  color: #111827;
}

.modal-close-btn {
  background: transparent;
  border: none;
  color: var(--text-muted);
  font-size: 1.2rem;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
  transition: color 0.2s;
}

.modal-close-btn:hover {
  color: var(--text-main);
}

.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  flex: 1;
}

.modal-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.modal-meta-tag {
  font-size: 0.75rem;
  color: var(--text-dim);
}

.font-controls {
  display: flex;
  gap: 6px;
}

.font-size-btn {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-subtle);
  color: var(--text-main);
  width: 30px;
  height: 30px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 0.75rem;
}

.font-size-btn:hover {
  border-color: var(--primary);
}

.modal-text-content {
  font-family: monospace, serif;
  font-size: 0.92rem;
  line-height: 1.7;
  color: var(--text-main);
  white-space: pre-wrap;
  word-break: break-word;
  background: rgba(0, 0, 0, 0.2);
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

/* Toast */
.toast {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 200;
  background: #10b981;
  color: #ffffff;
  padding: 12px 20px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.3s ease;
}

@keyframes slideUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Footer */
.app-footer {
  border-top: 1px solid var(--border-subtle);
  padding: 24px;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.footer-sub {
  font-size: 0.75rem;
  opacity: 0.7;
}

/* ==========================================================================
   Landing Page — Home
   ========================================================================== */

.home-hero {
  text-align: center;
  max-width: 840px;
  margin: 0 auto;
  padding: 20px 0 8px;
}

.home-headline {
  font-family: var(--font-serif);
  font-size: 2.6rem;
  font-weight: 700;
  line-height: 1.2;
  margin-bottom: 12px;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.home-description {
  color: var(--text-muted);
  font-size: 1.05rem;
  max-width: 640px;
  margin: 0 auto;
}

.home-info-section {
  margin-top: 16px;
}

/* Cities Section */
.cities-section {
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 24px;
}

.cities-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.cities-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

/* City Card */
.city-card {
  background: var(--bg-main);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}

.city-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), #f97316, #ec4899);
  opacity: 0;
  transition: opacity 0.25s ease;
}

.city-card:hover {
  border-color: var(--border-highlight);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.city-card:hover::before {
  opacity: 1;
}

.city-card-header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.city-emoji {
  font-size: 1.6rem;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.2));
}

.city-name {
  font-family: var(--font-serif);
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text-main);
}

.city-stats {
  display: flex;
  gap: 20px;
}

.city-stat {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.city-stat-value {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--primary);
}

.city-stat-label {
  font-size: 0.72rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.city-period {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.82rem;
  color: var(--text-muted);
}

.city-period-icon {
  font-size: 0.9rem;
}

.city-card-arrow {
  position: absolute;
  top: 50%;
  right: 18px;
  transform: translateY(-50%);
  font-size: 1.4rem;
  color: var(--text-dim);
  transition: all 0.2s ease;
  opacity: 0;
}

.city-card:hover .city-card-arrow {
  opacity: 1;
  color: var(--primary);
  right: 14px;
}

/* ==========================================================================
   Back Link (in city search pages)
   ========================================================================== */

.back-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--bg-card);
  border: 1px solid var(--border-subtle);
  color: var(--text-muted);
  text-decoration: none;
  font-size: 1.2rem;
  font-weight: 600;
  transition: all 0.2s ease;
  flex-shrink: 0;
}

.back-link:hover {
  background: var(--bg-card-hover);
  border-color: var(--primary);
  color: var(--primary);
  transform: translateX(-2px);
}

/* ==========================================================================
   Jornal Tag (in result cards)
   ========================================================================== */

.jornal-tag {
  background: rgba(59, 130, 246, 0.12);
  color: var(--accent-light);
  font-size: 0.72rem;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}

/* ==========================================================================
   Responsividade
   ========================================================================== */

@media (max-width: 768px) {
  .home-headline,
  .search-headline {
    font-size: 1.8rem;
  }
  
  .search-box-container {
    flex-direction: column;
  }

  .btn-primary {
    width: 100%;
  }

  .filters-row {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-group {
    flex-direction: column;
    align-items: flex-start;
  }

  .decade-selector {
    width: 100%;
    overflow-x: auto;
  }

  .cities-grid {
    grid-template-columns: 1fr;
  }

  .city-stats {
    gap: 12px;
  }

  .city-card-arrow {
    display: none;
  }

  .header-container {
    flex-wrap: wrap;
  }

  .stats-badge {
    display: none;
  }
}

