p {
    line-height: 1.6;
    margin: 0 0 1rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.intro {
    text-align: center;
    padding: 5rem 0 4rem;
}

.intro p {
    max-width: 720px;
    margin: 0 auto 2rem;
    color: var(--text-muted);
    font-size: 1.05rem;
}

.section {
    padding: 4rem 0;
}

.panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 3rem;
}

.three-col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
}

.three-col h3 {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

@media (max-width: 900px) {
    .collection-grid,
    .three-col {
        grid-template-columns: 1fr;
    }

    nav a {
        margin-left: 1rem;
    }
}

/* ===============================
   HERO REFINEMENT
================================ */

.hero-section {
    padding: 2rem 0 3rem;
    text-align: center;
    background: var(--bg-page);
}

.hero-inner {
    max-width: 760px;
    margin: 0 auto;
}

.hero-subtitle {
    margin-top: 1rem;
    font-size: 1.1rem;
    color: var(--text-muted);
}

.foundation-content {
    display: flex;
    align-items: center;
    gap: 40px;
}

.foundation-text {
    flex: 1;
}

.foundation-logo {
    flex: 0 0 auto;
}

.foundation-logo img {
    height: 200px;
    width: auto;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,0.15));
}

/* ===============================
   COLLECTION PANEL
================================ */

.collection-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    max-width: 1200px;
    margin: 1rem auto 3.5rem;
    padding: 2rem;
    box-shadow: var(--shadow-soft);
}

/* --- Top layout --- */

.collection-hero {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    grid-template-rows: auto auto;
    gap: .5rem 2.5rem;
    align-items: start;
}

/* Grid placement */

.collection-header {
    grid-column: 1;
    grid-row: 1;
}

.collection-image {
    grid-column: 1;
    grid-row: 2;
}

.collection-stats-wrapper {
    grid-column: 2;
    grid-row: 1;
}

.latest-acquisition-wrapper {
    grid-column: 2;
    grid-row: 2;
}

.collection-image img {
    width: 100%;
    border-radius: var(--radius-md);
    display: block;
}

/* --- Content --- */

.collection-content h2 {
    font-size: 1.6rem;
    margin-bottom: 0.6rem;
    color: var(--text-strong);
}

.collection-intro {
    font-size: 1rem;
    color: var(--text-default);
    margin-bottom: 1.4rem;
    max-width: 55ch;
}

/* ===============================
   CONNECTED COLLECTION STATS
================================ */

.collection-stats-row {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: nowrap; /* IMPORTANT */
}

.stat-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px; /* prevents collapse */
}

.stat-number {
    font-size: 2rem;
    font-weight: 600;
    color: var(--accent);
    line-height: 1;
}

.stat-label {
    margin-top: 0.4rem;
    font-size: 1rem;
    color: var(--text-muted);
}

/* Mobile fallback */

@media (max-width: 900px) {
    .collection-stats-row {
        flex-wrap: wrap;
        gap: 1.5rem;
    }
}

/* --- Divider --- */

.collection-divider {
    border-top: 1px solid var(--border);
    margin: 1.4rem 0 1.2rem;
}

/* --- Latest Acquisition --- */

.latest-acquisition {
    display: flex;
    gap: 1.2rem;
    align-items: flex-start;
}

.latest-acquisition img {
    width: 95px;
    border-radius: var(--radius-sm);
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    object-fit: cover;
}

.latest-meta h4 {
    margin: 0 0 0.2rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-strong);
}

.latest-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-subtle);
    margin-bottom: 0.6rem;
}

.latest-author {
    margin: 0.15rem 0;
    font-size: 0.9rem;
    color: var(--text-default);
}

