/* ==========================================================================
   Richmond, North Yorkshire — main.css
   Colour palette:
     Background:  #F5F0E8 (warm cream)
     Surface:     #FDFAF5 (cards/panels)
     Text:        #2C2C2C
     Primary:     #5C7A5C (stone green — nav, headings, buttons)
     Accent:      #7A2C3E (burgundy — links and hover only)
     Border:      #D4CBBA
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Reset & base
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

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

body {
  font-family: Georgia, "Times New Roman", serif;
  background-color: #F5F0E8;
  color: #2C2C2C;
  line-height: 1.7;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

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

/* --------------------------------------------------------------------------
   2. Typography
   -------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
  font-family: Georgia, "Times New Roman", serif;
  color: #5C7A5C;
  line-height: 1.25;
  margin-bottom: 0.5em;
}

h1 { font-size: 2.2rem; }
h2 { font-size: 1.6rem; }
h3 { font-size: 1.25rem; }

p {
  margin-bottom: 1em;
  max-width: 68ch;
}

a {
  color: #7A2C3E;
  text-decoration: underline;
}

a:hover, a:focus {
  color: #5C1028;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   3. Layout helpers
   -------------------------------------------------------------------------- */
.container {
  width: 100%;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

main {
  flex: 1;
  padding: 2rem 0;
}

/* --------------------------------------------------------------------------
   4. Navigation
   -------------------------------------------------------------------------- */
.site-header {
  background-color: #5C7A5C;
  border-bottom: 3px solid #4a6349;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.site-title a {
  font-size: 1.2rem;
  font-weight: bold;
  color: #FDFAF5;
  text-decoration: none;
  letter-spacing: 0.02em;
}

.site-title a:hover {
  color: #D4CBBA;
  text-decoration: none;
}

.site-nav ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
}

.site-nav a {
  color: #F5F0E8;
  text-decoration: none;
  padding: 0.3rem 0.7rem;
  border-radius: 3px;
  font-size: 0.95rem;
  transition: background-color 0.15s;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav a[aria-current="page"] {
  background-color: rgba(0,0,0,0.2);
  color: #fff;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   5. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  background-color: #5C7A5C;
  color: #D4CBBA;
  text-align: center;
  padding: 1.25rem;
  font-size: 0.875rem;
  border-top: 3px solid #4a6349;
}

.site-footer a {
  color: #F5F0E8;
}

.site-footer a:hover {
  color: #fff;
}

/* --------------------------------------------------------------------------
   6. Hero (homepage)
   -------------------------------------------------------------------------- */
.hero {
  background-color: #FDFAF5;
  border-bottom: 1px solid #D4CBBA;
  padding: 3rem 0 2.5rem;
  margin-bottom: 2.5rem;
}

.hero h1 {
  font-size: 2.6rem;
  margin-bottom: 0.75rem;
}

.hero p {
  font-size: 1.1rem;
  max-width: 60ch;
  color: #444;
}

/* --------------------------------------------------------------------------
   7. Card grid
   -------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  background-color: #FDFAF5;
  border: 1px solid #D4CBBA;
  border-radius: 4px;
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.15rem;
}

.card p {
  flex: 1;
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 1rem;
  max-width: none;
}

.card-link {
  display: inline-block;
  color: #5C7A5C;
  font-weight: bold;
  font-size: 0.9rem;
  text-decoration: none;
  border: 2px solid #5C7A5C;
  padding: 0.35rem 0.8rem;
  border-radius: 3px;
  align-self: flex-start;
  transition: background-color 0.15s, color 0.15s;
}

.card-link:hover, .card-link:focus {
  background-color: #5C7A5C;
  color: #FDFAF5;
  text-decoration: none;
}

/* --------------------------------------------------------------------------
   8. Section intro / page header
   -------------------------------------------------------------------------- */
.page-header {
  margin-bottom: 2rem;
}

.page-header h1 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.page-header p {
  color: #555;
  font-size: 1.05rem;
}

/* --------------------------------------------------------------------------
   9. Prose content (single pages, visit, other-richmonds)
   -------------------------------------------------------------------------- */
.prose h2 {
  margin-top: 1.75rem;
  margin-bottom: 0.5rem;
}

.prose h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.4rem;
}

.prose ul, .prose ol {
  margin-left: 1.5rem;
  margin-bottom: 1em;
}

.prose li {
  margin-bottom: 0.3em;
}

.prose a {
  color: #7A2C3E;
}

.prose blockquote {
  border-left: 4px solid #D4CBBA;
  padding-left: 1rem;
  margin: 1.25rem 0;
  color: #555;
  font-style: italic;
}

/* --------------------------------------------------------------------------
   10. Other Richmonds page — region groups
   -------------------------------------------------------------------------- */
.region-group {
  margin-bottom: 2rem;
}

.region-group h2 {
  font-size: 1.3rem;
  border-bottom: 2px solid #D4CBBA;
  padding-bottom: 0.3rem;
  margin-bottom: 0.75rem;
}

.region-group ul {
  list-style: none;
  padding: 0;
}

.region-group li {
  padding: 0.3rem 0;
  border-bottom: 1px solid #EDE8DF;
  font-size: 0.97rem;
}

/* --------------------------------------------------------------------------
   11. Leaflet map wrapper
   -------------------------------------------------------------------------- */
.map-wrapper {
  margin: 1.5rem 0 2rem;
  border: 1px solid #D4CBBA;
  border-radius: 4px;
  overflow: hidden;
}

#richmonds-map {
  height: 450px;
  width: 100%;
}

/* --------------------------------------------------------------------------
   12. Single place page
   -------------------------------------------------------------------------- */
.place-meta {
  margin-top: 1rem;
  padding: 1.25rem;
  background-color: #FDFAF5;
  border: 1px solid #D4CBBA;
  border-radius: 4px;
  display: inline-block;
}

.place-meta p {
  margin: 0 0 0.5rem;
  font-size: 0.95rem;
}

.place-meta a {
  font-weight: bold;
}

/* --------------------------------------------------------------------------
   13. Utilities
   -------------------------------------------------------------------------- */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* --------------------------------------------------------------------------
   14. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
  h1 { font-size: 1.8rem; }
  .hero h1 { font-size: 2rem; }

  .site-header .container {
    flex-direction: column;
    align-items: flex-start;
  }

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