/*
Theme Name: Ajara Archaeological Monuments
Theme URI: https://example.com/ajara-monuments
Author: Your Name
Author URI: https://example.com
Description: Interactive map theme for archaeological monuments in Ajara region with custom monument post type and Leaflet.js integration
Version: 2.10.1
Requires at least: 6.5
Tested up to: 7.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: ajara-monuments
Tags: map, archaeology, custom-post-type, leaflet
*/

/* CSS Variables - Archaeological Theme Colors */
/* Enable smooth scrolling */
html {
    scroll-behavior: smooth;
}
:root {
    --primary-color: #8B4513;
    --secondary-color: #D2691E;
    --terracotta: #CC5500;
    --accent-color: #CD853F;
    --warm-beige: #F4E4C1;
    --light-sand: #FFF8E7;
    --border-color: #E8D5B7;
    --text-primary: #2C1810;
    --text-secondary: #5D4E37;
    --shadow: rgba(0, 0, 0, 0.15);
}

@font-face {
    font-family: 'iamfeel';
    src: url('fonts/IMFeENrm29P.woff2') format('woff2'),
         url('fonts/IMFeENrm29P.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'iamfeel';
    src: url('fonts/IMFeENrm29P.woff2') format('woff2'),
         url('fonts/IMFeENrm29P.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'erekles_stamba';
    src: url('fonts/gl-erekles-stamba-regular.woff2') format('woff2'),
         url('fonts/gl-erekles-stamba-regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: 'erekles_stamba';
    src: url('fonts/gl-erekles-stamba-regular.woff2') format('woff2'),
         url('fonts/gl-erekles-stamba-regular.woff') format('woff');
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}



/* ===== HEADER FONT BASED ON LANGUAGE ===== */

/* English Language - iamfeel font */
html[lang="en"] header h1 a,
html[lang="en-US"] header h1,
html[lang="en-US"] header a,
body[lang="en"] header h1 a,
body[lang="en-US"] header h1 a {
    font-family: 'iamfeelM', sans-serif !important;
}

html[lang="en"] header .subtitle,
html[lang="en-US"] header .subtitle,
html[lang="en-US"] header a,
body[lang="en"] header .subtitle,
body[lang="en-US"] header .subtitle {
    font-family: 'iamfeel', sans-serif !important;
    font-weight: 400;
}

/* Georgian Language - Cinzel font (default) */
html[lang="ka"] header h1,
html[lang="ka-GE"] header h1,
html[lang="ka-GE"] header a,
body[lang="ka"] header h1,
body[lang="ka-GE"] header h1 {
    font-family: 'erekles_stamba',  sans-serif !important;
}

html[lang="ka"] header .subtitle,
html[lang="ka-GE"] header .subtitle,
html[lang="ka-GE"] header .subtitle a,
body[lang="ka"] header .subtitle ,
body[lang="ka-GE"] header .subtitle {
    font-family: 'erekles_stamba',  sans-serif !important;
}
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Crimson Text', 'Georgia', serif;
    color: var(--text-primary);
    background: linear-gradient(to bottom, #FFFAF0, #FFF8E7);
    min-height: 100vh;
    line-height: 1.6;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    padding: 0.5rem 2rem;
    text-align: center;
    border-bottom: 5px solid var(--accent-color);
    box-shadow: 0 4px 12px var(--shadow);
    position: relative;
    height: 166px;
}

.header-decoration {
    width: 100%;
    height: 3px;
    background: repeating-linear-gradient(
        90deg,
        var(--accent-color),
        var(--accent-color) 10px,
        transparent 10px,
        transparent 20px
    );
    margin: 1rem 0;
}

header h1 {
    font-family: 'Cinzel', serif;
    font-size: 2.5rem;
    font-weight: 700;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 1.1rem;
    font-style: italic;
    opacity: 0.95;
}

/* Navigation Menu */
.main-navigation {
    margin-top: 1.5rem;
}

.primary-menu {
    list-style: none;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    padding: 0;
    margin: 0;
}

.primary-menu li {
    position: relative;
}

.primary-menu a {
    color: white;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: all 0.3s ease;
    display: block;
}

.primary-menu a:hover,
.primary-menu .current-menu-item a,
.primary-menu .current_page_item a {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

/* Dropdown Menu Support */
.primary-menu .sub-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--primary-color);
    border: 2px solid var(--accent-color);
    border-radius: 8px;
    padding: 0.5rem 0;
    min-width: 200px;
    box-shadow: 0 4px 12px var(--shadow);
    z-index: 1000;
}

.primary-menu li:hover > .sub-menu {
    display: block;
}

.primary-menu .sub-menu li {
    display: block;
}

.primary-menu .sub-menu a {
    padding: 0.7rem 1.5rem;
    border-radius: 0;
}

.primary-menu .sub-menu a:hover {
    border-radius: 5px;
    background: var(--secondary-color);
    transform: translateX(5px);
}

/* Container */
.container {
    max-width: 1800px;
    margin: 2rem auto;
    padding: 0 2rem;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 25px;
}

/* Sidebar */
.sidebar {
    background: white;
    border-radius: 12px;
    border: 3px solid var(--border-color);
    padding: 1.5rem;
    box-shadow: 0 6px 20px var(--shadow);
    height: fit-content;
    max-height: calc(100vh - 200px);
    overflow-y: auto;
    position: sticky;
    top: 20px;
}

.sidebar h2 {
    font-family: 'Cinzel', serif;
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 1.5rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--accent-color);
}

/* Monument Cards in Sidebar */
.monument-card {
    background: linear-gradient(to bottom, #FFFAF0, white);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    padding: 1rem;
    margin-bottom: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.monument-card:hover {
    transform: translateX(8px);
    border-color: var(--terracotta);
    box-shadow: 0 4px 12px var(--shadow);
}

.monument-card.active {
    background: linear-gradient(135deg, #FFF8E7, #F5E6D3);
    border-color: var(--terracotta);
    border-width: 3px;
}

.monument-card img {
    width: 100%;
    height: 150px;
    object-fit: cover;
    border-radius: 6px;
    margin-bottom: 0.8rem;
    border: 2px solid var(--border-color);
}

.monument-card h3 {
    font-family: 'Cinzel', serif;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.monument-period {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 15px;
    font-size: 0.85rem;
    margin-bottom: 0.5rem;
}

.monument-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Custom Scrollbar */
.sidebar::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track {
    background: var(--light-sand);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 10px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: var(--terracotta);
}

/* Map Section */
.map-section {
    background: white;
    border-radius: 12px;
    border: 3px solid var(--border-color);
    overflow: hidden;
    box-shadow: 0 6px 20px var(--shadow);
}

#map {
    height: 75vh;
    width: 100%;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

/* Map Info Section */
.map-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    background: linear-gradient(to right, #FFF8E7, #F5E6D3);
    border-radius: 0 0 8px 8px;
    border-top: 2px solid var(--border-color);
    gap: 2rem;
}

.map-legend h3 {
    font-family: 'Cinzel', serif;
    color: var(--primary-color);
    font-size: 1rem;
    margin: 0 0 0.5rem 0;
    font-weight: 600;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.legend-marker {
    font-size: 1.2rem;
}

.map-instructions {
    flex: 1;
}

.map-instructions p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

.map-instructions strong {
    color: var(--primary-color);
}

/* Custom Map Markers */
.leaflet-marker-icon.custom-marker {
    width: 30px !important;
    height: 30px !important;
    margin: 0 !important;
    padding: 0 !important;
}

.custom-marker {
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.3));
    transition: all 0.3s ease;
    cursor: pointer;
    width: 30px !important;
    height: 30px !important;
}

.marker-pin {
    pointer-events: all;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.marker-pin svg {
    pointer-events: none;
}

.custom-marker.pulse {
    animation: pulse 1s ease-in-out;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.3);
        opacity: 0.7;
    }
}

/* Map Popup Styles */
.custom-popup .leaflet-popup-content-wrapper {
    background: linear-gradient(to bottom, #FFF8E7, white);
    border: 3px solid var(--accent-color);
    border-radius: 12px;
    box-shadow: 0 6px 20px var(--shadow);
    padding: 0;
    max-width: 380px;
    overflow: hidden;
}

.custom-popup .leaflet-popup-content {
    margin: 0;
    width: auto !important;
}

.custom-popup .leaflet-popup-tip {
    background: var(--accent-color);
}

.custom-popup .leaflet-popup-close-button {
    color: var(--primary-color);
    font-size: 20px;
    font-weight: bold;
    padding: 4px 8px;
    top: 8px;
    right: 8px;
}

.custom-popup .leaflet-popup-close-button:hover {
    color: var(--terracotta);
}

.map-popup {
    max-width: 380px;
    width: 380px;
    display: flex;
    flex-direction: column;
}

.map-popup img {
    width: 100%;
    height: 90px;
    object-fit: contain;
    background: var(--light-sand);
    border-radius: 8px 8px 0 0;
    flex-shrink: 0;
}

.popup-content {
    padding: 0.85rem 1.2rem;
}

.popup-content h4 {
    font-family: 'Cinzel', serif;
    color: var(--primary-color);
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.popup-period {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: white;
    padding: 0.25rem 0.7rem;
    border-radius: 15px;
    font-size: 0.8rem;
    margin-bottom: 0.4rem;
}

.popup-content p {
    color: var(--text-secondary);
    font-size: 0.85rem;
    line-height: 1.4;
    text-align: justify;
}

/* Clamp the description so the popup stays short — wider popup means
   more text fits per line, so fewer lines are needed to stay compact. */
.popup-description {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 6;
    overflow: hidden;
}

.popup-view-more {
    display: inline-block;
    margin-top: 1rem;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, var(--terracotta), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 6px var(--shadow);
    font-family: 'Crimson Text', serif;
}

.popup-view-more:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--terracotta));
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(204, 85, 0, 0.4);
}

/* Articles Section */
.articles-section {
    max-width: 1400px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.section-title {
    font-family: 'Cinzel', serif;
    color: var(--primary-color);
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 3px solid var(--accent-color);
}

.articles-grid {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* Article Cards */
.article-card {
    background: white;
    border: 3px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 6px 20px var(--shadow);
    transition: all 0.3s ease;
    display: grid;
    grid-template-columns: 350px 1fr;
    min-height: 280px;
}

.article-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(139, 69, 19, 0.3);
    border-color: var(--terracotta);
}

.article-card.highlight {
    animation: highlight-pulse 2s ease;
}

@keyframes highlight-pulse {
    0%, 100% {
        border-color: var(--border-color);
        box-shadow: 0 6px 20px var(--shadow);
    }
    50% {
        border-color: var(--terracotta);
        box-shadow: 0 0 0 4px rgba(204, 85, 0, 0.3);
    }
}

.article-image {
    position: relative;
    overflow: hidden;
}

.article-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.article-card:hover .article-image img {
    transform: scale(1.05);
}

.article-content {
    padding: 2rem;
    display: flex;
    flex-direction: column;
}

.article-category {
    display: inline-block;
    background: linear-gradient(135deg, var(--terracotta), var(--secondary-color));
    color: white;
    padding: 0.4rem 1rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    width: fit-content;
}

.article-content h3 {
    font-family: 'Cinzel', serif;
    color: var(--primary-color);
    font-size: 1.6rem;
    margin-bottom: 1rem;
    line-height: 1.3;
}

.article-excerpt {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    flex-grow: 1;
}

.article-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 2px solid var(--border-color);
    margin-bottom: 1rem;
}

.author-info {
    display: flex;
    flex-direction: column;
}

.author-name {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.95rem;
}

.author-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-style: italic;
}

.article-date {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.read-more {
    display: inline-block;
    padding: 0.7rem 1.8rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: all 0.3s ease;
    text-align: center;
    box-shadow: 0 3px 8px var(--shadow);
}

.read-more:hover {
    background: linear-gradient(135deg, var(--terracotta), var(--primary-color));
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 69, 19, 0.4);
}

/* Single Monument page */
.author-avatar {
    width: 60px; 
    height: 60px;
     border-radius: 50%; 
     background: linear-gradient(135deg, var(--accent-color),
      var(--secondary-color)); 
      color: white; 
      display: flex; 
      align-items: center; 
      justify-content: center; 
      font-size: 1.2rem; 
      font-weight: 600; 
      font-family: 'Cinzel', serif;
}


/* Map Base Layers */
.leaflet-top {
    z-index: 999;
}


/* Scroll to Top Button */
#scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: 2px solid var(--accent-color);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    z-index: 999;
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
}

