/*
Theme Name: Netley Abbey
Theme URI: https://netleyabbey.uk
Author: Netley Abbey Research Project
Author URI: https://netleyabbey.uk
Description: A clean, minimal theme for historical research on Netley Abbey - a 13th-century Cistercian abbey ruin in Hampshire, England. Features excellent typography for long-form articles, a neutral palette inspired by aged parchment and stone, and templates for archives and interactive maps.
Version: 1.0.0
Requires at least: 6.0
Tested up to: 6.4
Requires PHP: 8.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: netley-abbey
Tags: blog, one-column, custom-menu, featured-images, threaded-comments, translation-ready, custom-logo, editor-style, wide-blocks

Netley Abbey WordPress Theme, (C) 2024 Netley Abbey Research Project
*/

/* ========================================================================
   CSS Custom Properties
   ======================================================================== */

:root {
  /* Colors - Aged Parchment & Stone */
  --color-background: #f7f5f0;
  --color-background-alt: #efece4;
  --color-foreground: #2c2c2c;
  --color-foreground-muted: #5c5c5c;
  --color-border: #d4d0c8;
  --color-border-light: #e8e4dc;
  
  /* Accent - Muted Forest Green */
  --color-primary: #4a6741;
  --color-primary-hover: #3d5636;
  --color-primary-light: #e8ede7;
  
  /* Typography */
  --font-serif: 'Source Serif 4', 'Georgia', 'Times New Roman', serif;
  --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  
  /* Spacing */
  --content-width: 720px;
  --content-width-wide: 1080px;
  --site-padding: 1.5rem;
  
  /* Borders */
  --radius-sm: 0.25rem;
  --radius-md: 0.5rem;
  --radius-lg: 0.75rem;
}

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

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

html {
  font-size: 16px;
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body {
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-foreground);
  background-color: var(--color-background);
}

/* ========================================================================
   Typography
   ======================================================================== */

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.25;
  color: var(--color-foreground);
}

h1 { font-size: 2.5rem; letter-spacing: -0.025em; }
h2 { font-size: 1.875rem; letter-spacing: -0.02em; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }
h5 { font-size: 1.125rem; }
h6 { font-size: 1rem; }

p {
  margin-bottom: 1.5rem;
}

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--color-primary-hover);
}

/* ========================================================================
   Layout
   ======================================================================== */

.site-container {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

.container {
  width: 100%;
  max-width: var(--content-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--site-padding);
  padding-right: var(--site-padding);
}

.container-wide {
  max-width: var(--content-width-wide);
}

.container-full {
  max-width: none;
}

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

.site-header {
  background-color: var(--color-background);
  border-bottom: 1px solid var(--color-border-light);
  position: sticky;
  top: 0;
  z-index: 100;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4rem;
  max-width: var(--content-width-wide);
  margin: 0 auto;
  padding: 0 var(--site-padding);
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.site-title {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--color-foreground);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.site-title:hover {
  color: var(--color-primary);
}

.site-tagline {
  display: none;
  font-size: 0.75rem;
  color: var(--color-foreground-muted);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

@media (min-width: 768px) {
  .site-tagline {
    display: block;
  }
}

/* Primary Navigation */
.primary-navigation {
  display: none;
}

@media (min-width: 768px) {
  .primary-navigation {
    display: flex;
    align-items: center;
    gap: 2rem;
  }
}

.primary-navigation ul {
  display: flex;
  align-items: center;
  gap: 2rem;
  list-style: none;
}

.primary-navigation a {
  font-size: 0.875rem;
  color: var(--color-foreground-muted);
  text-decoration: none;
  transition: color 0.2s ease;
}

.primary-navigation a:hover,
.primary-navigation .current-menu-item a {
  color: var(--color-foreground);
}

/* Mobile Menu Toggle */
.menu-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background-color 0.2s ease;
}

.menu-toggle:hover {
  background-color: var(--color-background-alt);
}

@media (min-width: 768px) {
  .menu-toggle {
    display: none;
  }
}

/* Mobile Navigation */
.mobile-navigation {
  display: none;
  background-color: var(--color-background);
  border-bottom: 1px solid var(--color-border-light);
  padding: 1rem var(--site-padding);
}

.mobile-navigation.is-active {
  display: block;
}

.mobile-navigation ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.mobile-navigation a {
  display: block;
  padding: 0.5rem 0;
  font-size: 0.875rem;
  color: var(--color-foreground-muted);
  text-decoration: none;
}

.mobile-navigation a:hover {
  color: var(--color-foreground);
}

@media (min-width: 768px) {
  .mobile-navigation {
    display: none !important;
  }
}

/* ========================================================================
   Site Footer
   ======================================================================== */

.site-footer {
  background-color: var(--color-background-alt);
  border-top: 1px solid var(--color-border-light);
  padding: 3rem 0;
  margin-top: 4rem;
}

.site-footer-inner {
  max-width: var(--content-width-wide);
  margin: 0 auto;
  padding: 0 var(--site-padding);
}

.footer-content {
  display: grid;
  gap: 2rem;
}

@media (min-width: 768px) {
  .footer-content {
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
  }
}

.footer-about h3,
.footer-nav h3,
.footer-meta h3 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-foreground-muted);
  margin-bottom: 1rem;
}

