/*
Theme Name: Leamington Utah
Theme URI: https://www.leamingtontown.com/
Description: A modern, responsive WordPress theme for Leamington, Utah, featuring a "Western Modern" aesthetic and city-site layout.
Author: Ryan
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: leamington
*/

/* 
 * HANDCRAFTED WESTERN DESIGN SYSTEM
 * ----------------------------
 * Color Palette:
 * --color-cream: #FAF9F6 (Main background, warmth)
 * --color-umber: #3D2B1F (Typography, deep earth)
 * --color-ochre: #C08A3E (Accent, desert sun)
 * --color-sage: #93A291 (Secondary accent, dusty nature)
 * --color-white: #FFFFFF
 *
 * Typography:
 * Headings: 'Playfair Display', serif
 * Body: 'Inter', sans-serif
 * Accents/Script: 'Mrs Saint Delafield', cursive
 */

:root {
    --color-cream: #FAF9F6;
    --color-umber: #3D2B1F;
    --color-ochre: #C08A3E;
    --color-sage: #93A291;
    --color-white: #FFFFFF;
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
    --font-script: 'Mrs Saint Delafield', cursive;
    --container-width: 1200px;
    --section-padding: 100px 0;
}

html {
    scroll-behavior: smooth;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--color-cream);
}

::-webkit-scrollbar-thumb {
    background: var(--color-umber);
    border: 3px solid var(--color-cream);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-ochre);
}

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

body {
    background-color: var(--color-cream);
    color: var(--color-umber);
    font-family: var(--font-body);
    line-height: 1.8;
    font-size: 19px;
    /* Slightly larger */
    font-weight: 500;
    /* Increased weight for readability */
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 900;
    margin-bottom: 1.5rem;
    color: var(--color-umber);
    line-height: 1.1;
}

.script-accent {
    font-family: var(--font-script);
    font-size: 3.5rem;
    color: var(--color-ochre);
    display: block;
    margin-bottom: 0.5rem;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
}