#scroll-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#scroll-to-top:hover {
    background: linear-gradient(135deg, var(--terracotta), var(--primary-color));
    transform: translateY(-5px);
    box-shadow: 0 6px 20px rgba(139, 69, 19, 0.4);
}

#scroll-to-top:active {
    transform: translateY(-2px);
}

#scroll-to-top svg {
    width: 24px;
    height: 24px;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    position: absolute;
    top: 20px;
    left: 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

.mobile-menu-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.mobile-menu-toggle.active {
    background: rgba(255, 255, 255, 0.3);
}

.hamburger-line {
    display: block;
    width: 25px;
    height: 3px;
    background: white;
    margin: 4px 0;
    transition: all 0.3s ease;
    border-radius: 2px;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-toggle.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-toggle.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(7px, -7px);
}

/* Search Toggle Button */
.search-toggle {
    display: block;
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    z-index: 1001;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    color: white;
}

.search-toggle:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.5);
}

.search-toggle svg {
    display: block;
    width: 24px;
    height: 24px;
}

/* AJAX Search Container */
.ajax-search-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    padding: 1.5rem 2rem;
    z-index: 1001;
    transform: translateY(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.ajax-search-container.active {
    transform: translateY(0);
}

.ajax-search-wrapper {
    max-width: 800px;
    margin: 0 auto;
    position: relative;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.ajax-search-input {
    flex: 1;
    padding: 1rem 1.5rem;
    font-size: 1.1rem;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50px;
    background: rgba(255, 255, 255, 0.95);
    color: var(--text-primary);
    font-family: 'Crimson Text', serif;
    transition: all 0.3s ease;
}

.ajax-search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(205, 133, 63, 0.2);
    background: white;
}

.ajax-search-input::placeholder {
    color: var(--text-secondary);
}

.search-close {
    background: rgba(255, 255, 255, 0.2);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    color: white;
}

.search-close:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.5);
    transform: rotate(90deg);
}

