/* Tlāloc — Earthy Aztec-inspired theme */
:root {
  --terracotta: #c1694f;
  --ochre: #d4933a;
  --jade: #5a8a6a;
  --deep-teal: #2a6b6b;
  --cream: #f5efe6;
  --brown: #5c3d2e;
  --bg: #faf7f2;
  --card-bg: #ffffff;
  --text: #2d1f14;
  --text-muted: #7a6a5a;
  --border: #e5dccf;
  --green: #4a7c59;
  --yellow: #c9a23a;
  --orange: #bd6b2a;
  --blue: #3a7a8c;
  --red: #a8432e;
  --radius: 12px;
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  max-width: 880px;
  margin: 0 auto;
  padding: 0 20px;
}

/* Hero */
.hero {
  background: linear-gradient(135deg, var(--terracotta) 0%, #8b4c3a 100%);
  color: white;
  text-align: center;
  padding: 48px 20px 36px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -30px;
  right: -30px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(255,255,255,0.15) 0%, transparent 70%);
  pointer-events: none;
}
.hero h1 { font-size: 2.4rem; margin-bottom: 8px; letter-spacing: 2px; }
.hero .subtitle { font-size: 1.1rem; opacity: 0.9; max-width: 600px; margin: 0 auto; }

/* Page header */
.page-header {
  background: white;
  border-bottom: 1px solid var(--border);
  padding: 20px;
  text-align: center;
}
.page-header h1 { font-size: 1.6rem; margin: 4px 0; }
.back-link { font-size: 0.9rem; display: inline-block; margin-bottom: 4px; }
.breadcrumb { font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; }
.breadcrumb a { color: var(--text-muted); }

/* Cards grid */
.featured-cities {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 12px;
  margin: 16px 0;
}
.city-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  text-align: center;
  box-shadow: var(--shadow);
  transition: transform 0.15s;
  border-bottom: 3px solid transparent;
}
.city-card:hover {
  transform: translateY(-2px);
  border-color: var(--terracotta);
  border-bottom-color: var(--terracotta);
  text-decoration: none;
}
.city-name { display: block; font-weight: 700; font-size: 1.1rem; }
.city-province { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 2px; }

/* All cities dropdown */
.all-cities { margin: 20px 0; }
.all-cities summary { cursor: pointer; font-weight: 600; font-size: 1rem; color: var(--blue); padding: 8px 0; }
.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
  padding: 12px 0;
}
.city-link { font-size: 0.9rem; padding: 4px 8px; border-radius: 6px; }
.city-link:hover { background: #f0f0f0; text-decoration: none; }

/* Category sections */
.category { margin: 28px 0; }
.category h3 { font-size: 1.1rem; margin-bottom: 12px; color: var(--text); }

.decision-grid, .result-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
}

.decision-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow);
  transition: all 0.15s;
}
.decision-card:hover {
  border-color: var(--terracotta);
  border-bottom: 3px solid var(--terracotta);
  transform: translateY(-1px);
  text-decoration: none;
}
.card-title { display: block; font-weight: 600; margin-bottom: 4px; }
.card-desc { display: block; font-size: 0.85rem; color: var(--text-muted); }