.site-title a {
    color: var(--color-ochre);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

a {
    color: var(--color-ochre);
    text-decoration: none;
    transition: all 0.3s ease;
}

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

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

/* Header Styles - High Contrast */
.top-bar-handcrafted {
    background-color: var(--color-umber);
    /* Dark for high contrast */
    color: var(--color-cream);
    padding: 12px 0;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.letterhead-text {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 900;
    font-size: 0.85rem;
}

.letterhead-established {
    font-family: var(--font-script);
    font-size: 1.8rem;
    color: var(--color-ochre);
}

/* Main Navigation & Dropdowns */
.handcrafted-nav {
    background: var(--color-umber);
    position: relative;
    z-index: 1000;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
}

.main-navigation ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
}

.main-navigation li {
    position: relative;
}

/* ── BUTTONS ── */
.btn {
    display: inline-block;
    padding: 14px 32px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    border: none;
    cursor: pointer;
    overflow: hidden;
    z-index: 1;
    text-align: center;
    border-radius: 4px;
}

.btn-primary {
    background: var(--color-ochre);
    color: var(--color-white) !important;
    border: 2px solid var(--color-ochre);
    box-shadow: 0 4px 15px rgba(192, 138, 62, 0.25);
}

.btn-primary:hover {
    background: var(--color-umber);
    border-color: var(--color-umber);
    color: var(--color-cream) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(61, 43, 31, 0.3);
}

.btn-secondary {
    background: var(--color-umber);
    color: var(--color-cream) !important;
    border: 2px solid var(--color-umber);
    box-shadow: 0 4px 15px rgba(61, 43, 31, 0.3);
}

.btn-secondary:hover {
    background: var(--color-ochre);
    border-color: var(--color-ochre);
    color: var(--color-white) !important;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(192, 138, 62, 0.3);
}

.main-navigation a {
    display: block;
    padding: 25px 30px;
    color: var(--color-cream);
    text-decoration: none;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.main-navigation a:hover,
.main-navigation li:hover>a {
    color: var(--color-ochre);
    background: rgba(255, 255, 255, 0.05);
}

/* Premium "Town Hall Mega Menu" Upgrade */
.main-navigation ul ul {
    position: absolute;
    top: 100%;
    left: 0;
    background: #F8F4EF; /* Aged Paper / Parchment */
    border-top: 3px solid var(--color-ochre);
    box-shadow: 25px 35px 80px rgba(0,0,0,0.4);
    padding: 30px;
    min-width: 550px; /* Wider for columns */
    border-radius: 0 0 4px 4px;
    background-image: radial-gradient(rgba(192, 138, 62, 0.05) 1px, transparent 1px);
    background-size: 15px 15px;
    display: flex;
    flex-wrap: wrap; /* Column Support! */
    gap: 10px 40px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.2, 0, 0.2, 1);
    flex-direction: column;
    padding: 10px 0;
    border-top: 3px solid var(--color-ochre);
}

.main-navigation ul li:hover>ul {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.main-navigation ul ul a {
    padding: 15px 25px;
    color: var(--color-umber);
    font-size: 0.8rem;
    text-transform: none;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(192, 138, 62, 0.1);
}

.main-navigation ul ul a:hover {
    background: var(--color-cream);
    color: var(--color-ochre);
    padding-left: 30px;
}

.main-navigation ul ul li:last-child a {
    border-bottom: none;
}

/* Level 3: The "Town Archive" Hover Reveal */
.main-navigation ul ul ul {
    position: static; 
    width: 100%;
    max-height: 0; /* Hidden by default */
    opacity: 0;
    overflow: hidden;
    visibility: hidden;
    display: block;
    padding: 0 0 0 20px; /* Indent */
    background: transparent;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.main-navigation ul ul li:hover > ul {
    max-height: 500px; /* Reveal on hover! */
    opacity: 1;
    visibility: visible;
    padding: 5px 0 15px 20px;
}

.main-navigation ul ul ul li {
    border-bottom: none;
    margin-bottom: 2px;
}

.main-navigation ul ul ul a {
    padding: 6px 0;
    font-size: 0.95rem;
    font-weight: 500;
    opacity: 0.7;
    transition: all 0.2s ease;
}

.main-navigation ul ul ul a:hover {
    opacity: 1;
    color: var(--color-ochre) !important;
    padding-left: 8px;
}

/* Add a subtle indicator that there's more under a category */
.main-navigation ul ul .menu-item-has-children > a::after {
    content: " +";
    font-family: var(--font-body);
    font-size: 0.9rem;
    color: var(--color-ochre);
    opacity: 0.5;
    margin-left: 10px;
    display: inline-block;
    transition: transform 0.3s ease;
}

.main-navigation ul ul li:hover > a::after {
    transform: rotate(45deg); /* Turns the + into an X when open */
    opacity: 1;
}

/* Sub-menu indicators */
.menu-item-has-children>a::after {
    content: ' \25BE';
    font-size: 0.6rem;
    vertical-align: middle;
    margin-left: 5px;
    opacity: 0.6;
}

/* Hide mobile toggle on desktop */
.menu-toggle {
    display: none;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
        background: var(--color-umber);
        color: var(--color-cream);
        border: none;
        padding: 10px 20px;
        font-family: var(--font-heading);
        text-transform: uppercase;
    }

    .main-navigation ul {
        display: none;
        /* Mobile menu logic handled by JS */
    }

    .main-navigation.toggled ul {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: var(--color-white);
        padding: 20px;
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    }

    .main-navigation.toggled ul li {
        margin-bottom: 15px;
    }
}

/* Premium Home Screen Enhancements */
.hero {
    overflow: hidden;
}

.hero-content {
    animation: fadeInUp 1.2s cubic-bezier(0.2, 0, 0.2, 1) both;
}

.handcrafted-card {
    animation: fadeInRight 1.5s cubic-bezier(0.2, 0, 0.2, 1) both;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(60px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Refined Quick Links */
.quick-link-card {
    position: relative;
    z-index: 1;
}

.quick-link-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('https://www.transparenttextures.com/patterns/parchment.png');
    opacity: 0.05;
    z-index: -1;
}

.quick-link-card h3 {
    font-size: 1.6rem;
    letter-spacing: -0.5px;
}

.quick-link-card .read-more {
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.75rem;
    color: var(--color-ochre);
    border-bottom: 2px solid transparent;
    transition: border-bottom 0.3s ease;
}

.quick-link-card:hover .read-more {
    border-bottom: 2px solid var(--color-ochre);
}

/* Button hover gleam effect */
.btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    transform: skewX(-25deg);
    transition: left 0.5s ease;
}

.btn:hover::after {
    left: 150%;
}

/* High-Contrast Panoramic Hero */
.hero {
    height: 90vh;
    min-height: 800px;
    background-size: cover;
    background-position: center bottom;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    padding: 0 20px;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(180deg,
            rgba(31, 22, 16, 0.6) 0%,
            rgba(31, 22, 16, 0.45) 50%,
            rgba(31, 22, 16, 0.8) 100%);
    z-index: 10;
}

.hero-content {
    position: relative;
    z-index: 20;
    text-align: center;
    max-width: 1100px;
}

.hero-content h1 {
    font-size: 9rem;
    line-height: 0.8;
    margin-bottom: 25px;
    color: var(--color-white);
    text-shadow: 0 15px 50px rgba(0, 0, 0, 0.8), 0 5px 15px rgba(0, 0, 0, 0.5);
    letter-spacing: -3px;
    font-weight: 900;
}

.hero-content .script-accent {
    font-family: var(--font-script);
    font-size: 6rem;
    color: var(--color-ochre);
    margin-bottom: -40px;
    display: block;
    text-shadow: 0 5px 20px rgba(0, 0, 0, 0.6);
}

.hero-content .hero-intro {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 5px;
    text-transform: uppercase;
    color: var(--color-white);
    opacity: 1;
    margin-bottom: 50px;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 1);
}

/* Fix for script-accent overlap on following sections */
.quick-links {
    padding: 120px 0;
    /* More padding to clear the torn divider */
}

.quick-links .script-accent {
    margin-bottom: 10px;
    /* Clear the title below */
}

/* Handcrafted Community Section */
.community-handcrafted {
    padding: 150px 0;
    background-color: var(--color-cream);
    overflow: hidden;
}

.handcrafted-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    gap: 0;
}

.handcrafted-image {
    width: 70%;
    position: relative;
    z-index: 1;
}

.handcrafted-image img {
    width: 100%;
    height: 700px;
    object-fit: cover;
    border: 20px solid var(--color-white);
    box-shadow: 20px 20px 80px rgba(0, 0, 0, 0.1);
}

.handcrafted-card {
    width: 45%;
    background: var(--color-white);
    padding: 80px;
    position: absolute;
    right: 0;
    z-index: 10;
    box-shadow: -20px 30px 100px rgba(61, 43, 31, 0.15);
    border: 1px solid rgba(192, 138, 62, 0.1);
}

.handcrafted-card h2 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 30px;
}

.handcrafted-card .description {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--color-umber);
    margin-bottom: 40px;
    opacity: 0.9;
}

.section-title {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 60px;
    letter-spacing: -1px;
}

.script-accent {
    display: block;
    font-family: var(--font-script);
    font-size: 3rem;
    color: var(--color-ochre);
    margin-bottom: -15px;
}

.town-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 50px;
    border-top: 1px solid rgba(61, 43, 31, 0.1);
    padding-top: 40px;
}

/* Western Scroll Accordions */
.town-services-accordions {
    padding: 120px 0;
}

.accordion-columns {
    display: flex;
    gap: 30px;
    margin-top: 60px;
}