/* Search Results */
.ajax-search-results {
    max-width: 800px;
    margin: 1.5rem auto 0;
    max-height: 60vh;
    overflow-y: auto;
    border-radius: 12px;
}

.ajax-search-results::-webkit-scrollbar {
    width: 8px;
}

.ajax-search-results::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.ajax-search-results::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.3);
    border-radius: 10px;
}

.ajax-search-results::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.5);
}

.search-results-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.search-result-item {
    background: white;
    border-radius: 10px;
    padding: 1rem;
    display: grid;
    grid-template-columns: 100px 1fr;
    gap: 1rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.search-result-item:hover {
    transform: translateX(5px);
    border-color: var(--accent-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.search-result-image {
    width: 100px;
    height: 80px;
    overflow: hidden;
    border-radius: 8px;
    border: 2px solid var(--border-color);
}

.search-result-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.search-result-content {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.search-result-type {
    display: inline-block;
    background: linear-gradient(135deg, var(--accent-color), var(--secondary-color));
    color: white;
    padding: 0.2rem 0.8rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    width: fit-content;
}

.search-result-content h4 {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: 1.1rem;
}

.search-result-content h4 a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.search-result-content h4 a:hover {
    color: var(--terracotta);
}

.search-result-content p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.4;
    margin: 0;
}

.search-result-period,
.search-result-date {
    display: inline-block;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-style: italic;
}

.search-loading,
.search-no-results,
.search-error {
    background: white;
    padding: 2rem;
    border-radius: 10px;
    text-align: center;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.search-error {
    background: #ffe6e6;
    color: #c00;
}

/* Prevent body scroll when menu is open */
body.menu-open {
    overflow: hidden;
}

/* Footer */
footer {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    text-align: center;
    padding: 2rem;
    margin-top: 4rem;
    border-top: 5px solid var(--accent-color);
}

.footer-decoration {
    width: 100%;
    height: 3px;
    background: repeating-linear-gradient(
        90deg,
        var(--accent-color),
        var(--accent-color) 10px,
        transparent 10px,
        transparent 20px
    );
    margin: 1rem 0;
}

footer p {
    font-size: 0.95rem;
    opacity: 0.95;
}



/* Responsive Design */
@media (max-width: 1200px) {
    .container {
        grid-template-columns: 280px 1fr;
    }
}

@media (max-width: 968px) {
    .container {
        grid-template-columns: 1fr;
    }
    
    .sidebar {
        max-height: none;
        position: relative;
    }
    .author-avatar {
        width: 5em; 
        height: 3em;
    }
}

@media (max-width: 1024px) {
    /* Tablet and Mobile - Simplified Popup */
    .custom-popup .leaflet-popup-content-wrapper {
        max-width: 90vw;
    }
    
    .map-popup {
        max-width: 100%;
    }
    
    .map-popup img {
        height: 160px;
    }
    
    /* Hide period and description on tablet/mobile */
    .popup-period {
        display: none !important;
    }
    
    .popup-content p:not(.popup-view-more) {
        display: none !important;
    }
    
    /* Adjust popup content padding */
    .popup-content {
        padding: 1rem;
    }
    
    /* Make title more compact */
    .popup-content h4 {
        font-size: 1rem;
        margin-bottom: 0.8rem;
    }
    
    /* Adjust button */
    .popup-view-more {
        margin-top: 0.5rem;
        padding: 0.5rem 1.2rem;
        font-size: 0.85rem;
    }

    .author-avatar {
        width: 5em; 
        height: 4em;
    }
}

@media (max-width: 768px) {
    header h1 {
        font-size: 1.5rem;
        line-height: 2.5em;
    }
    
    .subtitle {
        font-size: 0.95rem;
    }
    
    /* Mobile Navigation */
    .primary-menu {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .primary-menu a {
        font-size: 0.95rem;
        padding: 0.4rem 0.8rem;
    }
    
    .container {
        padding: 1rem;
        gap: 15px;
    }
    
    .article-card {
        grid-template-columns: 1fr;
        min-height: auto;
    }
    
    .article-image {
        height: 220px;
    }
    
    .section-title {
        font-size: 1.8rem;
    }
    
    .map-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    /* Mobile - Extra small popup */
    .custom-popup .leaflet-popup-content-wrapper {
        max-width: 90vw;
    }
    
    .map-popup img {
        height: 140px;
    }

    .author-avatar {
        width: 5em; 
        height: 3em;
    }

    #scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
    
    #scroll-to-top svg {
        width: 20px;
        height: 20px;
    }
}


@media (max-width: 480px) {
    header h1 {
        font-size: 1.1rem;
        line-height: 3.5em;
    }
    
    .monument-card h3 {
        font-size: 1rem;
    }
    
    .article-content h3 {
        font-size: 1.3rem;
    }

    .author-avatar {
        width: 6em; 
        height: 2em;
    }
}

@media (max-width: 395px) { 
    header h1 {
        font-size: 0.85rem;
        line-height: 4.5em;
    }
}


/* Mobile and Tablet Responsive */
@media (max-width: 968px) {
    .mobile-menu-toggle,
    .search-toggle {
        display: block;
    }
    
    header {
        position: relative;
        height: auto;
        min-height: 115px;
    }
    
    .main-navigation {
        position: fixed;
        top: 0;
        left: -100%;
        width: 80%;
        max-width: 320px;
        height: 100vh;
        background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
        padding: 80px 0 2rem 0;
        box-shadow: 4px 0 20px rgba(0, 0, 0, 0.3);
    }
    
    .main-navigation.mobile-active {
        left: 0;
    }
    
    .primary-menu {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 0;
    }
    
    .primary-menu li {
        width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }
    
    .primary-menu a {
        padding: 1rem 2rem;
        border-radius: 0;
        display: block;
        font-size: 1.1rem;
    }
    
    .primary-menu .sub-menu {
        position: static;
        display: none;
        background: rgba(0, 0, 0, 0.2);
        border: none;
        border-radius: 0;
        box-shadow: none;
        padding: 0;
    }
    
    .primary-menu li:hover > .sub-menu,
    .primary-menu li.focus > .sub-menu {
        display: block;
    }
    
    .primary-menu .sub-menu a {
        padding-left: 3rem;
        font-size: 1rem;
    }
    
    .ajax-search-container {
        padding: 1rem;
    }
    
    .ajax-search-input {
        font-size: 1rem;
        padding: 0.8rem 1.2rem;
    }
    
    .search-close {
        width: 40px;
        height: 40px;
    }
    
    .search-result-item {
        grid-template-columns: 80px 1fr;
        gap: 0.8rem;
        padding: 0.8rem;
    }
    
    .search-result-image {
        width: 80px;
        height: 65px;
    }
    
    .search-result-content h4 {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .mobile-menu-toggle,
    .search-toggle {
        top: 15px;
    }
    
    .mobile-menu-toggle {
        left: 15px;
    }
    
    .search-toggle {
        right: 15px;
    }
    
    .ajax-search-wrapper {
        gap: 0.5rem;
    }
    
    .ajax-search-input {
        font-size: 0.95rem;
        padding: 0.7rem 1rem;
    }
    
    .search-close {
        width: 36px;
        height: 36px;
    }
    
    .search-result-item {
        grid-template-columns: 1fr;
    }
    
    .search-result-image {
        width: 100%;
        height: 120px;
    }

    #scroll-to-top {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
    }
    
    #scroll-to-top svg {
        width: 18px;
        height: 18px;
    }
}

/* Map Layer Control Styles - ADD THIS TO YOUR style.css */

/* Map Layer Control Container */
.map-layer-control {
    background: white;
    border: 3px solid var(--border-color);
    border-radius: 12px;
    padding: 0.5rem;
    box-shadow: 0 4px 12px var(--shadow);
    margin-top: 10px;
    margin-right: 10px;
}

.layer-control-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.layer-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: linear-gradient(to bottom, #FFFAF0, white);
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Crimson Text', serif;
    font-size: 0.9rem;
    color: var(--text-primary);
    min-width: 120px;
}

.layer-btn svg {
    flex-shrink: 0;
    stroke: var(--primary-color);
    transition: all 0.3s ease;
}

.layer-btn span {
    font-weight: 600;
}

.layer-btn:hover {
    background: linear-gradient(to bottom, #FFF8E7, #F5E6D3);
    border-color: var(--accent-color);
    transform: translateX(3px);
}

.layer-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-color: var(--terracotta);
    color: white;
    box-shadow: 0 2px 8px rgba(139, 69, 19, 0.3);
}

.layer-btn.active svg {
    stroke: white;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .map-layer-control {
        margin-top: 5px;
        margin-right: 5px;
        padding: 0.4rem;
    }
    
    .layer-control-buttons {
        gap: 0.4rem;
    }
    
    .layer-btn {
        padding: 0.5rem 0.8rem;
        font-size: 0.85rem;
        min-width: 100px;
    }
    
    .layer-btn svg {
        width: 18px;
        height: 18px;
    }
}

@media (max-width: 480px) {
    .layer-btn span {
        display: none;
    }
    
    .layer-btn {
        min-width: auto;
        padding: 0.6rem;
        justify-content: center;
    }
    
    .layer-control-buttons {
        flex-direction: row;
    }
}
/* WORKING Monument Label Styles - ADD THIS TO YOUR style.css */

/* Custom Monument Labels */
.monument-label-custom {
    position: absolute;
    background: linear-gradient(135deg, rgba(139, 69, 19, 0.95), rgba(210, 105, 30, 0.95));
    color: white;
    border: 2px solid rgba(205, 133, 63, 0.8);
    border-radius: 8px;
    padding: 0.4rem 0.8rem;
    font-family: 'Cinzel', serif;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    text-align: center;
    pointer-events: none;
    z-index: 600;
    transform: translate(-50%, 0);
    opacity: 0;
    transition: all 0.3s ease;
}

/* Arrow pointing up to marker */
.monument-label-custom::before {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 0 6px 6px 6px;
    border-style: solid;
    border-color: transparent transparent rgba(139, 69, 19, 0.95) transparent;
}

/* Show labels when zoomed in */
.monument-label-custom.visible {
    opacity: 0.9;
}

/* Hover effect when near marker */
.monument-label-custom:hover {
    opacity: 1;
    transform: translate(-50%, -2px) scale(1.05);
    box-shadow: 0 4px 15px rgba(139, 69, 19, 0.5);
}

/* Responsive label styles */
@media (max-width: 768px) {
    .monument-label-custom {
        font-size: 0.75rem;
        padding: 0.3rem 0.6rem;
    }
    
    .monument-label-custom::before {
        margin-left: -5px;
        border-width: 0 5px 5px 5px;
    }
}

@media (max-width: 480px) {
    .monument-label-custom {
        font-size: 0.7rem;
        padding: 0.25rem 0.5rem;
    }
    
    .monument-label-custom::before {
        margin-left: -4px;
        border-width: 0 4px 4px 4px;
    }
}


/* Home Button on Map */
.home-button-control {
    background: white;
    border-radius: 4px;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
    margin-top: 10px;
}

.home-button {
    width: 34px;
    height: 34px;
    background: white;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 4px;
}

.home-button:hover {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
}

.home-button:hover svg {
    stroke: white;
}

.home-button svg {
    stroke: var(--primary-color);
    transition: stroke 0.3s ease;
}

/* Responsive */
@media (max-width: 768px) {
    .home-button-control {
        margin-top: 5px;
    }
    
    .home-button {
        width: 30px;
        height: 30px;
    }
    
    .home-button svg {
        width: 18px;
        height: 18px;
    }
}





/* =========================================================
   Community Stories - Submission Form
   ========================================================= */
.story-submit-wrapper {
    max-width: 900px;
    margin: 3rem auto;
    padding: 0 2rem;
}

.story-submit-container {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2.5rem;
    box-shadow: 0 4px 20px var(--shadow);
}

.story-submit-title {
    font-family: 'Cinzel', serif;
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.story-form-message {
    padding: 1rem 1.25rem;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    text-align: center;
}

.story-form-success {
    background: #EAF6EC;
    border: 1px solid #8FBC94;
    color: #2E5B34;
}

.story-form-error {
    background: #FBEAEA;
    border: 1px solid #D98C8C;
    color: #7A2E2E;
}

.story-view-link {
    display: inline-block;
    margin-top: 0.75rem;
    padding: 0.6rem 1.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white !important;
    text-decoration: none;
    border-radius: 25px;
    font-weight: 600;
    transition: transform 0.2s ease;
}

.story-view-link:hover {
    transform: translateY(-2px);
}

.story-submit-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.story-form-field {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.story-form-field label {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 1rem;
}

.story-form-field .required {
    color: var(--terracotta);
}

.story-form-field input[type="text"],
.story-form-field input[type="file"],
.story-form-field textarea {
    padding: 0.75rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text-primary);
    background: var(--light-sand);
    transition: border-color 0.2s ease;
}

.story-form-field input[type="text"]:focus,
.story-form-field textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
}

.story-form-field textarea {
    resize: vertical;
    line-height: 1.6;
}

.story-submit-btn {
    align-self: flex-start;
    padding: 0.9rem 2.5rem;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border: none;
    border-radius: 30px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px var(--shadow);
}

.story-submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow);
}

/* =========================================================
   Single Community Story Template
   ========================================================= */
.single-story-article {
    max-width: 1200px;
    margin: 2rem auto 4rem;
    padding: 0 2rem;
}

.single-story-container {
    display: flex;
    align-items: flex-start;
    gap: 3rem;
    background: white;
    border-radius: 16px;
    padding: 3rem;
    box-shadow: 0 4px 20px var(--shadow);
}

.single-story-container.no-image {
    justify-content: center;
}

.single-story-content {
    flex: 1 1 55%;
    display: flex;
    flex-direction: column;
    order: 1;
}

.single-story-title {
    font-family: 'Cinzel', serif;
    color: var(--primary-color);
    font-size: 2.4rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1.5rem;
}

.single-story-description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.single-story-image {
    flex: 1 1 40%;
    order: 2;
}

.single-story-image img {
    width: 100%;
    height: auto;
    border-radius: 14px;
    box-shadow: 0 4px 14px var(--shadow);
    display: block;
}

@media (max-width: 900px) {
    .single-story-container {
        flex-direction: column;
        padding: 2rem;
        gap: 2rem;
    }

    .single-story-content {
        order: 2;
    }

    .single-story-image {
        order: 1;
    }
}

/* =========================================================
   Related Stories (map popup, monument card, single monument)
   ========================================================= */
.related-stories {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-color);
}