.footer-about p {
  font-size: 0.875rem;
  color: var(--color-foreground-muted);
  line-height: 1.7;
  margin-bottom: 0;
}

.footer-nav ul {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.footer-nav a {
  font-size: 0.875rem;
  color: var(--color-foreground-muted);
  text-decoration: none;
}

.footer-nav a:hover {
  color: var(--color-foreground);
}

.footer-meta p {
  font-size: 0.75rem;
  color: var(--color-foreground-muted);
  margin-bottom: 0.5rem;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border);
  text-align: center;
}

.footer-bottom p {
  font-size: 0.75rem;
  color: var(--color-foreground-muted);
  margin-bottom: 0;
}

/* ========================================================================
   Hero Section
   ======================================================================== */

.hero {
  position: relative;
  height: 50vh;
  min-height: 400px;
  max-height: 600px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero-image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.7) 0%, rgba(0,0,0,0.2) 50%, transparent 100%);
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: var(--content-width-wide);
  margin: 0 auto;
  padding: 2rem var(--site-padding);
  color: #fff;
}

.hero-title {
  font-size: 2.5rem;
  color: #fff;
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 3.5rem;
  }
}

.hero-subtitle {
  font-size: 1.125rem;
  color: rgba(255,255,255,0.9);
  font-family: var(--font-sans);
}

/* ========================================================================
   Section Styling
   ======================================================================== */

.section {
  padding: 3rem 0;
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1.5rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid var(--color-border-light);
}

.section-title {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-foreground-muted);
  margin-bottom: 0;
}

.section-link {
  font-size: 0.875rem;
  color: var(--color-primary);
}

/* ========================================================================
   Article Cards
   ======================================================================== */

.article-grid {
  display: grid;
  gap: 1.5rem;
}

