/* McKeesport & Versailles Cemetery — site styles */

:root {
    --color-maroon: #5c1a1a;
    --color-maroon-dark: #3f1010;
    --color-cream: #f7f3ec;
    --color-charcoal: #2b2825;
    --color-stone: #6b6460;
    --color-border: #e0d9cc;
    --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, "Times New Roman", serif;
    --font-sans: "Segoe UI", Helvetica, Arial, sans-serif;
    --max-width: 1080px;
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-charcoal);
    background: var(--color-cream);
}

h1, h2, h3 {
    font-family: var(--font-serif);
    color: var(--color-maroon);
    line-height: 1.25;
}

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

a:hover {
    color: var(--color-maroon-dark);
}

.sr-only {
    position: absolute;
    left: -9999px;
}

/* Header */
.site-header {
    background: var(--color-maroon);
    color: #fff;
    border-bottom: 4px solid var(--color-maroon-dark);
}

.site-header__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.brand {
    display: flex;
    flex-direction: column;
}

.brand__name {
    font-family: var(--font-serif);
    font-size: 1.4rem;
    font-weight: bold;
}

.brand__tagline {
    font-size: 0.8rem;
    opacity: 0.85;
    letter-spacing: 0.03em;
}

.primary-nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
}

.primary-nav a {
    display: block;
    color: #fff;
    text-decoration: none;
    padding: 0.5rem 0.75rem;
    border-radius: 3px;
    font-size: 0.95rem;
}

.primary-nav a:hover,
.primary-nav a.is-active {
    background: rgba(255, 255, 255, 0.15);
}

.nav-toggle {
    display: none;
    background: transparent;
    border: 0;
    width: 36px;
    height: 32px;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    height: 2px;
    background: #fff;
}

/* Main content */
.site-main {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 2rem 1.5rem 3rem;
}

.page-header h1 {
    margin-bottom: 0.25rem;
}

.page-header__subtitle {
    color: var(--color-stone);
    margin-top: 0;
}

.hero {
    position: relative;
    border-radius: 6px;
    overflow: hidden;
    margin-bottom: 2rem;
}

.hero__image {
    width: 100%;
    max-height: 360px;
    object-fit: cover;
    display: block;
}

.hero__text {
    padding: 1.5rem 0 0;
}

.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.card {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
}

.card h2 {
    margin-top: 0;
    font-size: 1.15rem;
}

.quick-links {
    margin-bottom: 2rem;
}

.quick-links__list {
    list-style: none;
    padding: 0;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.75rem;
}

.quick-links__list a {
    display: block;
    background: #fff;
    border: 1px solid var(--color-border);
    border-left: 4px solid var(--color-maroon);
    padding: 0.75rem 1rem;
    text-decoration: none;
    border-radius: 4px;
}

.quick-links__list a:hover {
    background: var(--color-border);
}

.gallery h2 {
    margin-bottom: 1rem;
}

.gallery__grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.gallery__grid img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    border-radius: 4px;
    border: 1px solid var(--color-border);
}

.prose p, .prose ul {
    margin-bottom: 1rem;
}

.prose h2 {
    margin-top: 2rem;
    font-size: 1.25rem;
    border-bottom: 1px solid var(--color-border);
    padding-bottom: 0.35rem;
}

.callout {
    background: #fff;
    border-left: 4px solid var(--color-maroon);
    padding: 0.75rem 1rem;
    border-radius: 4px;
}

.signature {
    text-align: center;
    font-style: italic;
    color: var(--color-stone);
    margin-top: 2rem;
}

.map-view__image {
    max-width: 100%;
    border: 1px solid var(--color-border);
    border-radius: 6px;
}

.resource-list {
    list-style: none;
    padding: 0;
}

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

.contact-list__row {
    display: flex;
    gap: 1rem;
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--color-border);
}

.contact-list__row dt {
    font-weight: bold;
    width: 140px;
    flex-shrink: 0;
}

.contact-list__row dd {
    margin: 0;
}

/* Search */
.search-form {
    background: #fff;
    border: 1px solid var(--color-border);
    border-radius: 6px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.search-form__row {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: end;
}

.search-form label {
    display: flex;
    flex-direction: column;
    font-size: 0.9rem;
    gap: 0.25rem;
}

.search-form input[type="text"] {
    padding: 0.5rem;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    font-size: 1rem;
    min-width: 200px;
}

.search-form button {
    background: var(--color-maroon);
    color: #fff;
    border: 0;
    border-radius: 4px;
    padding: 0.6rem 1.25rem;
    font-size: 1rem;
    cursor: pointer;
}

.search-form button:hover {
    background: var(--color-maroon-dark);
}

.search-form__hint {
    font-size: 0.8rem;
    color: var(--color-stone);
    margin: 0.75rem 0 0;
}

.table-wrap {
    overflow-x: auto;
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

.results-table th, .results-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid var(--color-border);
    text-align: left;
}

.results-table th {
    background: var(--color-maroon);
    color: #fff;
}

.results-table tbody tr:nth-child(odd) {
    background: #fbf7ef;
}

.notice--error {
    color: #7a1f1f;
}

/* Footer */
.site-footer {
    background: var(--color-charcoal);
    color: #cfc9c2;
    font-size: 0.85rem;
}

.site-footer__inner {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 1.25rem 1.5rem;
    text-align: center;
}

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

/* Responsive nav */
@media (max-width: 760px) {
    .nav-toggle {
        display: flex;
    }

    .primary-nav {
        display: none;
        width: 100%;
    }

    .primary-nav.is-open {
        display: block;
    }

    .primary-nav ul {
        flex-direction: column;
    }

    .contact-list__row {
        flex-direction: column;
        gap: 0.1rem;
    }

    .contact-list__row dt {
        width: auto;
    }
}