.related-stories-label {
    display: block;
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.related-stories ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.related-stories a {
    color: var(--terracotta);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
}

.related-stories a:hover {
    text-decoration: underline;
}

.popup-related-stories {
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid var(--border-color);
}

.popup-related-stories strong {
    display: block;
    font-size: 0.8rem;
    color: var(--primary-color);
    margin-bottom: 0.3rem;
}

.popup-related-stories ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.popup-related-stories li {
    margin-bottom: 0.2rem;
}

.popup-related-stories a {
    color: var(--terracotta);
    text-decoration: none;
    font-size: 0.85rem;
    font-weight: 600;
}

.popup-related-stories a:hover {
    text-decoration: underline;
}

/* Admin: related stories multi-select */
.monument-related-stories-select {
    width: 100%;
    max-width: 400px;
    min-height: 140px;
}

/* =========================================================
   Monument Hero Slider (single monument page only)
   Main image on the left, gallery thumbnails beside it.
   Clicking a thumbnail slide-transitions the main image.
   ========================================================= */
.monument-hero-slider {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.monument-hero-main {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    border-radius: 14px;
    overflow: hidden;
    background: var(--light-sand);
    box-shadow: 0 6px 20px var(--shadow);
    aspect-ratio: 16 / 9;
    max-height: 520px;
}

.monument-hero-main img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
    opacity: 1;
    transition: opacity 0.18s ease;
}

.monument-hero-main img.is-sliding {
    opacity: 0;
}

.monument-hero-zoom-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.8);
    background: rgba(20, 12, 8, 0.55);
    color: white;
    font-size: 1.3rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    backdrop-filter: blur(3px);
    transition: background 0.2s ease, transform 0.2s ease;
}