@media (min-width: 640px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .article-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.article-card {
  background-color: var(--color-background);
  border: 1px solid var(--color-border-light);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.article-card:hover {
  border-color: var(--color-border);
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

.article-card-image {
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background-color: var(--color-background-alt);
}

.article-card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.3s ease;
}

.article-card:hover .article-card-image img {
  transform: scale(1.03);
}

.article-card-content {
  padding: 1.25rem;
}

.article-card-meta {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.article-card-category {
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  background-color: var(--color-primary-light);
  padding: 0.25rem 0.5rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
}

.article-card-date {
  font-size: 0.75rem;
  color: var(--color-foreground-muted);
}

.article-card-title {
  font-size: 1.125rem;
  margin-bottom: 0.5rem;
  line-height: 1.3;
}

.article-card-title a {
  color: var(--color-foreground);
  text-decoration: none;
}

.article-card-title a:hover {
  color: var(--color-primary);
}

.article-card-excerpt {
  font-size: 0.875rem;
  color: var(--color-foreground-muted);
  line-height: 1.6;
  margin-bottom: 0;
}

/* Featured Article Card */
.article-card-featured {
  grid-column: 1 / -1;
}

@media (min-width: 768px) {
  .article-card-featured {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
  
  .article-card-featured .article-card-image {
    aspect-ratio: auto;
  }
  
  .article-card-featured .article-card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 2rem;
  }
  
  .article-card-featured .article-card-title {
    font-size: 1.5rem;
  }
}

/* ========================================================================
   Single Article / Post
   ======================================================================== */

.article-header {
  padding: 3rem 0 2rem;
  text-align: center;
}

.article-category {
  display: inline-block;
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  background-color: var(--color-primary-light);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  margin-bottom: 1rem;
  text-decoration: none;
}

.article-title {
  font-size: 2.25rem;
  margin-bottom: 1rem;
  text-wrap: balance;
}

@media (min-width: 768px) {
  .article-title {
    font-size: 3rem;
  }
}

.article-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  font-size: 0.875rem;
  color: var(--color-foreground-muted);
}

.article-meta-divider {
  width: 4px;
  height: 4px;
  background-color: var(--color-border);
  border-radius: 50%;
}

.article-featured-image {
  max-width: var(--content-width-wide);
  margin: 0 auto 3rem;
  padding: 0 var(--site-padding);
}

.article-featured-image img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
}

.article-featured-image figcaption {
  font-size: 0.8125rem;
  color: var(--color-foreground-muted);
  text-align: center;
  margin-top: 0.75rem;
}

/* Article Content */
.article-content {
  font-family: var(--font-serif);
  font-size: 1.125rem;
  line-height: 1.7;
}

.article-content h2 {
  font-size: 1.75rem;
  margin-top: 3rem;
  margin-bottom: 1rem;
}

.article-content h3 {
  font-size: 1.375rem;
  margin-top: 2.5rem;
  margin-bottom: 0.75rem;
}

.article-content h4 {
  font-size: 1.125rem;
  margin-top: 2rem;
  margin-bottom: 0.5rem;
}

.article-content p {
  margin-bottom: 1.5rem;
}

.article-content ul,
.article-content ol {
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.article-content li {
  margin-bottom: 0.5rem;
}

.article-content a {
  color: var(--color-primary);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.article-content blockquote {
  font-style: italic;
  border-left: 3px solid var(--color-primary);
  padding-left: 1.5rem;
  margin: 2rem 0;
  color: var(--color-foreground-muted);
}

.article-content blockquote p:last-child {
  margin-bottom: 0;
}

.article-content blockquote cite {
  display: block;
  font-size: 0.875rem;
  font-style: normal;
  margin-top: 0.75rem;
  color: var(--color-foreground-muted);
}

/* Pull Quote */
.pull-quote {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 500;
  line-height: 1.4;
  text-align: center;
  color: var(--color-foreground);
  padding: 2rem 0;
  margin: 2rem 0;
  border-top: 1px solid var(--color-border-light);
  border-bottom: 1px solid var(--color-border-light);
}

/* Article Figures */
.article-content figure {
  margin: 2rem 0;
}

.article-content figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

.article-content figcaption {
  font-family: var(--font-sans);
  font-size: 0.8125rem;
  color: var(--color-foreground-muted);
  text-align: center;
  margin-top: 0.75rem;
}

/* Wide/Full Width Alignments */
.alignwide {
  margin-left: calc(-1 * var(--site-padding));
  margin-right: calc(-1 * var(--site-padding));
  max-width: calc(100% + 2 * var(--site-padding));
  width: calc(100% + 2 * var(--site-padding));
}

@media (min-width: 1080px) {
  .alignwide {
    margin-left: calc((var(--content-width) - var(--content-width-wide)) / 2);
    margin-right: calc((var(--content-width) - var(--content-width-wide)) / 2);
    max-width: var(--content-width-wide);
    width: var(--content-width-wide);
  }
}

/* Article Footer */
.article-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border-light);
}

.article-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.article-tag {
  font-size: 0.75rem;
  color: var(--color-foreground-muted);
  background-color: var(--color-background-alt);
  padding: 0.375rem 0.75rem;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: background-color 0.2s ease;
}

.article-tag:hover {
  background-color: var(--color-border-light);
  color: var(--color-foreground);
}

/* Related Articles */
.related-articles {
  background-color: var(--color-background-alt);
  padding: 3rem 0;
  margin-top: 4rem;
}

/* ========================================================================
   Archive Page
   ======================================================================== */

.archive-header {
  padding: 3rem 0 2rem;
}

.archive-title {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}

.archive-description {
  color: var(--color-foreground-muted);
  max-width: 600px;
}

/* Category Filter */
.category-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2rem;
}

.category-filter-btn {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-foreground-muted);
  background-color: transparent;
  border: 1px solid var(--color-border);
  padding: 0.5rem 1rem;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
}

.category-filter-btn:hover {
  background-color: var(--color-background-alt);
  color: var(--color-foreground);
}

