/* =====================================================
   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:140px 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 {
    color: var(--charcoal-light);
    opacity: 0.8;
}



.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);

}

/* =====================================================
   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, 1fr);
    gap:30px;

}


.recent-card {

    background:white;

    border-radius:12px;

    overflow:hidden;

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

    transition:.3s;

}


.recent-card:hover {

    transform:translateY(-6px);

}


.recent-card img {

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

}


.recent-info {

    padding:25px;

}


.recent-info h3 {

    color:var(--burgundy);

    margin-bottom:8px;

}


.recent-info p {

    color:#555;

    margin-bottom:8px;

}


.recent-info span {

    color:#888;

    font-size:.9rem;

}


/* Mobile */

@media(max-width:900px){

    .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); }

.copyright {
    margin-top:50px;
    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:3/2;
    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-bottom:14px;
}

.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){
    .person-modal { aspect-ratio:auto; height:88vh; }

    .person-modal-panel,
    .person-modal.panel-left .person-modal-panel,
    .person-modal.panel-right .person-modal-panel {
        width:100%;
        left:0;
        right:0;
        top:auto;
        bottom:0;
        height:62%;
        padding:26px 22px;
        justify-content:flex-end;
        background:linear-gradient(to top, rgba(0,0,0,.92) 0%, rgba(0,0,0,.8) 60%, rgba(0,0,0,0) 100%);
    }

    .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;
}