.accordion-column {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.western-accordion {
    background: var(--color-white);
    border: 1px solid rgba(61, 43, 31, 0.1);
    box-shadow: 0 10px 30px rgba(61, 43, 31, 0.05);
    transition: all 0.4s ease;
    align-self: flex-start;
    /* Key fix for gaps */
    width: 100%;
}

.accordion-header {
    width: 100%;
    padding: 30px 40px;
    background: var(--color-umber);
    color: var(--color-cream);
    display: flex;
    align-items: center;
    border: none;
    cursor: pointer;
    text-align: left;
    position: relative;
    font-family: var(--font-heading);
}

.accordion-header .header-icon {
    font-size: 1.5rem;
    color: var(--color-ochre);
    margin-right: 20px;
}

.accordion-header .header-text {
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.accordion-header .chevron {
    margin-left: auto;
    font-size: 1.5rem;
    transition: transform 0.4s ease;
    color: var(--color-ochre);
}

.western-accordion.is-open .chevron {
    transform: rotate(180deg);
}

.western-accordion.is-open {
    box-shadow: 0 30px 60px rgba(61, 43, 31, 0.15);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: all 0.5s cubic-bezier(0.2, 0, 0.2, 1);
    background-image: url('https://www.transparenttextures.com/patterns/parchment.png');
    background-color: #fff;
}

.western-accordion.is-open .accordion-content {
    max-height: 500px;
    padding: 40px;
    border-top: 1px dashed rgba(61, 43, 31, 0.1);
}

.ledger-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.ledger-links li {
    margin-bottom: 20px;
    padding-left: 20px;
    position: relative;
}

.ledger-links li::before {
    content: '\2014';
    position: absolute;
    left: 0;
    color: var(--color-ochre);
}

.ledger-links a {
    color: var(--color-umber);
    font-weight: 700;
    font-size: 1.1rem;
    border-bottom: 2px solid transparent;
}

.ledger-links a:hover {
    color: var(--color-ochre);
    border-bottom-color: var(--color-ochre);
}

@media (max-width: 992px) {
    .accordion-grid {
        grid-template-columns: 1fr;
    }
}

.detail-item .label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--color-ochre);
    margin-bottom: 5px;
    font-weight: 700;
}

.detail-item .value {
    font-size: 1rem;
    color: var(--color-umber);
    font-weight: 600;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.western-stamp {
    width: 100px;
    height: 100px;
    border: 2px dashed var(--color-ochre);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(15deg);
    opacity: 0.6;
}

.stamp-text {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 900;
    color: var(--color-ochre);
    text-align: center;
    line-height: 1;
}

/* Places Highlight Section */
.places-highlight {
    padding-bottom: 100px;
    background-color: var(--color-cream);
}

.places-inner {
    position: relative;
    overflow: hidden;
    height: 600px;
}

.places-inner img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    filter: brightness(0.85);
    transition: transform 1.2s cubic-bezier(0.2, 0, 0.2, 1);
}

.places-inner:hover img {
    transform: scale(1.05);
    /* Subtle zoom for premium feel */
}

.places-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    z-index: 20;
    pointer-events: none;
}

.places-overlay h2 {
    font-size: 5rem;
    color: var(--color-white);
    text-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    margin-top: -20px;
}

.places-overlay .script-accent {
    font-size: 4rem;
    color: var(--color-ochre);
    text-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .places-inner {
        height: 400px;
    }

    .places-overlay h2 {
        font-size: 2.5rem;
    }
}

/* Handcrafted Western Footer */
.handcrafted-footer {
    background-color: var(--color-umber);
    color: var(--color-cream);
    padding: 100px 0 60px 0;
    position: relative;
    text-align: center;
    margin-top: 100px;
}

.torn-divider-top {
    position: absolute;
    top: -1px;
    left: 0;
    width: 100%;
    height: 100px;
    background-color: var(--color-cream);
    transform: rotate(180deg);
    mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5,73.84-4.36,147.54,16.88,218.32,37.5,110.12,32.09,229.41,40.15,343.33,26.25,50.77-6.2,102.15-20.25,148.55-33.75,8.27-2.45,16.42-4.75,24.5-6.75V0Z" fill="%23FAF9F6" opacity=".5"/><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,73.12,11.55,107.5,24.5,94 35.39,195.51,52,295,45.91,65-4,129.47-19.12,192.34-36.2,27.14-7.37,54.26-15.61,81.33-24.81,26.72-9.08,53-19.06,78.75-30V0Z" fill="%23FAF9F6"/></svg>');
    mask-size: cover;
    -webkit-mask-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5,73.84-4.36,147.54,16.88,218.32,37.5,110.12,32.09,229.41,40.15,343.33,26.25,50.77-6.2,102.15-20.25,148.55-33.75,8.27-2.45,16.42-4.75,24.5-6.75V0Z" fill="%23FAF9F6" opacity=".5"/><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,73.12,11.55,107.5,24.5,94 35.39,195.51,52,295,45.91,65-4,129.47-19.12,192.34-36.2,27.14-7.37,54.26-15.61,81.33-24.81,26.72-9.08,53-19.06,78.75-30V0Z" fill="%23FAF9F6"/></svg>');
    -webkit-mask-size: cover;
}

.footer-seal {
    margin-bottom: 60px;
}

.footer-seal .script-accent {
    font-size: 5rem;
    color: var(--color-ochre);
    margin-bottom: -20px;
    display: block;
}

.town-slogan {
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 4px;
    font-size: 0.85rem;
    font-weight: 700;
    opacity: 0.8;
}

/* Handcrafted Footer Grid */
.footer-details {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 60px;
    margin: 60px 0;
    text-align: left;
}