.category-filter-btn.is-active,
.category-filter-btn.current-cat {
  background-color: var(--color-foreground);
  border-color: var(--color-foreground);
  color: var(--color-background);
}

/* ========================================================================
   Map Page
   ======================================================================== */



/* ========================================================================
   Buttons
   ======================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  line-height: 1;
  padding: 0.75rem 1.25rem;
  border-radius: var(--radius-md);
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: all 0.2s ease;
}

.btn-primary {
  background-color: var(--color-primary);
  color: #fff;
}

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

.btn-outline {
  background-color: transparent;
  border: 1px solid var(--color-border);
  color: var(--color-foreground);
}

.btn-outline:hover {
  background-color: var(--color-background-alt);
}

.btn-ghost {
  background-color: transparent;
  color: var(--color-foreground-muted);
}

.btn-ghost:hover {
  background-color: var(--color-background-alt);
  color: var(--color-foreground);
}

/* ========================================================================
   Forms
   ======================================================================== */

input[type="text"],
input[type="email"],
input[type="search"],
textarea {
  font-family: var(--font-sans);
  font-size: 1rem;
  padding: 0.75rem 1rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background-color: var(--color-background);
  color: var(--color-foreground);
  width: 100%;
  transition: border-color 0.2s ease;
}

input:focus,
textarea:focus {
  outline: none;
  border-color: var(--color-primary);
}

/* Search Form */
.search-form {
  display: flex;
  gap: 0.5rem;
}

.search-form input[type="search"] {
  flex: 1;
}

/* ========================================================================
   Pagination
   ======================================================================== */

.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin-top: 3rem;
}

.pagination a,
.pagination span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 2.5rem;
  height: 2.5rem;
  font-size: 0.875rem;
  color: var(--color-foreground-muted);
  background-color: transparent;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-decoration: none;
  transition: all 0.2s ease;
}

.pagination a:hover {
  background-color: var(--color-background-alt);
  color: var(--color-foreground);
}

.pagination .current {
  background-color: var(--color-foreground);
  border-color: var(--color-foreground);
  color: var(--color-background);
}

/* ========================================================================
   Comments
   ======================================================================== */

.comments-area {
  margin-top: 4rem;
  padding-top: 2rem;
  border-top: 1px solid var(--color-border-light);
}

.comments-title {
  font-size: 1.25rem;
  margin-bottom: 1.5rem;
}

.comment-list {
  list-style: none;
}

.comment {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

.comment-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.comment-author-avatar img {
  width: 40px;
  height: 40px;
  border-radius: 50%;
}

.comment-author-name {
  font-weight: 600;
  color: var(--color-foreground);
}

.comment-date {
  font-size: 0.8125rem;
  color: var(--color-foreground-muted);
}

.comment-content p {
  font-size: 0.9375rem;
  margin-bottom: 0;
}

.comment-reply-link {
  font-size: 0.8125rem;
  color: var(--color-primary);
  margin-top: 0.5rem;
  display: inline-block;
}

/* Comment Form */
.comment-respond {
  margin-top: 2rem;
}

.comment-reply-title {
  font-size: 1.125rem;
  margin-bottom: 1rem;
}

.comment-form label {
  display: block;
  font-size: 0.875rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
}

.comment-form input,
.comment-form textarea {
  margin-bottom: 1rem;
}

.comment-form textarea {
  min-height: 150px;
  resize: vertical;
}

/* ========================================================================
   Widgets / Sidebar
   ======================================================================== */

.widget {
  margin-bottom: 2rem;
}

.widget-title {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--color-foreground-muted);
  margin-bottom: 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--color-border-light);
}

.widget ul {
  list-style: none;
}

.widget li {
  padding: 0.5rem 0;
  border-bottom: 1px solid var(--color-border-light);
}

.widget li:last-child {
  border-bottom: none;
}

.widget a {
  font-size: 0.875rem;
  color: var(--color-foreground-muted);
  text-decoration: none;
}

.widget a:hover {
  color: var(--color-foreground);
}

/* ========================================================================
   Utility Classes
   ======================================================================== */

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mt-0 { margin-top: 0; }
.mb-0 { margin-bottom: 0; }

/* ========================================================================
   WordPress Core Styles
   ======================================================================== */

.wp-caption {
  max-width: 100%;
}

