/* =====================================================
   InMemoriam2000
   Main Stylesheet
   Version 2
   Part 1 - Foundation & Hero
===================================================== */


/* ---------- COLOR PALETTE ---------- */

:root {

    --charcoal: #303030;
    --charcoal-light: #3b3b3b;
    --cream: #f7f1e6;
    --cream-dark: #e9dfcf;
    --burgundy: #7b2638;
    --burgundy-light: #a4475b;
    --gold: #c7a35b;
    --text-dark: #2b2b2b;
    --text-light: #f5f1e8;

}


/* ---------- RESET ---------- */

* {

    margin: 0;
    padding: 0;
    box-sizing: border-box;

}


html {

    scroll-behavior: smooth;

}


body {

    background: var(--charcoal);
    color: var(--text-dark);
    font-family: Georgia, "Times New Roman", serif;
    line-height: 1.6;

}


img {

    max-width: 100%;
    display: block;

}


a {

    text-decoration: none;
    color: inherit;

}


.container {

    width: 90%;
    max-width: 1200px;
    margin: auto;

}



/* =====================================================
   HERO SECTION
===================================================== */


.hero {

    min-height:760px;

    background:
    linear-gradient(
        rgba(36,36,36,.85),
        rgba(36,36,36,.95)
    ),
    url("images/hero-background.jpg");

    background-size:cover;
    background-position:center;

}


.hero-overlay {

    min-height:760px;
    padding:30px 0;

}



/* ---------- Navigation ---------- */


.top-nav {

    width:90%;
    max-width:1200px;
    margin:auto;

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

}


.logo h1 {

    color:white;
    font-size:2.3rem;
    letter-spacing:1px;

}


.logo span {

    color:var(--gold);

}



.nav-links {

    display:flex;
    list-style:none;
    gap:35px;

}


.nav-links a {

    color:white;
    font-size:1rem;
    transition:.3s;

}


.nav-links a:hover {

    color:var(--gold);

}



/* ---------- Hero Content ---------- */


.hero-content {

    width:90%;
    max-width:850px;
    margin:70px auto 0;

}


.eyebrow {

    color:var(--gold);
    letter-spacing:3px;
    font-size:.85rem;
    margin-bottom:20px;

}



.hero-content h2 {

    color:white;
    font-size:3.5rem;
    line-height:1.15;
    margin-bottom:25px;

}



.hero-text {

    color:#ddd;
    font-size:1.15rem;
    max-width:720px;
    margin-bottom:40px;

}



/* =====================================================
   SEARCH BOX
===================================================== */


.search-panel form {

    display:flex;
    max-width:700px;

}


.search-panel input {

    flex:1;
    padding:17px 20px;

    background:var(--cream);
    color:var(--text-dark);
    border:none;
    border-radius:
    8px 0 0 8px;

    font-size:1rem;

}

.search-panel input::placeholder,
.advanced-form input::placeholder,
.smart-row input::placeholder {
    color: #b3a68f;
    opacity: 1;
    font-style: italic;
}

.search-hint {
    margin-top: 12px;
    font-size: 0.92rem;
    font-style: italic;
    color: var(--cream);
    opacity: 0.85;
}



.search-panel button {

    background:var(--burgundy);
    color:white;

    border:none;
    padding:0 35px;

    font-size:1rem;
    cursor:pointer;

    border-radius:
    0 8px 8px 0;

    transition:.3s;

}


.search-panel button:hover {

    background:var(--burgundy-light);

}

.advanced-link {
    display:inline-block;
    margin-top:14px;
    color:var(--gold);
    font-size:0.95rem;
    letter-spacing:0.03em;
    text-decoration:none;
    border-bottom:1px solid transparent;
    transition:color .3s, border-color .3s;
}

.advanced-link:hover {
    color:var(--cream);
    border-bottom-color:var(--cream);
}

/* =====================================================
   MAIN CONTENT SECTIONS
===================================================== */

.remembering,
.collections,
.recent {

    background: var(--cream);
    padding: 80px 0;

}


.statistics {

    background: var(--charcoal-light);
    padding: 60px 0;

}


/* Section headings */

.section-heading {

    text-align:center;
    max-width:800px;
    margin:0 auto 45px;

}


.section-heading h2 {

    color:var(--burgundy);
    font-size:2.4rem;
    margin-bottom:15px;

}


.section-heading p {

    color:#555;
    font-size:1.1rem;

}