.monument-hero-zoom-btn:hover,
.monument-hero-zoom-btn:focus-visible {
    background: rgba(20, 12, 8, 0.8);
    transform: scale(1.06);
    outline: none;
}

.monument-hero-thumbs {
    flex: 0 0 130px;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    max-height: 520px;
    overflow-y: auto;
    padding-right: 0.2rem;
}

.monument-hero-thumb {
    display: block;
    padding: 0;
    border: 3px solid transparent;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: var(--light-sand);
    box-shadow: 0 2px 8px var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
    aspect-ratio: 4 / 3;
    flex-shrink: 0;
}

.monument-hero-thumb:hover,
.monument-hero-thumb:focus-visible {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow);
    outline: none;
}

.monument-hero-thumb.active {
    border-color: var(--terracotta);
}

.monument-hero-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

@media (max-width: 768px) {
    .monument-hero-slider {
        flex-direction: column;
    }

    .monument-hero-main {
        max-height: 320px;
        width: 100%;
    }

    .monument-hero-thumbs {
        flex-direction: row;
        flex: 0 0 auto;
        max-height: none;
        width: 100%;
        overflow-x: auto;
        overflow-y: visible;
        padding-right: 0;
        padding-bottom: 0.3rem;
    }

    .monument-hero-thumb {
        width: 90px;
        flex-shrink: 0;
    }
}