.wp-caption-text {
  font-size: 0.8125rem;
  color: var(--color-foreground-muted);
  text-align: center;
  margin-top: 0.5rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 0.5rem;
}

.gallery-item {
  margin: 0;
}

.gallery-item img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

.sticky .article-card {
  border-color: var(--color-primary);
}

.bypostauthor .comment {
  background-color: var(--color-primary-light);
  padding-left: 1rem;
  padding-right: 1rem;
  border-radius: var(--radius-md);
}

/* ========================================================================
   Map Markers - Interactive Map
   ======================================================================== */

.map-main {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 60px);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-background-alt);
  padding: 2rem 0;
}

.map-container {
  position: relative;
  width: 100%;
  max-width: 1024px; /* Match your image size */
  margin: 0 auto;
}
.map-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.map-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: var(--color-foreground-muted);
}

/* Map Header */
.map-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1.5rem;
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border-light);
}

.map-header__back {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-foreground-muted);
  text-decoration: none;
}

.map-header__back:hover {
  color: var(--color-primary);
}

.map-header__title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  margin: 0;
}

.map-header__legend-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: none;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-foreground-muted);
  cursor: pointer;
}

.map-header__legend-toggle:hover {
  background: var(--color-background-alt);
  color: var(--color-foreground);
}

/* Map Markers */
.map-marker {
  position: absolute;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-primary);
  border: 2px solid var(--color-background);
  border-radius: 50%;
  color: var(--color-background);
  cursor: pointer;
  transform: translate(-50%, -50%);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.map-marker:hover,
.map-marker:focus {
  transform: translate(-50%, -50%) scale(1.15);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
  z-index: 20;
}

.map-marker:focus {
  outline: none;
  box-shadow: 0 0 0 3px var(--color-primary-light), 0 4px 16px rgba(0, 0, 0, 0.3);
}

.map-marker__pulse {
  position: absolute;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: var(--color-primary);
  opacity: 0;
  animation: marker-pulse 2s ease-out infinite;
}