/* Remembering Today Card */

.featured-card {

    background:white;
    display:flex;
    border-radius:12px;
    overflow:hidden;
    box-shadow:0 10px 30px rgba(0,0,0,.15);

}


.featured-image {

    width:40%;

}


.featured-image img {

    width:100%;
    height:100%;
    object-fit:cover;

}


.featured-content {

    width:60%;
    padding:45px;

}


.featured-content h3 {

    color:var(--burgundy);
    font-size:2rem;

}


.occupation {

    color:#777;
    font-style:italic;
    margin-bottom:20px;

}


/* Buttons */

.button {

    display:inline-block;
    margin-top:20px;

    background:var(--burgundy);
    color:white;

    padding:12px 25px;
    border-radius:6px;

}


.button:hover {

    background:var(--burgundy-light);

}

/* =====================================================
   FEATURED COLLECTIONS
===================================================== */


.collections {

    background:var(--charcoal);
    padding:80px 0;

}


.collections .section-heading h2 {

    color:var(--gold);

}


.collections .section-heading p {

    color:#ddd;

}



/* Collection Grid */

.collection-grid {

    display:grid;

    grid-template-columns:repeat(4, 1fr);

    gap:25px;

}



/* Collection Cards */

.collection-card {

    background:var(--cream);

    padding:35px 25px;

    text-align:center;

    border-radius:12px;

    min-height:240px;

    display:flex;

    flex-direction:column;

    justify-content:center;

    align-items:center;

    box-shadow:
    0 8px 20px rgba(0,0,0,.25);

    transition:
    transform .3s ease,
    box-shadow .3s ease;

}



.collection-card:hover {

    transform:translateY(-8px);

    box-shadow:
    0 15px 30px rgba(0,0,0,.35);

}



/* Icons */

.collection-card .icon {

    font-size:3.2rem;

    margin-bottom:18px;

    display:block;

}



/* Titles */

.collection-card h3 {

    color:var(--burgundy);

    font-size:1.35rem;

    margin-bottom:12px;

}



/* Description */

.collection-card p {

    color:#555;

    font-family:Arial, Helvetica, sans-serif;

    font-size:.95rem;

    line-height:1.5;

}



/* Responsive */

@media(max-width:1000px){

    .collection-grid {

        grid-template-columns:repeat(2,1fr);

    }

}


@media(max-width:600px){

    .collection-grid {

        grid-template-columns:1fr;

    }

}

/* =====================================================
   FIXES AFTER COLLECTION SECTION
===================================================== */


/* Keep hero search full size */

.hero .search-panel {

    max-width:760px;

}


.hero .search-panel form {

    width:100%;

}


/* Restore Remembering Today layout */

.remembering .featured-card {

    display:flex;
    background:white;
    min-height:350px;

}


.remembering .featured-image {

    flex:0 0 40%;

}


.remembering .featured-content {

    flex:1;

}


/* Prevent collection styles affecting other cards */

.collections .collection-card {

    display:flex;

}

/* =====================================================
   RECENT ADDITIONS
===================================================== */

.recent {

    background:var(--cream);
    padding:80px 0;

}


.recent-grid {

    display:grid;
    grid-template-columns:repeat(3, minmax(0, 1fr));
    gap:8px;

}

.recent-person {
    display:block;
    min-width:0;
    padding:8px 12px;
    border:1px solid var(--gold);
    background:white;
    color:#555;
    text-decoration:none;
    transition:transform .2s, box-shadow .2s;
}

.recent-person:hover,
.recent-person:focus-visible {
    transform:translateY(-3px);
    box-shadow:0 6px 16px rgba(0,0,0,.12);
}

.recent-person-main {
    display:block;
    line-height:1.35;
}

.recent-person-main strong {
    color:var(--burgundy);
}

/* Both text spans already start their own lines; the extra break adds a blank line. */
.recent-person > br {
    display:none;
}

.recent-person-date {
    display:block;
    margin-top:2px;
    line-height:1.3;
    color:#777;
    font-size:.9rem;
}


/* Mobile */

@media(max-width:900px){

    .recent-grid {
        grid-template-columns:repeat(2, minmax(0, 1fr));

    }

}

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

/* =====================================================
   ADDED: statistics grid, footer, search results
   (structural only - same palette, no redesign)
===================================================== */

.stats-grid {
    display:grid;
    grid-template-columns:repeat(4,1fr);
    gap:25px;
    text-align:center;
}

