/* UrbanWalkAtlas – Core Styles */

:root {
  --bg-primary: #fff;
  --bg-secondary: #f9f9f9;
  --bg-tertiary: #f7f7f7;
  --text-primary: #222;
  --text-secondary: #555;
  --text-tertiary: #666;
  --border-color: #eee;
  --border-dark: #ddd;
  --accent-color: #3b6ea8;
  --link-color: #3b6ea8;
}

[data-theme="dark"] {
  --bg-primary: #1a1a1a;
  --bg-secondary: #2a2a2a;
  --bg-tertiary: #333;
  --text-primary: #e0e0e0;
  --text-secondary: #b0b0b0;
  --text-tertiary: #999;
  --border-color: #333;
  --border-dark: #444;
  --accent-color: #5a8fc7;
  --link-color: #5a8fc7;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.6;
  color: var(--text-primary);
  background: var(--bg-primary);
  transition: background-color 0.3s ease, color 0.3s ease;
}

.wrap {
  max-width: 820px;
  margin: 0 auto;
  padding: 20px;
}

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

/* Header */

.site-header {
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

.site-header .logo {
  font-size: 20px;
  font-weight: 600;
  text-decoration: none;
  color: inherit;
}

header {
  border-bottom: 1px solid var(--border-color);
  margin-bottom: 20px;
}

header h1 {
  font-size: 20px;
  font-weight: 600;
}

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

nav {
  margin-top: 8px;
  display: flex;
  align-items: center;
  gap: 15px;
}

nav a {
  font-size: 14px;
  color: var(--text-secondary);
}

nav a:hover {
  text-decoration: underline;
}

/* Theme Toggle Button */
.theme-toggle {
  margin-left: auto;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  color: var(--text-primary);
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  transition: all 0.3s ease;
}

.theme-toggle:hover {
  background: var(--bg-tertiary);
  border-color: var(--border-dark);
}

/* Typography */

h2 {
  font-size: 24px;
  margin-bottom: 10px;
}

h3 {
  font-size: 18px;
  margin-bottom: 10px;
}

p {
  margin: 10px 0;
}

em {
  color: var(--text-secondary);
}

/* Tables */

table {
  width: 100%;
  border-collapse: collapse;
  margin: 15px 0;
  font-size: 14px;
}

th, td {
  border: 1px solid var(--border-dark);
  padding: 10px;
  text-align: left;
}

th {
  background: var(--bg-tertiary);
}

/* Walk Entry Cards */

.walk-entry {
  background: var(--bg-secondary);
  border-left: 4px solid var(--accent-color);
  padding: 12px 15px;
  margin: 15px 0;
}

.walk-entry h4 {
  font-size: 15px;
  margin-bottom: 5px;
}

.meta {
  font-size: 13px;
  color: var(--text-tertiary);
}

/* Lists */

ul.city-list {
  list-style: none;
  padding-left: 0;
}

ul.city-list li {
  margin: 6px 0;
}

ul.city-list a {
  color: var(--link-color);
  text-decoration: none;
}

ul.city-list a:hover {
  text-decoration: underline;
}

/* Hero Section */

.hero {
  margin-bottom: 40px;
}

.hero h1 {
  font-size: 32px;
  margin-bottom: 15px;
}

.lead {
  font-size: 18px;
  line-height: 1.7;
  color: var(--text-secondary);
}

/* Note Section */

.note {
  border-top: 1px solid var(--border-color);
  margin-top: 40px;
  padding-top: 20px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Footer note */

.footer-note {
  border-top: 1px solid var(--border-color);
  margin-top: 25px;
  padding-top: 15px;
  font-size: 14px;
  color: var(--text-secondary);
}

/* Footer */

.site-footer {
  border-top: 1px solid var(--border-color);
  margin-top: 40px;
  padding: 15px 0;
  font-size: 13px;
  color: var(--text-tertiary);
  text-align: center;
}

footer {
  border-top: 1px solid var(--border-color);
  margin-top: 40px;
  padding: 15px 0;
  font-size: 13px;
  color: var(--text-tertiary);
}

footer nav a {
  margin-right: 12px;
  color: var(--text-tertiary);
}

/* Links */

a {
  color: var(--link-color);
}

a:hover {
  text-decoration: underline;
}

/* Responsive */

/* Touch-friendly tap targets */
a, button {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
}

nav a {
  padding: 8px 0;
}

/* Tablet and below */
@media (max-width: 768px) {
  .wrap {
    padding: 18px;
  }

  h2 {
    font-size: 22px;
  }

  h3 {
    font-size: 17px;
  }

  /* Better table handling on tablets */
  table {
    font-size: 13px;
  }

  th, td {
    padding: 8px;
  }
}

/* Mobile */
@media (max-width: 600px) {
  .wrap {
    padding: 15px;
  }

  header h1 {
    font-size: 18px;
  }

  h2 {
    font-size: 20px;
  }

  h3 {
    font-size: 16px;
  }

  /* Stack navigation on small screens */
  nav {
    margin-top: 12px;
  }

  nav a {
    display: inline-block;
    margin-right: 18px;
    margin-bottom: 8px;
  }

  /* Responsive tables - allow horizontal scroll */
  table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    font-size: 12px;
  }

  th, td {
    padding: 8px 6px;
    white-space: nowrap;
  }

  /* Better spacing for walk entries on mobile */
  .walk-entry {
    padding: 10px 12px;
    margin: 12px 0;
  }

  .walk-entry h4 {
    font-size: 14px;
  }

  .meta {
    font-size: 12px;
    line-height: 1.5;
  }

  /* Footer adjustments */
  footer {
    font-size: 12px;
  }

  footer nav a {
    display: block;
    margin-bottom: 8px;
    margin-right: 0;
  }
}

/* Very small mobile (iPhone SE, etc) */
@media (max-width: 375px) {
  .wrap {
    padding: 12px;
  }

  h2 {
    font-size: 18px;
  }

  h3 {
    font-size: 15px;
  }

  table {
    font-size: 11px;
  }

  th, td {
    padding: 6px 4px;
  }
}