@keyframes marker-pulse {
  0% {
    transform: scale(1);
    opacity: 0.5;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.map-marker__icon {
  position: relative;
  width: 14px;
  height: 14px;
  z-index: 1;
}

.map-marker__icon svg {
  width: 100%;
  height: 100%;
}

.map-marker__label {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.25rem 0.5rem;
  background: var(--color-foreground);
  color: var(--color-background);
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
  border-radius: var(--radius-sm);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease;
}

.map-marker__label::before {
  content: '';
  position: absolute;
  bottom: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 4px solid transparent;
  border-bottom-color: var(--color-foreground);
}

.map-marker:hover .map-marker__label,
.map-marker:focus .map-marker__label {
  opacity: 1;
}

/* Marker type colors */
.map-marker--church { background: #8B4513; }
.map-marker--cloister { background: #2F4F4F; }
.map-marker--building { background: #696969; }
.map-marker--ruins { background: #8B7355; }
.map-marker--garden { background: var(--color-primary); }
.map-marker--info { background: #4682B4; }

/* Map Legend */
.map-legend {
  position: absolute;
  top: 0;
  right: 0;
  width: 280px;
  height: 100%;
  background: var(--color-background);
  border-left: 1px solid var(--color-border-light);
  transform: translateX(100%);
  transition: transform 0.25s ease;
  z-index: 100;
  display: flex;
  flex-direction: column;
}

.map-legend.is-open,
.map-legend[aria-hidden="false"] {
  transform: translateX(0);
}

.map-legend__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--color-border-light);
}

.map-legend__title {
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0;
}

.map-legend__close {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: none;
  border: none;
  color: var(--color-foreground-muted);
  cursor: pointer;
}

.map-legend__close:hover {
  color: var(--color-foreground);
}

.map-legend__content {
  flex: 1;
  padding: 1.25rem;
  overflow-y: auto;
}

.map-legend__section-title {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-foreground-muted);
  margin: 0 0 0.75rem;
}

.map-legend__section-title:not(:first-child) {
  margin-top: 1.5rem;
}

.map-legend__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.map-legend__item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.5rem 0;
  font-size: 0.8125rem;
  color: var(--color-foreground);
}

.map-legend__marker {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid var(--color-background);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.map-legend__marker--default { background: var(--color-primary); }
.map-legend__marker--church { background: #8B4513; }
.map-legend__marker--cloister { background: #2F4F4F; }
.map-legend__marker--building { background: #696969; }
.map-legend__marker--ruins { background: #8B7355; }
.map-legend__marker--garden { background: var(--color-primary); }
.map-legend__marker--info { background: #4682B4; }

.map-legend__filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.map-legend__filter {
  padding: 0.375rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  background: var(--color-background-alt);
  border: 1px solid var(--color-border-light);
  border-radius: 100px;
  color: var(--color-foreground-muted);
  cursor: pointer;
  transition: all 0.15s ease;
}

.map-legend__filter:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.map-legend__filter.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-background);
}

.map-legend__footer {
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--color-border-light);
}

.map-legend__link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8125rem;
  color: var(--color-primary);
  text-decoration: none;
}

.map-legend__link:hover {
  text-decoration: underline;
}

/* Map Controls */
.map-controls {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  z-index: 50;
}

.map-control {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: var(--color-background);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
  color: var(--color-foreground);
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
  transition: background 0.15s ease;
}

.map-control:hover {
  background: var(--color-background-alt);
}

/* ========================================================================
   Marker Modal
   ======================================================================== */

.marker-modal {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.marker-modal.is-open {
  opacity: 1;
  visibility: visible;
}

.marker-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
}

.marker-modal__container {
  position: relative;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 900px;
  max-height: 90vh;
  background: var(--color-background);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.marker-modal__close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-background);
  border: none;
  border-radius: 50%;
  color: var(--color-foreground);
  cursor: pointer;
  z-index: 10;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.marker-modal__close:hover {
  background: var(--color-background-alt);
}

.marker-modal__close svg {
  width: 18px;
  height: 18px;
}

.marker-modal__content {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

@media (min-width: 768px) {
  .marker-modal__content {
    flex-direction: row;
  }
}

.marker-modal__gallery {
  flex: 0 0 50%;
  background: var(--color-foreground);
  min-height: 250px;
}

.marker-modal__gallery--empty {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--color-background-alt);
}

.marker-modal__info {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 1.5rem;
  overflow-y: auto;
}

.marker-modal__header {
  margin-bottom: 1rem;
}

.marker-modal__title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.5rem;
}

.marker-modal__meta {
  font-size: 0.8125rem;
  color: var(--color-foreground-muted);
  margin: 0;
}

.marker-modal__description {
  flex: 1;
  font-size: 0.9375rem;
  line-height: 1.7;
  color: var(--color-foreground);
}

.marker-modal__description p:first-child {
  margin-top: 0;
}

.marker-modal__footer {
  margin-top: 1.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--color-border-light);
}

.marker-modal__link {
  font-weight: 500;
  color: var(--color-primary);
  text-decoration: none;
}

.marker-modal__link:hover {
  text-decoration: underline;
}

/* Modal Gallery */
.marker-gallery {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
}

.marker-gallery__main {
  position: relative;
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #111;
}

.marker-gallery__viewport {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.marker-gallery__image {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
}

.marker-gallery__prev,
.marker-gallery__next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  color: #111;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.marker-gallery__main:hover .marker-gallery__prev,
.marker-gallery__main:hover .marker-gallery__next {
  opacity: 1;
}

.marker-gallery__prev:disabled,
.marker-gallery__next:disabled {
  opacity: 0.3;
  cursor: default;
}

.marker-gallery__prev { left: 0.75rem; }
.marker-gallery__next { right: 0.75rem; }

.marker-gallery__prev svg,
.marker-gallery__next svg {
  width: 18px;
  height: 18px;
}

.marker-gallery__caption {
  padding: 0.5rem 0.75rem;
  font-size: 0.8125rem;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.6);
  text-align: center;
}

.marker-gallery__counter {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.5rem;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-sm);
}

.marker-gallery__thumbs {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem;
  background: #222;
  overflow-x: auto;
}

.marker-gallery__thumb {
  flex: 0 0 50px;
  height: 50px;
  padding: 0;
  background: none;
  border: 2px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  overflow: hidden;
  opacity: 0.6;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.marker-gallery__thumb:hover {
  opacity: 0.9;
}

.marker-gallery__thumb.is-active {
  opacity: 1;
  border-color: var(--color-background);
}

.marker-gallery__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* Body when modal is open */
body.modal-open {
  overflow: hidden;
}

/* ========================================================================
   Single Location Page
   ======================================================================== */

.location-single {
  padding-bottom: 3rem;
}

.location-breadcrumb {
  padding: 1rem 0;
  border-bottom: 1px solid var(--color-border-light);
  background: var(--color-background-alt);
}

.breadcrumb-list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.8125rem;
}

.breadcrumb-item {
  display: flex;
  align-items: center;
}

.breadcrumb-item:not(:last-child)::after {
  content: '/';
  margin-left: 0.5rem;
  color: var(--color-foreground-muted);
}

.breadcrumb-item a {
  color: var(--color-foreground-muted);
  text-decoration: none;
}

.breadcrumb-item a:hover {
  color: var(--color-primary);
}

.breadcrumb-item--current {
  color: var(--color-foreground);
  font-weight: 500;
}

.location-header {
  padding: 3rem 0 2rem;
  text-align: center;
}

.location-groups {
  margin-bottom: 1rem;
}

.location-group-tag {
  display: inline-block;
  padding: 0.25rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  background: var(--color-primary-light);
  border-radius: 100px;
  text-decoration: none;
  margin: 0 0.25rem;
}

.location-group-tag:hover {
  background: var(--color-primary);
  color: var(--color-background);
}

.location-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 600;
  line-height: 1.2;
  margin: 0 0 0.5rem;
}

.location-alt-names {
  font-size: 0.9375rem;
  font-style: italic;
  color: var(--color-foreground-muted);
  margin: 0.5rem 0 1.5rem;
}

.location-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.5rem 2.5rem;
  margin: 0;
}