.stat-card h3 {
    color:var(--gold);
    font-size:2.4rem;
    margin-bottom:8px;
}

.stat-card p {
    color:#ddd;
    font-size:1rem;
}

@media(max-width:900px){
    .stats-grid { grid-template-columns:repeat(2,1fr); }
}

footer {
    background:var(--charcoal);
    color:var(--text-light);
    padding:60px 0 0;
}

.footer-content {
    display:grid;
    grid-template-columns:2fr 1fr 1fr;
    gap:40px;
}

.footer-content h2 { color:var(--gold); margin-bottom:12px; }
.footer-content h4 { color:var(--gold); margin-bottom:12px; }
.footer-content p { color:#ccc; }
.footer-content ul { list-style:none; }
.footer-content li { margin-bottom:8px; }
.footer-content a:hover { color:var(--gold); }

.archive-note {
    margin-top:50px;
    padding:0 20px;
    text-align:center;
    color:var(--cream-dark);
    font-style:italic;
    font-size:1.05rem;
    letter-spacing:.02em;
    line-height:1.6;
}
.copyright {
    margin-top:18px;
    padding:22px 0;
    text-align:center;
    color:#999;
    font-size:.9rem;
    border-top:1px solid rgba(255,255,255,.12);
}

@media(max-width:900px){
    .footer-content { grid-template-columns:1fr; }
}

/* Search results */

.results {
    background:var(--cream);
    padding:80px 0;
}

.results-meta {
    text-align:center;
    color:#555;
    margin-bottom:30px;
}

.clear-search {
    background:none;
    border:none;
    color:var(--burgundy);
    cursor:pointer;
    font-family:inherit;
    font-size:1rem;
    text-decoration:underline;
    margin-left:10px;
}

.results-grid {
    display:grid;
    grid-template-columns:repeat(3,1fr);
    gap:30px;
}

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

.recent-card audio { width:100%; margin-top:12px; }

.recent-card .bio {
    color:#555;
    font-size:.95rem;
    margin-bottom:10px;
}

.nav-links button {
    background:none;
    border:none;
    color:white;
    font-family:inherit;
    font-size:1rem;
    cursor:pointer;
    transition:.3s;
}

.nav-links button:hover { color:var(--gold); }

.collection-card { cursor:pointer; border:none; font-family:inherit; }

@media(max-width:900px){
    .hero-content h2 { font-size:2.4rem; }
    .featured-card, .remembering .featured-card { flex-direction:column; }
    .featured-image, .remembering .featured-image { width:100%; }
    .featured-content { width:100%; padding:30px; }
    .top-nav { flex-direction:column; gap:18px; }
    .nav-links { flex-wrap:wrap; justify-content:center; gap:20px; }
}

.match-trace {
    margin-top:14px;
    padding-top:12px;
    border-top:1px solid #e5e0d6;
}

.match-trace h4 {
    font-family:'Inter',sans-serif;
    font-size:.72rem;
    letter-spacing:1.5px;
    text-transform:uppercase;
    color:var(--burgundy);
    margin-bottom:8px;
}

.match-trace ul { list-style:none; display:flex; flex-direction:column; gap:8px; }

.match-trace li {
    display:flex;
    flex-wrap:wrap;
    align-items:baseline;
    gap:8px;
    font-size:.85rem;
    color:#555;
}

.match-term {
    font-weight:600;
    color:var(--charcoal);
}

.match-column {
    font-size:.68rem;
    letter-spacing:1px;
    text-transform:uppercase;
    color:var(--charcoal);
    background:var(--cream);
    border:1px solid #e5e0d6;
    border-radius:3px;
    padding:2px 6px;
}

.match-phrase {
    flex:1 1 100%;
    font-style:italic;
    color:#666;
}

/* Collection result list */

.collection-list {
    list-style:none;
    max-width:800px;
    margin:0 auto;
    display:flex;
    flex-direction:column;
    gap:10px;
}

.collection-list li {
    display:flex;
    justify-content:space-between;
    align-items:center;
    background:white;
    padding:14px 20px;
    border-radius:6px;
    box-shadow:0 2px 8px rgba(0,0,0,.08);
}

.collection-name {
    background:none;
    border:none;
    font-family:inherit;
    font-size:1.1rem;
    color:var(--burgundy);
    cursor:pointer;
    text-align:left;
    padding:0;
}

.collection-name:hover {
    text-decoration:underline;
}

.collection-date {
    color:#555;
    font-size:.95rem;
    white-space:nowrap;
    margin-left:16px;
}

@media(max-width:600px){
    .collection-list li {
        flex-direction:column;
        align-items:flex-start;
        gap:4px;
    }

    .collection-date {
        margin-left:0;
    }
}

/* Person modal — photo fills the frame, info panel sits on the darker side */

.person-modal-backdrop {
    position:fixed;
    inset:0;
    background:rgba(0,0,0,.78);
    display:flex;
    align-items:center;
    justify-content:center;
    padding:24px;
    z-index:1000;
    animation:modalFade .25s ease;
}

@keyframes modalFade { from { opacity:0 } to { opacity:1 } }

.person-modal {
    position:relative;
    width:min(1000px,100%);
    max-height:90vh;
    aspect-ratio:16/9;
    overflow:hidden;
    border-radius:8px;
    box-shadow:0 30px 70px rgba(0,0,0,.6);
    background:var(--charcoal, #2b2b2b);
}

.person-modal-photo {
    position:absolute;
    inset:0;
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

.person-modal-close {
    position:absolute;
    top:12px;
    right:16px;
    z-index:3;
    background:rgba(0,0,0,.45);
    color:#fff;
    border:1px solid rgba(255,255,255,.35);
    border-radius:50%;
    width:38px;
    height:38px;
    font-size:1.5rem;
    line-height:1;
    cursor:pointer;
}

.person-modal-close:hover { background:rgba(0,0,0,.75); }

.person-modal-panel {
    position:absolute;
    top:0;
    bottom:0;
    width:44%;
    z-index:2;
    padding:44px 38px;
    overflow-y:auto;
    color:#f4efe6;
    display:flex;
    flex-direction:column;
    justify-content:center;
}

.person-modal.panel-left .person-modal-panel {
    left:0;
    background:linear-gradient(to right, rgba(0,0,0,.88) 0%, rgba(0,0,0,.78) 70%, rgba(0,0,0,0) 100%);
}

.person-modal.panel-right .person-modal-panel {
    right:0;
    background:linear-gradient(to left, rgba(0,0,0,.88) 0%, rgba(0,0,0,.78) 70%, rgba(0,0,0,0) 100%);
}

.person-modal-panel h3 {
    font-family:'Cormorant Garamond', Georgia, serif;
    font-size:2.3rem;
    color:#fff;
    margin:6px 0 4px;
    line-height:1.1;
}

.person-modal-panel .featured-date {
    color:var(--gold, #c8a24a);
    letter-spacing:.12em;
    text-transform:uppercase;
    font-size:.78rem;
}

.person-modal-panel .occupation {
    color:var(--gold, #c8a24a);
    font-style:italic;
    margin-bottom:10px;
}

.person-modal-meta {
    font-size:.85rem;
    color:rgba(244,239,230,.75);
    margin-top:18px;
    margin-bottom:0;
}

.person-modal-bio {
    font-size:.95rem;
    line-height:1.65;
    color:rgba(244,239,230,.92);
}

.person-modal-panel audio { margin-top:18px; width:100%; }

@media(max-width:760px){
    /* Phones: no photo — just the memorial text on a dark card. */
    .person-modal-backdrop { align-items:flex-start; padding:12px; }
    .person-modal, .person-modal.panel-left, .person-modal.panel-right { aspect-ratio:auto !important; height:auto !important; max-height:88vh; overflow-y:auto; -webkit-overflow-scrolling:touch; background:#111; }
    .person-modal .person-modal-photo { display:none !important; }
    .person-modal-panel,
    .person-modal.panel-left .person-modal-panel,
    .person-modal.panel-right .person-modal-panel {
        position:relative !important; inset:auto !important; width:100% !important; height:auto !important; overflow:visible;
        padding:52px 20px 24px; justify-content:flex-start; background:#111;
    }
    .person-modal-panel h3 { font-size:1.7rem; }
}

/* Single-line result rows with linked names */
.collection-list li {
    display:block;
}

a.collection-name {
    display:block;
    text-decoration:none;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

a.collection-name:hover {
    text-decoration:underline;
}

/* Combined search: field selector + input */
.search-panel select {
    padding: 17px 14px;
    background: var(--cream);
    color: var(--text-dark);
    border: none;
    border-right: 1px solid rgba(0,0,0,.12);
    border-radius: 8px 0 0 8px;
    font-size: 1rem;
    font-family: inherit;
    cursor: pointer;
    max-width: 180px;
}

.search-panel select + input {
    border-radius: 0;
}

@media (max-width: 640px) {
    .search-panel form {
        flex-wrap: wrap;
    }
    .search-panel select {
        flex: 1 1 100%;
        max-width: none;
        border-right: none;
        border-radius: 8px 8px 0 0;
    }
    .search-panel select + input {
        border-radius: 0 0 0 8px;
    }
}


/* Two-line result rows + pager */
a.collection-name {
    white-space:normal;
    overflow:visible;
    text-overflow:clip;
}

.result-line1,
.result-line2 {
    display:block;
    white-space:nowrap;
    overflow:hidden;
    text-overflow:ellipsis;
}

.result-line1 strong { font-weight:700; }

.result-line2 {
    color:#555;
    font-size:.95rem;
    margin-top:3px;
}

.results-pager {
    display:flex;
    align-items:center;
    justify-content:center;
    flex-wrap:wrap;
    gap:8px;
    margin:34px auto 0;
    padding:10px 12px;
    width:max-content;
    max-width:100%;
    background:#fdfaf3;
    border:1px solid rgba(43,43,43,.12);
    border-radius:999px;
    box-shadow:0 8px 24px rgba(0,0,0,.08);
}

.results-pager .pager-btn {
    appearance:none;
    border:1px solid rgba(43,43,43,.14);
    background:#fff;
    color:#2b2b2b;
    font-family:inherit;
    font-size:.9rem;
    font-weight:600;
    letter-spacing:.02em;
    padding:9px 16px;
    border-radius:999px;
    cursor:pointer;
    transition:background .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.results-pager .pager-btn:hover:not([disabled]) {
    background:#8b7355;
    border-color:#8b7355;
    color:#fdfaf3;
    transform:translateY(-1px);
    box-shadow:0 6px 14px rgba(139,115,85,.28);
}

.results-pager .pager-btn:focus-visible {
    outline:2px solid #8b7355;
    outline-offset:2px;
}

.results-pager .pager-btn[disabled] {
    opacity:.35;
    cursor:default;
}

.results-pager .pager-edge { padding:9px 13px; }

.pager-status {
    color:#5a5145;
    font-size:.9rem;
    font-weight:600;
    letter-spacing:.04em;
    text-transform:uppercase;
    padding:0 10px;
    white-space:nowrap;
}

@media (max-width:600px) {
    .results-pager { border-radius:20px; gap:6px; }
    .results-pager .pager-btn { padding:8px 12px; font-size:.82rem; }
    .pager-status { width:100%; text-align:center; order:-1; }
}


/* ---------- Administrator pages ---------- */
.admin-shell {
    min-height:100vh;
    padding:40px 20px;
    background:#2b2b2b;
    display:flex;
    flex-direction:column;
    align-items:center;
    gap:20px;
    font-family:Georgia, 'Times New Roman', serif;
}

.admin-card {
    width:100%;
    max-width:760px;
    background:#f5efe0;
    border:1px solid #c9bfa5;
    border-radius:6px;
    padding:28px;
    box-shadow:0 8px 28px rgba(0,0,0,.35);
}

.admin-wide .admin-card,
.admin-topbar { max-width:1040px; }

.admin-auth { max-width:420px; text-align:center; }

.admin-shell h1 {
    font-size:1.7rem;
    color:#f5efe0;
    margin:0;
}

.admin-auth h1 { color:#3a2f1b; }
.admin-shell h1 span { color:#b8985a; }

.admin-shell h2 {
    font-size:1.15rem;
    color:#3a2f1b;
    margin:14px 0 18px;
}

.admin-topbar {
    width:100%;
    display:flex;
    flex-wrap:wrap;
    align-items:center;
    justify-content:space-between;
    gap:14px;
}

.admin-form { display:flex; flex-direction:column; gap:14px; text-align:left; }

.admin-form label {
    display:flex;
    flex-direction:column;
    gap:6px;
    font-size:.9rem;
    color:#3a2f1b;
}

.admin-form input,
.admin-form textarea,
.admin-form select,
.admin-toolbar input {
    background:#fffaf0;
    color:#2b2b2b;
    border:1px solid #b9ac8d;
    border-radius:4px;
    padding:9px 11px;
    font-family:inherit;
    font-size:1rem;
}

.admin-grid {
    display:grid;
    grid-template-columns:repeat(2, minmax(0,1fr));
    gap:14px;
    margin:20px 0 26px;
    padding:20px;
    background:#efe6d2;
    border:1px solid #c9bfa5;
    border-radius:5px;
}

.admin-grid h2 { grid-column:1 / -1; margin:0; }
.admin-span { grid-column:1 / -1; }

.admin-actions { display:flex; align-items:center; gap:12px; flex-wrap:wrap; }

.admin-primary {
    background:#7a5c2e;
    color:#f9f4e6;
    border:none;
    border-radius:4px;
    padding:10px 18px;
    font-family:inherit;
    font-size:.95rem;
    cursor:pointer;
}

.admin-primary:hover { background:#8f6c36; }
.admin-primary[disabled] { opacity:.5; cursor:default; }

.admin-link {
    background:none;
    border:none;
    color:#7a5c2e;
    font-family:inherit;
    font-size:.95rem;
    cursor:pointer;
    text-decoration:underline;
}

.admin-topbar .admin-link { color:#e6d6ae; }

.admin-danger {
    background:none;
    border:none;
    color:#8b2f2f;
    font-family:inherit;
    font-size:.95rem;
    cursor:pointer;
    text-decoration:underline;
}

.admin-message {
    background:#efe6d2;
    border-left:4px solid #b8985a;
    padding:10px 14px;
    color:#3a2f1b;
    font-size:.95rem;
    margin:14px 0;
}

.admin-hint { color:#4a4030; font-size:.95rem; margin:0 0 18px; }

.admin-toolbar { display:flex; flex-wrap:wrap; gap:12px; align-items:center; }
.admin-toolbar input { flex:1 1 260px; }

.admin-list { list-style:none; margin:22px 0 0; padding:0; }

.admin-list li {
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:16px;
    padding:10px 0;
    border-bottom:1px solid #ddd2b6;
}

.admin-list-text { min-width:0; }
.admin-row-actions { display:flex; gap:12px; flex:0 0 auto; }

@media (max-width:640px) {
    .admin-grid { grid-template-columns:1fr; }
    .admin-list li { flex-direction:column; align-items:flex-start; }
}

.audio-badge {
    margin-left:8px;
    font-size:.85em;
    opacity:.85;
}

/* ---------- Name type-ahead ---------- */
.search-typeahead {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
}
.search-typeahead input {
    width: 100%;
}
.search-suggestions {
    position: absolute;
    top: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 40;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #f4efe6;
    border: 1px solid rgba(20, 18, 15, .15);
    border-radius: 12px;
    box-shadow: 0 18px 40px rgba(0, 0, 0, .35);
    max-height: 300px;
    overflow-y: auto;
}
.search-suggestions li {
    margin: 0;
}
.search-suggestions button {
    display: block;
    width: 100%;
    text-align: left;
    background: transparent;
    border: 0;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: .9rem;
    color: #1c1a17;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.search-suggestions button span {
    color: rgba(28, 26, 23, .65);
}
.search-suggestions button:hover,
.search-suggestions button.is-active {
    background: rgba(28, 26, 23, .1);
}

.search-suggestions li.suggest-more {
    border-top: 1px solid rgba(20, 18, 15, .15);
    margin-top: 4px;
    padding-top: 4px;
}
.search-suggestions li.suggest-more button {
    font-size: .8rem;
    font-style: italic;
    color: rgba(28, 26, 23, .7);
}

.sort-order {
    margin-left:10px;
    color:#555;
    font-family:inherit;
    font-size:0.95rem;
}

.sort-order select {
    margin-left:6px;
    background:var(--cream, #f6efe2);
    color:#2b2b2b;
    border:1px solid rgba(0,0,0,0.2);
    border-radius:999px;
    padding:4px 10px;
    font-family:inherit;
    font-size:0.95rem;
    cursor:pointer;
}

/* Quote of the day band */
.quote-band {
    background: var(--burgundy, #7b2638);
    padding: 18px 0;
    text-align: center;
}
.quote-band-text {
    color: var(--gold, #c7a35b);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.15rem;
    font-style: italic;
    line-height: 1.5;
    max-width: 820px;
    margin: 0 auto;
    border: 0;
}
@media (max-width: 600px) {
    .quote-band-text { font-size: 1.15rem; }
}
.quote-band-credit {
    color: var(--gold, #c7a35b);
    font-family: Georgia, "Times New Roman", serif;
    font-size: 0.9rem;
    letter-spacing: 0.04em;
    opacity: 0.85;
    margin: 6px auto 0;
    max-width: 820px;
}

/* Featured Collections page */
.hero.hero-compact {
  min-height: auto;
}
.hero.hero-compact .hero-content {
  padding-bottom: 40px;
}
.back-home {
  padding: 32px 0 48px;
  text-align: center;
}
.back-home .button {
  display: inline-block;
  text-decoration: none;
}

/* Tighter top spacing for Remembering Today */
.remembering { padding-top:40px; }

/* Quick category re-assignment in the admin list */
.admin-row-category {
    display:flex;
    align-items:center;
    gap:8px;
    margin-top:6px;
    font-size:.8rem;
    color:#4a4030;
}

.admin-row-category select {
    background:#fffaf0;
    color:#2b2b2b;
    border:1px solid #b9ac8d;
    border-radius:4px;
    padding:4px 8px;
    font-family:inherit;
    font-size:.85rem;
}

/* ---------- Collections page: single lighter-gray background, no footer ---------- */
.collections-page {
    background: #262626;
    min-height: 100vh;
}

.collections-page .collections,
.collections-page .results,
.collections-page .back-home {
    background: #262626;
}

.collections-page .results .section-heading h2 {
    color: var(--gold);
}

.collections-page .results .section-heading p,
.collections-page .results-meta,
.collections-page .sort-order {
    color: #ddd;
}

.collections-page .clear-search {
    color: var(--gold);
}

/* Collections page: flat lighter-gray banner, tighter gap to categories */
.collections-page .hero {
    background: #262626;
    min-height: auto;
}
.collections-page .hero-overlay {
    min-height: auto;
    padding-bottom: 0;
}
.collections-page .hero-content {
    margin-top: 0;
    padding-bottom: 0;
}
.collections-page .hero-content .hero-text {
    margin-bottom: 0;
}
.collections-page .collections {
    padding-top: 28px;
}

/* ---------- Advanced search page: darker charcoal ---------- */
.advanced-page,
.collections-page .advanced-page .collections,
.collections-page .advanced-page .results,
.collections-page .advanced-page .back-home {
    background: #262626;
}
.advanced-page .hero,
.advanced-page .back-home {
    background: #262626;
}
.advanced-page .advanced-search {
    background: #262626;
    padding: 10px 0 30px;
}
.advanced-form {
    background: rgba(0,0,0,.18);
    border: 1px solid rgba(201,169,110,.35);
    border-radius: 14px;
    padding: 22px;
}
.advanced-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px 18px;
}
.advanced-form label {
    display: flex;
    flex-direction: column;
    gap: 6px;
    color: var(--gold);
    font-size: .78rem;
    letter-spacing: .08em;
    text-transform: uppercase;
}
.advanced-form input,
.advanced-form select {
    background: #f6f1e4;
    border: 1px solid rgba(0,0,0,.18);
    border-radius: 8px;
    padding: 10px 12px;
    font-family: inherit;
    font-size: .95rem;
    color: #2b2b2b;
    text-transform: none;
    letter-spacing: normal;
}
.advanced-form input:focus,
.advanced-form select:focus {
    outline: 2px solid var(--gold);
    outline-offset: 1px;
}
.advanced-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
    flex-wrap: wrap;
}
.advanced-actions .button-ghost {
    background: transparent;
    border: 1px solid var(--gold);
    color: var(--gold);
}
@media (max-width: 900px) {
    .advanced-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
    .advanced-grid { grid-template-columns: 1fr; }
}

/* ---------- About page: darker charcoal ---------- */
.about-page,
.collections-page .about-page .collections,
.collections-page .about-page .results,
.collections-page .about-page .back-home {
    background: #262626;
}
.about-page .hero {
    background: #262626;
    min-height: auto;
}
.about-page .hero-overlay {
    min-height: auto;
    padding-bottom: 0;
}
.about-page .hero-content {
    margin-top: 0;
    padding-bottom: 0;
}
.about-page .hero-content .hero-text {
    margin-bottom: 0;
}
.about-content {
    background: #262626;
    padding: 36px 0 8px;
}
.about-article {
    max-width: 760px;
    margin: 0 auto;
}
.about-article h2 {
    color: var(--gold);
    font-size: 2.2rem;
    margin-bottom: 22px;
}
.about-article p {
    color: #e8e2d4;
    line-height: 1.75;
    margin-bottom: 16px;
}
.about-article strong {
    color: var(--cream);
}
.about-signature {
    margin-top: 30px;
    color: var(--cream);
}
.about-signature .about-role {
    color: #ddd;
    font-style: italic;
}
.about-quote {
    margin-top: 34px;
    font-size: 0.82rem;
    font-style: italic;
    color: #b9b2a2;
}
.about-page .back-home {
    background: #262626;
}

/* Remembering Today date picker */
.date-picker-row { display:flex; gap:10px; justify-content:center; align-items:center; flex-wrap:wrap; margin-top:14px; font-size:0.95rem; color:inherit; }
.date-picker-row select { background:var(--cream); color:#222; border:1px solid var(--gold); border-radius:6px; padding:6px 10px; font:inherit; }
.date-picker-reset { background:none; border:none; color:var(--gold); cursor:pointer; font:inherit; text-decoration:underline; padding:0; }
.date-picker-count { margin-top:10px; font-size:0.9rem; }

/* Memorial card carousel + share link */
.person-modal-navrow { display:flex; justify-content:center; align-items:center; gap:30px; margin-top:18px; padding-top:14px; border-top:1px solid rgba(255,255,255,0.08); }
.person-modal-nav { width:44px; height:44px; border-radius:50%; border:1px solid rgba(201,169,110,0.35); background:transparent; color:var(--gold); font-size:1.7rem; line-height:1; cursor:pointer; display:flex; align-items:center; justify-content:center; padding:0 0 4px; transition:border-color 0.3s, background 0.3s, transform 0.3s; }
.person-modal-nav:hover { border-color:var(--gold); background:rgba(201,169,110,0.12); }
.person-modal-nav.prev:hover { transform:translateX(-2px); }
.person-modal-nav.next:hover { transform:translateX(2px); }
.person-modal-tools { display:flex; flex-wrap:wrap; gap:12px; align-items:center; margin-top:16px; font-size:0.85rem; }
.person-modal-share { background:none; border:1px solid var(--gold); color:var(--gold); border-radius:6px; padding:6px 12px; cursor:pointer; font:inherit; }
.person-modal-share:hover { background:var(--gold); color:#222; }
.person-modal-count { opacity:0.75; }

/* ---- Plain-English smart search ---- */
.smart-search {
    background: rgba(0,0,0,.18);
    border: 1px solid rgba(201,169,110,.55);
    border-radius: 14px;
    padding: 22px;
    margin-bottom: 14px;
}
.smart-label { display:block; color: var(--gold); font-family: "Cormorant Garamond", serif; font-size: 1.5rem; margin-bottom: 10px; }
.smart-row { display:flex; gap:10px; }
.smart-row input {
    flex:1; min-width:0; padding: 14px 16px; border-radius: 10px;
    border: 1px solid var(--cream-dark); background: var(--cream); color: var(--text-dark); font-size: 1.05rem;
}
.smart-examples { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:12px; color: var(--text-light); opacity:.9; font-size:.9rem; }
.smart-examples button {
    background: transparent; color: var(--cream); border: 1px solid rgba(201,169,110,.45);
    border-radius: 999px; padding: 5px 12px; font-size: .85rem; cursor: pointer;
}
.smart-examples button:hover { border-color: var(--gold); color: var(--gold); }
.smart-badges { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-top:14px; }
.smart-understood { color: var(--text-light); font-size:.9rem; }
.smart-badge { background: var(--burgundy); color: var(--text-light); border: 1px solid var(--gold); border-radius: 999px; padding: 5px 12px; font-size: .88rem; }
.smart-divider { text-align:center; color: var(--text-light); opacity:.7; font-size:.9rem; margin: 6px 0 14px; }
@media (max-width: 640px) { .smart-row { flex-direction: column; } }


/* Pure dissolve: keep the backdrop steady while the memorial changes. */
.person-modal { transition: opacity 200ms ease-in-out; }
.person-modal.memorial-dissolve-out { opacity: 0; }
.person-modal.memorial-dissolve-in { animation: memorialDissolveIn 300ms ease-in-out both; }
@keyframes memorialDissolveIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .person-modal, .person-modal-backdrop { transition: none; animation: none; }
  .person-modal.memorial-dissolve-in { animation: none; }
}