/* Hero image zoom lightbox overlay */
.monument-lightbox {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(20, 12, 8, 0.94);
    align-items: center;
    justify-content: center;
}

.monument-lightbox.active {
    display: flex;
}

body.monument-lightbox-open {
    overflow: hidden;
}

.lightbox-image-wrapper {
    position: relative;
    max-width: 88vw;
    max-height: 84vh;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lightbox-image-wrapper img {
    max-width: 88vw;
    max-height: 78vh;
    width: auto;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.6);
    display: block;
}

.lightbox-counter {
    margin-top: 0.75rem;
    color: var(--light-sand);
    font-size: 0.95rem;
    letter-spacing: 0.5px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
    position: absolute;
    z-index: 5;
    background: rgba(255, 255, 255, 0.12);
    border: 2px solid rgba(255, 255, 255, 0.35);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
    background: rgba(255, 255, 255, 0.25);
}

.lightbox-close {
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    font-size: 1.6rem;
    line-height: 1;
}

.lightbox-prev,
.lightbox-next {
    top: 50%;
    transform: translateY(-50%);
    width: 54px;
    height: 54px;
    border-radius: 50%;
    font-size: 1.4rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
    transform: translateY(-50%) scale(1.08);
}

.lightbox-prev {
    left: 1.5rem;
}

