/* Background Section Styles */

/* Page header */
.background-header {
    background-color: white;
    border-bottom: 2px solid var(--burgundy);
    padding: 2rem 0 1.5rem;
}

[data-bs-theme="dark"] .background-header {
    background-color: #232729;
}

.background-header h2 {
    color: var(--burgundy);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.background-header .lead {
    color: var(--text-light);
}

/* Sub-navigation breadcrumb */
.essay-subnav {
    background-color: rgba(139, 35, 50, 0.03);
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-size: 0.9rem;
}

[data-bs-theme="dark"] .essay-subnav {
    background-color: rgba(139, 35, 50, 0.08);
    border-bottom-color: rgba(255, 255, 255, 0.05);
}

.essay-subnav .breadcrumb {
    margin-bottom: 0;
}

.essay-subnav .breadcrumb-item a {
    color: var(--burgundy);
    text-decoration: none;
}

.essay-subnav .breadcrumb-item a:hover {
    color: var(--dark-burgundy);
    text-decoration: underline;
}

/* Essay content styling */
.essay-content {
    font-size: 1.05rem;
    line-height: 1.85;
}

.essay-content h3 {
    color: var(--burgundy);
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
}

.essay-content h4 {
    color: var(--burgundy);
    margin-top: 2rem;
    margin-bottom: 0.75rem;
}

.essay-content blockquote {
    border-left: 4px solid var(--burgundy);
    padding-left: 1rem;
    margin: 1.5rem 0;
    color: var(--text-light);
    font-style: italic;
}

/* Hub page topic cards */
.topic-card {
    border: 2px solid rgba(139, 35, 50, 0.15);
    border-radius: 8px;
    transition: all 0.3s ease;
    height: 100%;
    background-color: white;
}

.topic-card:hover {
    border-color: var(--burgundy);
    box-shadow: 0 6px 20px rgba(139, 35, 50, 0.15);
    transform: translateY(-4px);
}

[data-bs-theme="dark"] .topic-card {
    border-color: #404040;
    background-color: #232729;
}

[data-bs-theme="dark"] .topic-card:hover {
    border-color: var(--burgundy);
    box-shadow: 0 6px 20px rgba(168, 53, 69, 0.2);
}

.topic-card h3 {
    color: var(--burgundy);
    font-size: 1.25rem;
    font-weight: 600;
}

.topic-card p {
    color: var(--text-light);
    font-size: 0.95rem;
}

.topic-card .btn-outline-primary {
    color: var(--burgundy);
    border-color: var(--burgundy);
}

.topic-card .btn-outline-primary:hover {
    background-color: var(--burgundy);
    border-color: var(--burgundy);
    color: white;
}

/* Borough cards (Local Government overview) */
.borough-card {
    border: 2px solid rgba(139, 35, 50, 0.15);
    border-radius: 8px;
    transition: all 0.3s ease;
    height: 100%;
    background-color: white;
}

.borough-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    transform: translateY(-3px);
}

[data-bs-theme="dark"] .borough-card {
    border-color: #404040;
    background-color: #232729;
}

.borough-card .borough-indicator {
    width: 8px;
    height: 100%;
    border-radius: 6px 0 0 6px;
    position: absolute;
    left: 0;
    top: 0;
}

/* Borough colour accents */
.borough-card.borough-city { border-left: 6px solid #b93232; }
.borough-card.borough-city h4 { color: #b93232; }
.borough-card.borough-westminster { border-left: 6px solid #32a046; }
.borough-card.borough-westminster h4 { color: #32a046; }
.borough-card.borough-southwark { border-left: 6px solid #3250b4; }
.borough-card.borough-southwark h4 { color: #3250b4; }
.borough-card.borough-middlesex { border-left: 6px solid #a07832; }
.borough-card.borough-middlesex h4 { color: #a07832; }

/* Mini-map container */
.minimap-container {
    border: 2px solid var(--burgundy);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
}

.minimap {
    height: 350px;
    width: 100%;
}

.minimap-overview {
    height: 400px;
}

.minimap-caption {
    padding: 0.5rem 1rem;
    background-color: rgba(139, 35, 50, 0.05);
    border-top: 1px solid rgba(139, 35, 50, 0.1);
    font-size: 0.875rem;
    color: var(--text-light);
}

[data-bs-theme="dark"] .minimap-caption {
    background-color: rgba(168, 53, 69, 0.1);
}

/* Data callout boxes */
.data-callout {
    background: rgba(139, 35, 50, 0.05);
    border-left: 4px solid var(--burgundy);
    padding: 1rem 1.25rem;
    margin: 1.5rem 0;
    border-radius: 0 8px 8px 0;
}

[data-bs-theme="dark"] .data-callout {
    background: rgba(168, 53, 69, 0.1);
}

.data-callout strong {
    color: var(--burgundy);
}

/* Reference image */
.reference-image {
    border: 2px solid var(--burgundy);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    margin: 1.5rem 0;
}

.reference-image img {
    width: 100%;
    display: block;
}

.reference-image figcaption {
    padding: 0.5rem 1rem;
    background-color: rgba(139, 35, 50, 0.05);
    border-top: 1px solid rgba(139, 35, 50, 0.1);
    font-size: 0.875rem;
    color: var(--text-light);
}

[data-bs-theme="dark"] .reference-image figcaption {
    background-color: rgba(168, 53, 69, 0.1);
}

/* Bibliography styling */
.bibliography {
    font-size: 0.95rem;
    border-top: 2px solid var(--burgundy);
    padding-top: 1.5rem;
    margin-top: 3rem;
}

.bibliography h3 {
    color: var(--burgundy);
    font-weight: 600;
}

.bibliography li {
    margin-bottom: 0.75rem;
    text-indent: -1.5em;
    padding-left: 1.5em;
}

/* Table of contents */
.essay-toc {
    background-color: rgba(139, 35, 50, 0.03);
    border: 1px solid rgba(139, 35, 50, 0.1);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    margin-bottom: 2rem;
}

[data-bs-theme="dark"] .essay-toc {
    background-color: rgba(168, 53, 69, 0.08);
    border-color: rgba(168, 53, 69, 0.15);
}

.essay-toc h6 {
    color: var(--burgundy);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.essay-toc a {
    text-decoration: none;
}

.essay-toc a:hover {
    text-decoration: underline;
}

/* Entry count tables */
.entry-count-table {
    margin: 1.5rem 0;
}

.entry-count-table th {
    color: var(--burgundy);
    font-weight: 600;
    border-bottom: 2px solid var(--burgundy);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .minimap {
        height: 250px;
    }

    .background-header {
        padding: 1.5rem 0 1rem;
    }

    .background-header h2 {
        font-size: 1.5rem;
    }

    .essay-content {
        font-size: 1rem;
        line-height: 1.75;
    }
}