.location-meta__item {
  text-align: center;
}

.location-meta__item dt {
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-foreground-muted);
  margin-bottom: 0.25rem;
}

.location-meta__item dd {
  font-size: 1rem;
  font-weight: 500;
  margin: 0;
}

/* Location Gallery */
.location-gallery {
  padding: 2rem 0;
  background: var(--color-background-alt);
}

.gallery-main {
  position: relative;
  background: #111;
  border-radius: var(--radius-md);
  overflow: hidden;
}

.gallery-main__figure {
  margin: 0;
}

.gallery-main__image {
  display: block;
  width: 100%;
  max-height: 500px;
  object-fit: contain;
}

.gallery-main__caption {
  padding: 0.75rem 1rem;
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.8);
  text-align: center;
  min-height: 2.5rem;
}

.gallery-main__caption:empty {
  display: none;
}

.gallery-nav {
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  transform: translateY(-50%);
  display: flex;
  justify-content: space-between;
  padding: 0 0.75rem;
  pointer-events: none;
}

.gallery-nav__btn {
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.9);
  border: none;
  border-radius: 50%;
  color: #111;
  cursor: pointer;
  pointer-events: auto;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.gallery-main:hover .gallery-nav__btn {
  opacity: 1;
}

.gallery-nav__btn svg {
  width: 20px;
  height: 20px;
}

.gallery-counter {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  padding: 0.25rem 0.75rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.8);
  background: rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-sm);
}

.gallery-thumbs {
  display: flex;
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 0.5rem 0;
  overflow-x: auto;
}

.gallery-thumb {
  flex: 0 0 70px;
  height: 70px;
  padding: 0;
  background: none;
  border: 3px solid transparent;
  border-radius: var(--radius-sm);
  cursor: pointer;
  overflow: hidden;
  opacity: 0.7;
  transition: opacity 0.15s ease, border-color 0.15s ease;
}

.gallery-thumb:hover {
  opacity: 0.9;
}

.gallery-thumb.is-active {
  opacity: 1;
  border-color: var(--color-primary);
}

.gallery-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.location-featured-image {
  padding: 2rem 0;
}

.location-featured-image__img {
  display: block;
  width: 100%;
  max-height: 500px;
  object-fit: cover;
  border-radius: var(--radius-md);
}

.location-content {
  padding: 3rem 0;
}

.location-map-link {
  margin-top: 3rem;
  padding: 1.5rem;
  background: var(--color-background-alt);
  border-radius: var(--radius-md);
  text-align: center;
}

.location-map-link h3 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 600;
  margin: 0 0 0.5rem;
}

.location-map-link p {
  font-size: 0.9375rem;
  color: var(--color-foreground-muted);
  margin: 0 0 1rem;
}

.location-map-link .btn__icon {
  width: 18px;
  height: 18px;
  margin-right: 0.5rem;
}