.footer-column strong {
    display: block;
    font-family: var(--font-heading);
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.9rem;
    color: var(--color-ochre);
    margin-bottom: 25px;
    border-bottom: 2px solid rgba(192, 138, 62, 0.2);
    padding-bottom: 10px;
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: var(--color-cream);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.footer-column a:hover {
    color: var(--color-ochre);
    padding-left: 5px;
}

.footer-phone {
    margin-top: 15px;
    font-weight: 700;
    color: var(--color-cream);
}

@media (max-width: 768px) {
    .footer-details {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }
}

.connection-group a {
    color: var(--color-cream);
    text-decoration: underline;
    font-weight: 700;
}

.connection-group a:hover {
    color: var(--color-ochre);
}

.site-info {
    font-size: 0.8rem;
    opacity: 0.5;
    border-top: 1px solid rgba(250, 249, 246, 0.05);
    padding-top: 40px;
}

@media (max-width: 768px) {
    .footer-details {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

body::after {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url("https://www.transparenttextures.com/patterns/60-lines.png");
    opacity: 0.03;
    pointer-events: none;
    z-index: 9999;
}

/* Mobile Responsiveness Refinements */
@media (max-width: 768px) {
    .container {
        padding: 0 20px;
    }

    .section-title {
        font-size: 2.5rem;
        margin-bottom: 40px;
    }

    .hero-content h1 {
        font-size: 4rem;
        line-height: 1;
    }

    .hero-content .script-accent {
        font-size: 3rem;
        margin-bottom: -15px;
    }

    .community-handcrafted {
        padding: 80px 0;
    }

    .handcrafted-wrapper {
        flex-direction: column;
        gap: 0;
    }

    .handcrafted-image {
        width: 100%;
    }

    .handcrafted-image img {
        height: 400px;
        border: 10px solid var(--color-white);
    }

    .handcrafted-card {
        width: 100%;
        position: static;
        padding: 40px 30px;
        margin-top: -30px;
        box-shadow: 0 20px 60px rgba(61, 43, 31, 0.1);
    }

    .handcrafted-card h2 {
        font-size: 2.5rem;
    }

    .town-details {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .quick-links {
        padding: 60px 0;
    }

    .grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}


/* Refined Western Gallery Frames */
.gallery-modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 40px;
    margin-top: 80px;
    padding: 40px 20px;
    margin-left: auto;
    margin-right: auto;
    max-width: 1200px;
}

/* Lower the Hero Button */
.hero-actions {
    margin-top: 60px;
    /* Move it down from the title */
}

/* Hero button: slightly larger than normal buttons */
.hero-overlay .btn-primary {
    padding: 16px 40px;
    font-size: 0.9rem;
    letter-spacing: 3px;
}

/* ==========================================================================
   TOWN MURAL SECTION
   ========================================================================== */

.town-mural-display {
    width: 100%;
    background-color: var(--color-umber);
    position: relative;
    line-height: 0;
}

.mural-wrapper {
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
}

.full-mural {
    width: 100%;
    height: auto;
    display: block;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

/* Hero Overlay: Title + Button on top of mural */
.hero-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 60px 20px 50px;
    background: linear-gradient(to top, rgba(44, 34, 28, 0.85) 0%, rgba(44, 34, 28, 0.6) 50%, transparent 100%);
    line-height: 1.4;
}

.hero-overlay .hero-title {
    color: var(--color-white);
    font-size: 4rem;
    margin: 10px 0 8px;
    text-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.hero-overlay .hero-subtitle {
    color: var(--color-cream);
    opacity: 0.9;
    font-size: 1.3rem;
    margin-bottom: 25px;
}

.hero-overlay .hero-actions {
    margin-top: 10px;
}

.official-banner-text {
    color: var(--color-white);
    font-family: var(--font-heading);
    letter-spacing: 4px;
    text-transform: uppercase;
    font-size: 1rem;
    text-shadow: 0 2px 8px rgba(0,0,0,0.6);
}

@media (max-width: 768px) {
    .hero-overlay .hero-title {
        font-size: 2.2rem;
    }
    .hero-overlay .hero-subtitle {
        font-size: 1rem;
    }
    .hero-overlay {
        padding: 40px 15px 30px;
    }
}

/* ── end button styles ── */

.gallery-item {
    background: var(--color-white);
    padding: 20px 20px 60px 20px;
    /* Polaroid frame */
    box-shadow: 10px 15px 40px rgba(61, 43, 31, 0.08);
    transition: all 0.4s cubic-bezier(0.2, 0, 0.2, 1);
    position: relative;
    border: 1px solid rgba(192, 138, 62, 0.1);
    margin-bottom: 20px;
}

.gallery-item:hover {
    transform: translateY(-10px) rotate(1deg);
    box-shadow: 20px 30px 80px rgba(61, 43, 31, 0.15);
    z-index: 10;
}

.gallery-item img {
    width: 100%;
    height: 350px;
    object-fit: cover;
    display: block;
}

.photo-overlay {
    display: none;
    /* Keep it clean for the secretary */
}

@media (max-width: 768px) {
    .gallery-modern-grid {
        grid-template-columns: 1fr;
        padding: 30px 15px;
    }
    .gallery-item {
        padding: 15px 15px 50px 15px;
        margin-bottom: 15px;
    }
}

/* ==========================================================================
   MUSEUM EXHIBIT: HERITAGE & HISTORY STYLES
   (Targets both Town & Festival History records)
   ========================================================================== */

.history-exhibit, .leamington-history, .leamarado-history {
    background-color: #F8F4EF;
    /* Aged paper warmth */
    padding-bottom: 0px;
}

.exhibit-header {
    padding: 120px 0 80px;
    background: linear-gradient(rgba(250, 249, 246, 0.85), rgba(248, 244, 239, 1)), url('images/history/map.jpg');
    background-size: cover;
    background-position: center;
    margin-bottom: 100px;
    border-bottom: 1px solid rgba(192, 138, 62, 0.2);
}

.exhibit-title {
    font-size: 5rem;
    margin-bottom: 10px;
    color: var(--color-umber);
}

.header-divider {
    width: 80px;
    height: 4px;
    background-color: var(--color-ochre);
    margin: 20px auto 30px;
}

.exhibit-intro {
    max-width: 700px;
    margin: 0 auto;
    font-size: 1.25rem;
    color: var(--color-umber);
    line-height: 1.6;
}

/* Scrapbook Item Layouts */
.scrapbook-container {
    padding: 100px 0;
}

.exhibit-item {
    margin-bottom: 180px;
    position: relative;
}

.exhibit-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 100px;
    align-items: center;
}

.alternate-grid .exhibit-grid {
    grid-template-columns: 0.9fr 1.1fr;
}

/* Polaroid Photo Magic */
.polaroid-frame {
    background: var(--color-white);
    padding: 20px 20px 80px 20px;
    box-shadow: 25px 35px 70px rgba(61, 43, 31, 0.15);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    transition: transform 0.4s cubic-bezier(0.2, 0, 0.2, 1);
}

.polaroid-frame img {
    width: 100%;
    height: 450px;
    object-fit: cover;
    display: block;
    filter: sepia(0.05) contrast(1.02);
}

.polaroid-caption {
    position: absolute;
    bottom: 25px;
    left: 20px;
    font-family: var(--font-script);
    font-size: 2.2rem;
    color: var(--color-umber);
    opacity: 0.9;
}

.rotate-left {
    transform: rotate(-2deg);
}

.rotate-right {
    transform: rotate(2deg);
}

.polaroid-frame:hover {
    transform: rotate(0deg) scale(1.02);
    z-index: 10;
}

/* Exhibit Text Styling */
.exhibit-date {
    display: inline-block;
    padding: 8px 25px;
    background-color: var(--color-umber);
    color: var(--color-cream);
    font-family: var(--font-body);
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 4px;
    margin-bottom: 25px;
    border-radius: 2px;
    text-transform: uppercase;
}

.exhibit-h2 {
    font-size: 4rem;
    margin-bottom: 35px;
    line-height: 1;
    color: var(--color-umber);
}

.exhibit-body p {
    margin-bottom: 30px;
    font-size: 1.15rem;
    color: rgba(61, 43, 31, 0.85);
    line-height: 1.8;
}

/* Heritage CTA */
.heritage-cta {
    background-color: var(--color-umber);
    padding: 150px 0;
    color: var(--color-cream);
    margin-top: 100px;
}

.heritage-cta h3 {
    color: var(--color-cream) !important;
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.heritage-cta p {
    max-width: 600px;
    margin: 0 auto 50px;
    opacity: 0.8;
}

/* Buttons on dark backgrounds */
.heritage-cta .btn-primary,
.hero-overlay .btn-primary {
    background: var(--color-ochre);
    color: var(--color-white) !important;
    border-color: var(--color-ochre);
}

.heritage-cta .btn-primary:hover,
.hero-overlay .btn-primary:hover {
    background: var(--color-cream);
    color: var(--color-umber) !important;
    border-color: var(--color-cream);
}

.heritage-cta .btn-secondary {
    background: transparent;
    color: var(--color-cream) !important;
    border: 2px solid var(--color-cream);
}

.heritage-cta .btn-secondary:hover {
    background: var(--color-cream);
    color: var(--color-umber) !important;
}

@media (max-width: 992px) {

    .exhibit-grid,
    .alternate-grid .exhibit-grid {
        grid-template-columns: 1fr;
        gap: 60px;
    }

    .exhibit-h2 {
        font-size: 3rem;
    }

    .polaroid-frame img {
        height: 350px;
    }
}

/* ─────────────────────────────────────────────
   SCROLL ANCHORS (for nav dropdown anchor links)
   ───────────────────────────────────────────── */
.exhibit-item[id],
.gov-section[id] {
    scroll-margin-top: 120px;
}

/* ─────────────────────────────────────────────
   MOBILE NAVIGATION: Sub-menu + Body Lock
   ───────────────────────────────────────────── */
body.menu-open {
    overflow: hidden;
}

@media (max-width: 768px) {
    .menu-item-has-children .sub-menu {
        display: none;
        padding-left: 15px;
    }
    .menu-item-has-children.sub-menu-open > .sub-menu {
        display: block;
    }
    .menu-item-has-children > a::after {
        content: ' \25BC';
        font-size: 0.7em;
        opacity: 0.6;
    }
    .menu-item-has-children.sub-menu-open > a::after {
        content: ' \25B2';
    }
}

/* ─────────────────────────────────────────────
   GOVERNMENT PAGE
   ───────────────────────────────────────────── */
.government-page .gov-section {
    padding: 60px 0;
    border-bottom: 1px solid rgba(61, 43, 31, 0.1);
}

.government-page .gov-section:last-child {
    border-bottom: none;
}

.gov-section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    color: var(--color-umber);
    margin-bottom: 40px;
    padding-bottom: 15px;
    border-bottom: 3px solid var(--color-ochre);
    display: inline-block;
}

/* Officials Grid */
.officials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.official-card {
    text-align: center;
    padding: 30px 20px;
}

.official-photo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto 20px;
    border: 4px solid var(--color-ochre);
}

.official-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.official-photo-placeholder {
    background: var(--color-sage);
    display: flex;
    align-items: center;
    justify-content: center;
}

.official-photo-placeholder .dashicons {
    font-size: 3rem;
    width: 3rem;
    height: 3rem;
    color: var(--color-white);
}

.official-name {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--color-umber);
    margin-bottom: 5px;
}

.official-title {
    color: var(--color-ochre);
    font-weight: 600;
    font-size: 0.95rem;
    margin-bottom: 10px;
}

.official-contact {
    font-size: 0.9rem;
    margin-bottom: 3px;
}

.official-contact a {
    color: var(--color-umber);
    text-decoration: none;
}

.official-contact a:hover {
    color: var(--color-ochre);
}

/* Employee Table */
.employee-list table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-white);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
}