/* Result cards */
.result-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
  transition: all 0.15s;
}
.result-card:hover {
  transform: translateY(-1px);
  text-decoration: none;
}
.result-card.verdict-yes { border-left: 4px solid var(--green); }
.result-card.verdict-no { border-left: 4px solid var(--red); }
.result-card.verdict-maybe { border-left: 4px solid var(--yellow); }
.result-card.verdict-caution { border-left: 4px solid var(--orange); }
.result-card.verdict-good { border-left: 4px solid var(--green); }
.result-card.verdict-ok { border-left: 4px solid #6c757d; }

.result-icon { font-size: 1.6rem; flex-shrink: 0; }
.result-body { flex: 1; min-width: 0; }
.result-body strong { display: block; font-size: 0.9rem; margin-bottom: 2px; }
.verdict-label { font-size: 0.85rem; color: var(--text-muted); }

/* Verdict Hero (single decision page) */
.verdict-hero {
  text-align: center;
  padding: 36px 20px;
  border-radius: var(--radius);
  margin: 20px 0;
}
.verdict-hero h1 { font-size: 1.5rem; margin: 12px 0 4px; }
.verdict-location { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 16px; }
.verdict-icon { font-size: 3.5rem; }
.verdict-answer { margin: 16px 0; }
.badge {
  display: inline-block;
  padding: 6px 14px;
  border-radius: 20px;
  font-weight: 700;
  font-size: 1rem;
  margin-bottom: 8px;
}
.badge-yes { background: #d4edda; color: #155724; }
.badge-no { background: #f8d7da; color: #721c24; }
.badge-maybe { background: #fff3cd; color: #856404; }
.badge-caution { background: #ffe8cc; color: #7b3d00; }
.badge-good { background: #d4edda; color: #155724; }
.summary { display: block; font-size: 1.15rem; font-weight: 500; margin-top: 8px; }

.verdict-hero.verdict-yes { background: #e8f5e9; border: 2px solid #c8e6c9; }
.verdict-hero.verdict-no { background: #fbe9e7; border: 2px solid #ffcdd2; }
.verdict-hero.verdict-maybe { background: #fff8e1; border: 2px solid #ffe082; }
.verdict-hero.verdict-caution { background: #fff3e0; border: 2px solid #ffcc80; }
.verdict-hero.verdict-good { background: #e8f5e9; border: 2px solid #c8e6c9; }
.verdict-hero.verdict-ok { background: #f5f5f5; border: 2px solid #e0e0e0; }

.verdict-detail {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin: 20px 0;
  box-shadow: var(--shadow);
}
.verdict-detail h2 { font-size: 1.1rem; margin-bottom: 8px; }
.verdict-detail p { font-size: 1rem; line-height: 1.7; }
.tip {
  background: #e3f2fd;
  border-radius: 8px;
  padding: 12px 16px;
  margin-top: 16px;
  font-size: 0.95rem;
}

.share-links {
  text-align: center;
  margin: 20px 0;
  padding: 16px;
  background: #f8f9fa;
  border-radius: var(--radius);
}
.share-links code {
  background: #e9ecef;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.85rem;
}

/* Other questions */
.other-questions { margin: 32px 0; }
.other-questions h2 { font-size: 1.2rem; margin-bottom: 16px; }

/* Sections */
section { margin: 32px 0; }
section h2 { font-size: 1.3rem; margin-bottom: 12px; }

.how-it-works {
  background: white;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow);
}
.how-it-works p { margin: 8px 0; color: var(--text-muted); font-size: 0.95rem; }

/* About Tialoc */
.about-tialoc {
  background: linear-gradient(135deg, #f5efe6 0%, #efe3d5 100%);
  border: 1px solid #dccfc0;
  border-radius: var(--radius);
  padding: 28px;
  margin-top: 24px;
  box-shadow: var(--shadow);
}
.about-tialoc h2 { font-size: 1.2rem; margin-bottom: 12px; color: var(--brown); }
.about-tialoc p { margin: 10px 0; line-height: 1.7; }
.about-tialoc strong { color: var(--terracotta); }

/* Error */
.error-banner {
  background: #fef2f2;
  border: 1px solid #fecaca;
  color: #991b1b;
  padding: 16px;
  border-radius: var(--radius);
  margin: 16px 0;
}

/* Bilingual Montreal */
.fr-alt, .fr-title, .fr-summary, .fr-verdict {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  font-style: italic;
  margin-top: 2px;
}
.fr-title { font-size: 0.85rem; margin: -4px 0 8px; }
.fr-summary { font-size: 0.9rem; margin-top: 6px; font-style: italic; color: var(--text-muted); }
.fr-detail { font-size: 0.9rem; font-style: italic; color: var(--text-muted); margin-top: 4px; }

.not-found { text-align: center; padding: 60px 0; }
.not-found h1 { font-size: 2rem; margin-bottom: 12px; }

/* Legal pages */
.legal-page { max-width: 720px; padding-bottom: 40px; }
.legal-page section { margin: 28px 0; }
.legal-page h2 { font-size: 1.15rem; color: var(--terracotta); margin-bottom: 8px; }
.legal-page p { margin: 8px 0; line-height: 1.7; }
.legal-page ul { margin: 8px 0 8px 20px; }
.legal-page li { margin: 4px 0; line-height: 1.6; }
.legal-page .last-updated { color: var(--text-muted); font-size: 0.85rem; }

.no-data { text-align: center; padding: 40px; color: var(--text-muted); }

footer {
  text-align: center;
  padding: 24px;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--border);
  margin-top: 40px;
}
footer strong { color: var(--terracotta); }

@media (max-width: 600px) {
  .hero h1 { font-size: 1.6rem; }
  .decision-grid, .result-grid { grid-template-columns: 1fr; }
  .featured-cities { grid-template-columns: repeat(2, 1fr); }
  .verdict-hero { padding: 24px 14px; }
  .verdict-hero h1 { font-size: 1.2rem; }
}