.location-related {
  padding: 3rem 0;
  background: var(--color-background-alt);
}

.location-related__title {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  text-align: center;
  margin: 0 0 2rem;
}

.location-related__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
}

.location-card {
  display: block;
  background: var(--color-background);
  border-radius: var(--radius-md);
  overflow: hidden;
  text-decoration: none;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.location-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.location-card__image {
  aspect-ratio: 16/10;
  overflow: hidden;
}

.location-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.location-card__content {
  padding: 1rem 1.25rem;
}

.location-card__title {
  font-family: var(--font-heading);
  font-size: 1.125rem;
  font-weight: 600;
  color: var(--color-foreground);
  margin: 0 0 0.25rem;
}

.location-card__meta {
  font-size: 0.8125rem;
  color: var(--color-foreground-muted);
  margin: 0;
}

/* ========================================================================
   Locations Archive
   ======================================================================== */

.archive-header {
  padding: 3rem 0;
  text-align: center;
  background: var(--color-background-alt);
  border-bottom: 1px solid var(--color-border-light);
}

.archive-title {
  font-family: var(--font-heading);
  font-size: clamp(2rem, 5vw, 2.5rem);
  font-weight: 600;
  margin: 0 0 1rem;
}

.archive-description {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: var(--color-foreground-muted);
  max-width: 600px;
  margin: 0 auto 1.5rem;
}

.archive-map-btn {
  display: inline-flex;
  align-items: center;
}

.archive-map-btn .btn__icon {
  width: 18px;
  height: 18px;
  margin-right: 0.5rem;
}

.archive-filters {
  padding: 1rem 0;
  background: var(--color-background);
  border-bottom: 1px solid var(--color-border-light);
  position: sticky;
  top: 0;
  z-index: 50;
}

.filter-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  justify-content: center;
}

.filter-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 1rem;
  font-family: var(--font-sans);
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--color-foreground-muted);
  background: var(--color-background-alt);
  border: 1px solid var(--color-border-light);
  border-radius: 100px;
  text-decoration: none;
  transition: all 0.15s ease;
}

.filter-pill:hover {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

.filter-pill.is-active {
  background: var(--color-primary);
  border-color: var(--color-primary);
  color: var(--color-background);
}

.filter-pill__count {
  font-size: 0.75rem;
  opacity: 0.7;
}

.archive-content {
  padding: 3rem 0;
}

.locations-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

.location-card__link {
  display: block;
  height: 100%;
  text-decoration: none;
  color: inherit;
}

.location-card__photo-count {
  position: absolute;
  bottom: 0.5rem;
  right: 0.5rem;
  display: flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.5rem;
  font-family: var(--font-sans);
  font-size: 0.75rem;
  color: var(--color-background);
  background: rgba(0, 0, 0, 0.6);
  border-radius: var(--radius-sm);
}

.location-card__photo-count svg {
  width: 14px;
  height: 14px;
}

.location-card__group {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 0.6875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-primary);
  margin-bottom: 0.5rem;
}

.location-card__excerpt {
  font-size: 0.875rem;
  line-height: 1.6;
  color: var(--color-foreground-muted);
  margin: 0.5rem 0 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.no-results {
  text-align: center;
  padding: 3rem;
}

.no-results h2 {
  margin: 0 0 0.5rem;
}

.no-results p {
  color: var(--color-foreground-muted);
}

/* ========================================================================
   Map Page
   ======================================================================== */

.map-page {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.map-header {
  background-color: var(--color-background);
  border-bottom: 1px solid var(--color-border-light);
  padding: 1rem var(--site-padding);
}

.map-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: var(--content-width-wide);
  margin: 0 auto;
}

.map-back-link {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.875rem;
  color: var(--color-foreground-muted);
  text-decoration: none;
}

.map-back-link:hover {
  color: var(--color-foreground);
}

.map-title {
  font-size: 1.125rem;
  margin-bottom: 0;
}

/* Map Container - Force Square Aspect Ratio */
.map-container {
  position: relative;
  width: 100%;
  max-width: 1024px; /* Match your image size */
  margin: 0 auto;
}

.map-container::before {
  content: '';
  display: block;
  padding-bottom: 100%; /* Force square aspect ratio */
}

.map-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.map-placeholder {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-foreground-muted);
}

.map-wrapper {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}