.employee-list thead {
    background: var(--color-umber);
    color: var(--color-cream);
}

.employee-list th {
    padding: 15px 20px;
    text-align: left;
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.employee-list td {
    padding: 15px 20px;
    border-bottom: 1px solid rgba(61, 43, 31, 0.08);
    color: var(--color-umber);
}

.employee-list tbody tr:hover {
    background: rgba(192, 138, 62, 0.04);
}

.employee-list td a {
    color: var(--color-ochre);
    text-decoration: none;
}

.employee-list td a:hover {
    text-decoration: underline;
}

/* Applications List */
.applications-list .application-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 25px;
    margin-bottom: 12px;
}

.application-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.application-info .dashicons {
    font-size: 1.8rem;
    width: 1.8rem;
    height: 1.8rem;
    color: #c0392b;
}

.application-name {
    font-weight: 600;
    color: var(--color-umber);
    font-size: 1.05rem;
}

.placeholder-text {
    color: var(--color-umber);
    opacity: 0.5;
    font-style: italic;
    padding: 40px 0;
    text-align: center;
}

@media (max-width: 768px) {
    .officials-grid {
        grid-template-columns: 1fr;
    }

    .employee-list {
        overflow-x: auto;
    }

    .applications-list .application-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .gov-section-title {
        font-size: 2rem;
    }
}