.lightbox-next {
    right: 1.5rem;
}

@media (max-width: 768px) {
    .lightbox-prev,
    .lightbox-next {
        width: 34px;
        height: 34px;
        font-size: 0.9rem;
        background: rgba(20, 12, 8, 0.6);
    }

    .lightbox-prev:hover,
    .lightbox-next:hover {
        transform: translateY(-50%) scale(1.05);
    }

    .lightbox-close {
        width: 32px;
        height: 32px;
        top: 0.6rem;
        right: 0.6rem;
        font-size: 1.1rem;
        background: rgba(20, 12, 8, 0.6);
    }

    .lightbox-prev {
        left: 0.5rem;
    }

    .lightbox-next {
        right: 0.5rem;
    }

    .monument-hero-zoom-btn {
        width: 38px;
        height: 38px;
        font-size: 1.1rem;
        top: 0.6rem;
        right: 0.6rem;
    }
}

/* =========================================================
   Related Literature (single monument page only) - documents
   ========================================================= */
.monument-gallery-section {
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 3px solid var(--warm-beige);
}

.monument-gallery-title {
    font-family: 'Cinzel', serif;
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
}

.monument-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.75rem;
}

@media (max-width: 768px) {
    .monument-gallery-grid {
        grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
        gap: 0.5rem;
    }
}