.latest-date {
    margin: 0.15rem 0 0.8rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.latest-btn {
    font-size: 0.9rem;
    padding: 0.45rem 0.9rem;
}

.latest-cover-wrapper {
    width: 95px;   /* match your layout */
    height: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.latest-cover-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: var(--radius-sm);
}

@media (max-width: 900px) {
    .collection-hero {
        grid-template-columns: 1fr;
        grid-template-rows: auto;
    }

    .collection-header,
    .collection-image,
    .collection-stats-wrapper,
    .latest-acquisition-wrapper {
        grid-column: 1;
        grid-row: auto;
    }
}

.page-panel {
    max-width: 1100px;
    margin: 3rem auto;
    padding: 2.5rem;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.page-panel h1 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
}

.lead {
    font-size: 1.05rem;
    color: var(--text-default);
    margin-bottom: 2rem;
    max-width: 65ch;
}

blockquote {
    margin: 1rem 0;
    padding-left: 1rem;
    border-left: 3px solid var(--accent);
    font-style: italic;
    color: var(--text-muted);
}

.contact-detail {
    margin: 0.5rem 0 1rem;
}

.section-block {
    margin-top: 2rem;
}

/* ===============================
   FOUNDATION PANEL
================================ */

.about-foundation {
    padding-bottom: .5rem;
}

.foundation-panel {
    max-width: 1200px;
    margin: 2rem 0.5rem;
    padding: 2rem;
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

/* ===============================
   FOUNDATION PILLARS
================================ */

.foundation-pillars {
    padding: 1rem 0 2rem;
}

.pillars-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.pillar {
    padding: 2rem;
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.pillar h3 {
    margin-bottom: 0.6rem;
    font-weight: 600;
}

.pillar p {
    color: var(--text-muted);
}

/* Responsive */

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

/* ===============================
   ON THIS DAY PANEL
================================ */

.on-this-day {
    padding-bottom: .5rem;
}

.on-this-day-panel {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--bg-panel);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.on-this-day-panel h2 {
    margin-bottom: 0.75rem;
}

.on-this-day-panel h3 {
    margin-bottom: 0.5rem;
}

.on-this-day-panel #on-this-day-description {
    margin-top: 0.25rem;
    line-height: 1.5;
}

#on-this-day-meta {
    margin-top: 1rem;
}

.on-this-day-section {
    margin-top: 0.75rem;
}

.on-this-day-divider {
    margin: 1rem 0;
    border-top: 1px solid #e5e7eb;
}

.on-this-day-bottom {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 2rem;
}

.on-this-day-meta {
    flex: 1;
}

.on-this-day-book {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    min-width: 260px;
}

.on-this-day-book-cover img {
    width: 95px;
    height: auto;          /* 👈 key fix */
    object-fit: contain;   /* 👈 safety */
    border-radius: var(--radius-sm);
}

.on-this-day-book-meta h4 {
    margin: 0 0 0.25rem 0;
    font-size: 0.95rem;
}

.on-this-day-featured {
    display: flex;
    flex-direction: column;  /* 👈 THIS is the key */
    align-items: flex-start;
    width: 520px;   /* 👈 match your latest acquisition column */
    flex-shrink: 0;
}

.event-summary {
    font-size: 1rem;
    line-height: 1.5;
    margin-bottom: 1rem;
}

.event-detail {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-muted);

    max-height: 4.5em;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.event-detail.expanded {
    max-height: 500px;
}

.section-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.25rem;
}

.section-content {
    font-size: 0.95rem;
}

.category-link {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
    transition: opacity 0.15s ease;
}

.category-link:hover {
    opacity: 0.75;
}

.person {
    color: var(--text-strong);
}

/* ===============================
   CONTACT PAGE ADDITIONS
================================ */

.contact-image {
    margin-top: 1.2rem;
}

.contact-image img {
    width: 100%;
    max-width: 800px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    display: block;
}

/* ===============================
   CONTACT LOCATION GRID
================================ */

.location-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-top: 1.5rem;
    align-items: start;
}

.location-image img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    display: block;
}

.image-caption {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
}

.location-map {
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
}

.location-map iframe {
    width: 100%;
    height: 100%;
    min-height: 320px;
    border: 0;
}

/* Responsive */

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

/* ===============================
   VISUAL HISTORY SECTION
================================ */

.visual-history {
    margin-top: 2rem;
}

.history-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}

.history-image img {
    width: 100%;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-soft);
    display: block;
}

.history-image figcaption {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 0.5rem;
}

/* Responsive */
@media (max-width: 900px) {
    .history-grid {
        grid-template-columns: 1fr;
    }
}

/* ===============================
   SEARCH PANEL
================================ */

.search-panel {
    max-width: 1200px;
    margin: 0.5rem auto 3.5rem;
    padding: 1.8rem 2rem;
    background: var(--bg-panel);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}

.search-inner h2 {
    margin-bottom: 0.3rem;
}

.search-subtitle {
    color: var(--text-muted);
    margin-bottom: 1.2rem;
    font-size: 0.95rem;
}

.search-form {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.search-input-wrapper {
    position: relative;
    flex: 1;
}

.search-icon {
    position: absolute;
    left: 0.7rem;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: var(--text-muted);
}

.search-panel input.search-input {
    width: 100%;
    padding: 0.65rem 0.7rem 0.65rem 2.2rem;
    font-size: 0.95rem;
}

.search-btn {
    padding: 0.65rem 1.4rem;
}

/* mobile */
@media (max-width: 700px) {
    .search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .search-btn {
        width: 100%;
    }
}