/* ─────────────────────────────────────────────
   DOCUMENTS PAGE
   ───────────────────────────────────────────── */
.doc-filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    padding: 30px 0 40px;
}

.doc-filter-btn {
    padding: 10px 20px;
    border: 2px solid var(--color-umber);
    background: transparent;
    color: var(--color-umber);
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.doc-filter-btn:hover,
.doc-filter-btn.active {
    background: var(--color-umber);
    color: var(--color-cream);
}

.documents-list {
    padding-bottom: 60px;
}

.document-item {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 25px;
    margin-bottom: 15px;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.document-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

.document-icon .dashicons {
    font-size: 2.5rem;
    width: 2.5rem;
    height: 2.5rem;
    color: #c0392b;
}

.document-details {
    flex: 1;
}

.document-title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--color-umber);
    margin-bottom: 5px;
}

.document-description {
    color: var(--color-umber);
    opacity: 0.7;
    font-size: 0.95rem;
    margin-bottom: 8px;
}

.document-meta {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.document-date {
    font-size: 0.85rem;
    color: var(--color-umber);
    opacity: 0.6;
}

.document-badge {
    display: inline-block;
    padding: 3px 10px;
    background: var(--color-ochre);
    color: var(--color-white);
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 3px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.document-action .btn {
    white-space: nowrap;
}

@media (max-width: 768px) {
    .document-item {
        flex-direction: column;
        text-align: center;
    }

    .document-meta {
        justify-content: center;
    }

    .doc-filter-btn {
        font-size: 0.8rem;
        padding: 8px 14px;
    }
}

/* ─────────────────────────────────────────────
   WOOCOMMERCE OVERRIDES
   ───────────────────────────────────────────── */
.woocommerce .button,
.woocommerce button.button,
.woocommerce input.button,
.woocommerce a.button {
    background-color: var(--color-ochre) !important;
    color: var(--color-white) !important;
    border: none !important;
    border-radius: 4px !important;
    font-family: var(--font-body) !important;
    font-weight: 600 !important;
    padding: 12px 25px !important;
    transition: all 0.3s ease !important;
}

.woocommerce .button:hover,
.woocommerce button.button:hover,
.woocommerce a.button:hover {
    background-color: var(--color-umber) !important;
    color: var(--color-cream) !important;
}

.woocommerce .button.alt,
.woocommerce button.button.alt,
.woocommerce a.button.alt {
    background-color: var(--color-umber) !important;
}

.woocommerce .button.alt:hover,
.woocommerce button.button.alt:hover,
.woocommerce a.button.alt:hover {
    background-color: var(--color-ochre) !important;
}

.woocommerce ul.products li.product .price {
    color: var(--color-ochre) !important;
    font-weight: 700;
}

.woocommerce ul.products li.product h2 {
    font-family: var(--font-heading) !important;
    color: var(--color-umber) !important;
}

.woocommerce-message,
.woocommerce-info {
    border-top-color: var(--color-ochre) !important;
}

.woocommerce-message::before,
.woocommerce-info::before {
    color: var(--color-ochre) !important;
}

/* Hide unnecessary WooCommerce elements */
.woocommerce .product_meta,
.woocommerce .woocommerce-product-rating,
.woocommerce-review-link {
    display: none !important;
}

/* ── LEAMARADO DAYS PAGE ── */
.festival-header {
    padding: 120px 0;
    background-color: var(--color-umber);
    color: var(--color-cream);
}

.festival-script {
    display: block;
    font-family: var(--font-script);
    font-size: 3rem;
    color: var(--color-ochre);
    margin-bottom: 20px;
}

.festival-title {
    font-size: 5rem;
    color: var(--color-white);
    text-transform: uppercase;
    letter-spacing: 5px;
}

.festival-intro {
    font-size: 1.4rem;
    max-width: 800px;
    margin: 0 auto;
    opacity: 0.9;
}

.legacy-timeline-grid {
    padding: 120px 0;
}

.legacy-era {
    margin-bottom: 120px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

.legacy-era:last-child {
    margin-bottom: 0;
}

.photo-slot {
    background: #e0d9d0;
    height: 500px;
    border: 15px solid #fff;
    box-shadow: 20px 20px 60px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.photo-slot.rotate-left { transform: rotate(-1deg); }
.photo-slot.rotate-right { transform: rotate(2deg); }

.photo-slot img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.photo-placeholder {
    font-family: var(--font-heading);
    color: var(--color-umber);
    opacity: 0.4;
}

.era-year {
    font-family: var(--font-body);
    font-weight: 900;
    color: var(--color-ochre);
    font-size: 1.2rem;
    letter-spacing: 3px;
}

.era-heading {
    font-size: 3.5rem;
    color: var(--color-umber);
    margin: 20px 0;
}

.era-body {
    font-size: 1.15rem;
    color: var(--color-umber);
    line-height: 1.8;
    margin-bottom: 25px;
}

.legacy-fact {
    padding: 20px;
    border-left: 4px solid var(--color-ochre);
    background: rgba(192, 138, 62, 0.05);
}

.legacy-fact p {
    font-style: italic;
    color: var(--color-umber);
}

/* Ochre background CTA variant (Leamarado page) */
.heritage-cta-ochre {
    background-color: var(--color-ochre) !important;
}

.heritage-cta-ochre h3 {
    color: var(--color-white) !important;
}

.heritage-cta-ochre .btn-primary {
    background: var(--color-umber);
    color: var(--color-cream) !important;
    border-color: var(--color-umber);
}

.heritage-cta-ochre .btn-primary:hover {
    background: var(--color-white);
    color: var(--color-umber) !important;
    border-color: var(--color-white);
}

@media (max-width: 768px) {
    .legacy-era {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .era-heading {
        font-size: 2.2rem;
    }
    .festival-title {
        font-size: 3rem;
    }
    .festival-header {
        padding: 80px 0;
    }
    .legacy-timeline-grid {
        padding: 60px 0;
    }
    .legacy-era {
        margin-bottom: 60px;
    }
}
/* ── CONTACT PAGE ── */
.contact-page {
    padding: 60px 0;
}

.contact-info-section {
    margin: 80px 0;
}

.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin: 60px 0;
}

.contact-card {
    background: var(--color-cream);
    padding: 40px 30px;
    text-align: center;
    border: 2px solid var(--color-ochre);
    border-radius: 4px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
}

.contact-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border-color: var(--color-umber);
}

.contact-icon {
    font-size: 3rem;
    color: var(--color-ochre);
    margin-bottom: 20px;
}

.contact-card h3 {
    color: var(--color-umber);
    margin-bottom: 15px;
    font-size: 1.5rem;
}

.contact-detail {
    color: var(--color-umber);
    font-size: 1rem;
    line-height: 1.6;
}

.contact-detail a {
    color: var(--color-ochre);
    text-decoration: none;
    font-weight: 600;
}

.contact-detail a:hover {
    color: var(--color-umber);
    text-decoration: underline;
}

@media (max-width: 768px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

/* ─────────────────────────────────────────────────────
   HISTORY PAGE TIMELINE STYLING
   ───────────────────────────────────────────────────── */

.history-nav-container {
    background: linear-gradient(135deg, rgba(192, 138, 62, 0.05), rgba(147, 162, 145, 0.05));
    padding: 30px 0;
    border-bottom: 2px solid var(--color-ochre);
    position: sticky;
    top: 0;
    z-index: 90;
}

.history-timeline-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    justify-content: center;
}

.history-timeline-nav .nav-label {
    font-family: var(--font-script);
    color: var(--color-umber);
    font-size: 1.1rem;
    font-weight: 600;
    white-space: nowrap;
}

.history-timeline-nav .nav-buttons {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.history-timeline-nav .nav-btn {
    display: inline-block;
    padding: 10px 18px;
    background: var(--color-cream);
    color: var(--color-umber);
    border: 2px solid var(--color-ochre);
    border-radius: 25px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.history-timeline-nav .nav-btn:hover {
    background: var(--color-ochre);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(192, 138, 62, 0.3);
}

.history-timeline-nav .nav-btn.active {
    background: var(--color-umber);
    color: var(--color-cream);
    border-color: var(--color-umber);
}

/* Timeline Markers */
.timeline-marker {
    position: absolute;
    left: -40px;
    top: 50px;
    display: none;
}

.timeline-marker .timeline-dot {
    width: 16px;
    height: 16px;
    background: var(--color-ochre);
    border: 3px solid var(--color-cream);
    border-radius: 50%;
    position: relative;
    z-index: 10;
    animation: pulse 2s infinite;
}

.timeline-marker .timeline-line {
    position: absolute;
    width: 2px;
    height: 200px;
    background: linear-gradient(180deg, var(--color-ochre), transparent);
    left: 50%;
    top: 16px;
    transform: translateX(-50%);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(192, 138, 62, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(192, 138, 62, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(192, 138, 62, 0);
    }
}

.timeline-label {
    display: inline-block;
    background: var(--color-ochre);
    color: var(--color-white);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    margin-bottom: 15px;
    letter-spacing: 0.5px;
}

/* Timeline on larger screens */
@media (min-width: 1024px) {
    .timeline-marker {
        display: block;
    }
    
    .exhibit-item {
        position: relative;
        padding-left: 40px;
    }
}

@media (max-width: 768px) {
    .history-timeline-nav {
        flex-direction: column;
        gap: 15px;
    }
    
    .history-timeline-nav .nav-buttons {
        justify-content: space-between;
        width: 100%;
    }
    
    .history-timeline-nav .nav-btn {
        flex: 1;
        min-width: 100px;
    }
    
    .timeline-label {
        font-size: 0.8rem;
        padding: 5px 10px;
    }
}

/* ==========================================================================
   PAGE TITLE STYLES (Standard Page Header)
   ========================================================================== */

.highlight-header {
    padding: 100px 0 60px;
    background: linear-gradient(rgba(250, 249, 246, 0.9), rgba(248, 244, 239, 1)), url('images/history/map.jpg');
    background-size: cover;
    background-position: center;
    margin-bottom: 60px;
    border-bottom: 2px solid var(--color-ochre);
}

.highlight-header .entry-title {
    font-size: 4rem;
    color: var(--color-umber);
    margin-bottom: 15px;
    font-weight: 900;
    text-transform: capitalize;
}

.highlight-header .script-accent {
    display: block;
    color: var(--color-ochre);
    font-size: 1.1rem;
    letter-spacing: 2px;
    margin-bottom: 10px;
}

@media (max-width: 768px) {
    .highlight-header {
        padding: 60px 0 40px;
    }
    .highlight-header .entry-title {
        font-size: 2.2rem;
    }
}

/* ==========================================================================
   PUBLIC WORKS SECTION STYLES
   ========================================================================== */

.public-works-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

.public-works-card {
    padding: 30px;
    border-left: 4px solid var(--color-ochre);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.public-works-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 15px rgba(61, 43, 31, 0.1);
}

.public-works-card .service-name {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--color-umber);
}

.public-works-card .service-description {
    margin-bottom: 20px;
    color: var(--color-umber);
    opacity: 0.9;
}

.public-works-card .btn {
    margin-top: 15px;
}

.section-description {
    font-size: 1.1rem;
    color: var(--color-umber);
    opacity: 0.85;
    margin-bottom: 30px;
    max-width: 600px;
}

/* ==========================================================================
   GALLERY PAGE STYLES
   ========================================================================== */

.gallery-page {
    background-color: var(--color-cream);
}

.gallery-year-subtitle {
    font-size: 1.5rem;
    color: var(--color-ochre);
    font-weight: 600;
    margin-top: 10px;
}

.gallery-intro {
    text-align: center;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-intro p {
    font-size: 1.1rem;
    color: var(--color-umber);
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 40px;
    margin-bottom: 80px;
}

.gallery-item {
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(61, 43, 31, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 8px 20px rgba(61, 43, 31, 0.15);
}

.gallery-image-wrapper {
    width: 100%;
    overflow: hidden;
    background-color: #f0ebe5;
    aspect-ratio: 1;
}

.gallery-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.gallery-caption {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--color-umber);
    padding: 20px 20px 10px;
    margin: 0;
}

.gallery-description {
    font-size: 0.95rem;
    color: var(--color-umber);
    opacity: 0.8;
    padding: 0 20px 20px;
    margin: 0;
}

.gallery-empty {
    text-align: center;
    padding: 80px 20px;
}

.gallery-empty .placeholder-text {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .gallery-image-wrapper {
        aspect-ratio: auto;
        min-height: 300px;
    }
}

/* ==========================================================================
   GALLERY HUB PAGE STYLES
   ========================================================================== */

.gallery-hub-page {
    background-color: var(--color-cream);
}

.gallery-hub-intro {
    text-align: center;
    margin-bottom: 60px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.gallery-hub-intro p {
    font-size: 1.1rem;
    color: var(--color-umber);
}

.gallery-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 30px;
    margin-bottom: 80px;
}

.gallery-hub-card {
    display: flex;
    flex-direction: column;
    padding: 25px;
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 2px solid var(--color-ochre);
    border-radius: 4px;
    position: relative;
    overflow: hidden;
    background: var(--color-white);
}

.gallery-hub-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(192, 138, 62, 0.2);
}

.gallery-hub-year {
    font-size: 2rem;
    font-family: var(--font-heading);
    font-weight: 900;
    color: var(--color-umber);
    margin-bottom: 20px;
}

.gallery-hub-preview {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 20px;
    height: 150px;
}

.preview-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
    display: block;
}

.gallery-hub-preview-empty {
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f0e8;
    border-radius: 3px;
    margin-bottom: 20px;
    color: var(--color-umber);
    opacity: 0.6;
}

.gallery-hub-link {
    display: inline-block;
    padding: 12px 24px;
    background-color: var(--color-ochre);
    color: var(--color-white);
    text-decoration: none;
    border-radius: 3px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    align-self: flex-start;
}

.gallery-hub-link:hover {
    background-color: #a8723a;
}

.gallery-hub-empty {
    text-align: center;
    padding: 80px 20px;
}

.gallery-hub-empty .placeholder-text {
    font-size: 1.1rem;
}

@media (max-width: 768px) {
    .gallery-hub-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .gallery-hub-card {
        padding: 20px;
    }

    .gallery-hub-year {
        font-size: 1.6rem;
    }

    .gallery-hub-preview {
        height: 120px;
    }
}

/* ==========================================================================
   MOBILE FRIENDLINESS FIXES
   ========================================================================== */

/* Stop any wide element from causing sideways scroll / clipped content on phones */
html,
body {
    max-width: 100%;
    overflow-x: hidden;
}

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

@media (max-width: 768px) {
    /* Front-page "Town Services": stack the two accordion columns into one */
    .accordion-columns {
        flex-direction: column;
        gap: 20px;
    }

    /* Keep long accordion titles (e.g. "Planning & Zoning") from being clipped */
    .accordion-header {
        padding: 22px 24px;
    }

    .accordion-header .header-text {
        font-size: 1.15rem;
        letter-spacing: 1px;
        overflow-wrap: anywhere;
    }

    .accordion-header .header-icon {
        margin-right: 14px;
    }

    /* Footer script signature was running off the right edge of the screen */
    .footer-seal .script-accent {
        font-size: 2.6rem;
        margin-bottom: -8px;
    }

    /* Top bar: shrink the letterhead so "Est. 1880" stays on screen */
    .top-bar-handcrafted .container {
        flex-wrap: wrap;
        gap: 2px 12px;
    }

    .letterhead-text {
        font-size: 0.65rem;
        letter-spacing: 2px;
    }

    .letterhead-established {
        font-size: 1.1rem;
    }

    /* Let long contact / info text wrap instead of being clipped */
    .contact-detail,
    .contact-card,
    .info-card,
    .town-details .value {
        overflow-wrap: anywhere;
        word-break: break-word;
    }
}

/* ==========================================================================
   MOBILE MENU FIXES (open hamburger dropdown)
   ========================================================================== */
@media (max-width: 768px) {
    /* The dropdown panel: scroll if the menu is tall */
    .main-navigation.toggled ul {
        max-height: 80vh;
        overflow-y: auto;
    }

    /* Links were cream (near-white) on a white panel -> make them dark/readable.
       Uses the .toggled prefix so it outranks the desktop cream rule. */
    .main-navigation.toggled a {
        color: var(--color-umber);
        padding: 14px 20px;
    }

    .main-navigation.toggled a:hover,
    .main-navigation.toggled li:hover > a,
    .main-navigation.toggled li.sub-menu-open > a {
        color: var(--color-ochre);
        background: rgba(192, 138, 62, 0.08);
    }

    /* Sub-menus: collapse inline instead of the desktop floating 550px panel */
    .main-navigation.toggled ul ul,
    .main-navigation.toggled ul ul ul {
        position: static;
        min-width: 0;
        width: 100%;
        box-shadow: none;
        border-top: none;
        background: transparent;
        margin: 0;
        padding: 0 0 0 18px;
        display: block;
        opacity: 1;
        visibility: visible;
        transform: none;
        transition: none;
        max-height: 0;
        overflow: hidden;
    }

    /* Reveal a sub-menu only when its parent is tapped (JS adds .sub-menu-open) */
    .main-navigation.toggled li.sub-menu-open > ul {
        max-height: none;
        overflow: visible;
        padding: 4px 0 10px 18px;
    }

    /* Sub-menu links readable too (incl. 3rd level) */
    .main-navigation.toggled ul ul a {
        color: var(--color-umber);
        padding: 12px 20px;
        opacity: 1;
    }
}