/* =========================================================
   Single Monument: "View on map" + "All publications" buttons
   ========================================================= */
.btn-view-on-map {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    margin-top: 1.2rem;
    padding: 0.6rem 1.4rem;
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.7);
    color: white;
    text-decoration: none;
    border-radius: 25px;
    font-size: 0.95rem;
    font-weight: 600;
    backdrop-filter: blur(4px);
    transition: all 0.25s ease;
}

.btn-view-on-map:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.btn-view-on-map-light {
    background: var(--light-sand);
    border-color: var(--border-color);
    color: var(--primary-color);
}

.btn-view-on-map-light:hover {
    background: var(--warm-beige);
}

.btn-back-outline {
    display: inline-block;
    padding: 1rem 3rem;
    background: transparent;
    color: var(--primary-color);
    text-decoration: none;
    border: 2px solid var(--primary-color);
    border-radius: 30px;
    font-size: 1.1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-back-outline:hover {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* =========================================================
   Monument Gallery: downloadable document tiles (PDF, Word)
   ========================================================= */
.monument-gallery-file {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 0.3rem;
    padding: 0.75rem 0.5rem;
    border-radius: 10px;
    background: var(--light-sand);
    border: 1px solid var(--border-color);
    text-decoration: none;
    box-shadow: 0 2px 8px var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
    aspect-ratio: 4 / 3;
}

.monument-gallery-file:hover,
.monument-gallery-file:focus-visible {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 6px 16px var(--shadow);
    background: var(--warm-beige);
    outline: none;
}

.monument-gallery-file-icon {
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.monument-gallery-file-icon img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.monument-gallery-file-name {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.monument-gallery-file-download {
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--terracotta);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* =========================================================
   Monument Archive (/monument/) - compact full-width rows
   ========================================================= */
.monument-archive-wrapper {
    max-width: 950px;
    margin: 3rem auto 4rem;
    padding: 0 2rem;
}

.monument-archive-title {
    font-family: 'Cinzel', serif;
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 2rem;
}

.monument-archive-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Row height ~3cm (113px at 96dpi) */
.monument-archive-row {
    display: flex;
    align-items: stretch;
    height: 113px;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px var(--shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.monument-archive-row:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px var(--shadow);
}

.monument-archive-row-image {
    flex: 0 0 113px;
    width: 113px;
    height: 113px;
    display: block;
    background: var(--light-sand);
}

.monument-archive-row-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.monument-archive-row-noimage {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: var(--warm-beige);
}

.monument-archive-row-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 0.35rem;
    padding: 0.6rem 1.4rem;
    min-width: 0;
}

.monument-archive-row-top {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.monument-archive-row-category {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--terracotta);
}

.monument-archive-row-title {
    margin: 0;
    font-family: 'Cinzel', serif;
    font-size: 1.05rem;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.monument-archive-row-title a {
    color: var(--primary-color);
    text-decoration: none;
}

.monument-archive-row-title a:hover {
    text-decoration: underline;
}

.monument-archive-row-period {
    font-size: 0.78rem;
    color: var(--text-secondary);
    font-style: italic;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.monument-archive-row-more {
    align-self: flex-start;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--terracotta);
    text-decoration: none;
}

.monument-archive-row-more:hover {
    text-decoration: underline;
}

.monument-archive-empty {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

/* Pagination (also used on any other WP archive/paged listing) */
.monument-archive-wrapper .pagination,
.monument-archive-wrapper .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 2rem;
}

.monument-archive-wrapper .pagination a,
.monument-archive-wrapper .pagination span,
.monument-archive-wrapper .nav-links a,
.monument-archive-wrapper .nav-links span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 0.75rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.monument-archive-wrapper .pagination a:hover,
.monument-archive-wrapper .nav-links a:hover {
    background: var(--warm-beige);
}

.monument-archive-wrapper .pagination .current,
.monument-archive-wrapper .nav-links .current {
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    color: white;
    border-color: transparent;
}

@media (max-width: 600px) {
    .monument-archive-row {
        height: auto;
        min-height: 90px;
    }

    .monument-archive-row-image {
        flex-basis: 90px;
        width: 90px;
        height: auto;
    }

    .monument-archive-row-content {
        padding: 0.5rem 1rem;
    }

    .monument-archive-row-title {
        font-size: 0.95rem;
    }
}
