﻿/* --- Global Styles & Reset --- */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    margin: 0;
    background-color: #fff;
    color: #000;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

hr {
    border: none;
    border-top: 1px solid #ccc;
    margin: 40px 0;
}

hr.short-hr {
    max-width: 500px;
    margin: 40px auto;
}

a {
    color: #0000FF;
}

a.plain-link {
    color: #000;
}

section {
    margin-bottom: 30px;
}

/* --- Typography & Text Styles --- */
header {
    background-color: #DADADA;
    padding: 10px;
    text-align: center;
    margin-bottom: 20px;
}

h1 {
    font-size: 1.75rem;
    font-weight: bold;
    margin: 0;
}

h2 {
    text-align: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin-top: 0;
    margin-bottom: 20px;
}

h2.title-sub {
    color: #B00000;
}

h2.title-main {
    color: #000080;
}

p,
blockquote {
    text-align: justify;
    font-size: 1rem;
}

blockquote {
    margin: 20px 0;
    padding: 0;
    text-align: center;
}

blockquote cite {
    display: block;
    margin-top: 5px;
    font-style: normal;
    font-family: "Arial Narrow", Arial, sans-serif;
    font-size: 1.1rem;
}

.quote p {
    color: #400080;
    font-family: Verdana, sans-serif;
    font-size: 0.95rem;
    text-align: center;
}

.quote-alt {
    color: #400080;
}

.quote-alt-dark {
    color: #400040;
}

.highlight-name {
    color: #800000;
}

.highlight-person {
    color: #400000;
}

.caption {
    text-align: center;
    margin-top: 10px;
}

/* --- Figures & Images --- */
figure {
    margin: 20px auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

figcaption {
    margin-top: 8px;
    font-family: "Arial Narrow", Arial, sans-serif;
    font-size: 0.9rem;
    color: #333;
    max-width: 600px;
}

.bordered-image {
    border: 1px solid #000;
}

/* --- Layouts & Galleries (UPDATED) --- */
/* Base styles for the gallery are now mobile-first (stacked) */
/* The flexbox row layout is now handled in the media query below */

.newspapers .gallery-row figure {
    /* This rule is specific and remains */
    max-width: 200px; 
}

.news-caption {
    color: #D70000;
    font-size: 0.9rem;
}

/* --- Specific Component Styles --- */
.intro, .bellfield-case, .prosecution, .crime-scene {
    text-align: center;
}

.crime-scene p, .prosecution p, .trial-summary p, .bellfield-case p {
    text-align: justify;
}

.confession-box {
    text-align: center;
    margin: 25px 0;
}

.confession-title {
    color: #D70000;
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
    text-align: center;
}

.confession-text {
    color: #400080;
    font-weight: bold;
    text-align: center;
}

.news-quotes {
    margin: 30px 0;
    text-align: left;
}

.news-quotes p {
    text-align: left;
    margin-bottom: 15px;
}

.news-title {
    color: #D70000;
}

.link-center {
    text-align: center;
}

/* --- Responsive Design (Media Queries) --- */

/* For tablets in landscape and desktops */
@media (min-width: 768px) {
    /* ADDED: These rules create the gallery row on wider screens */
    .gallery-row {
        display: flex;
        gap: 1rem; /* Adjust gap as needed */
    }

    .gallery-row figure {
        flex: 1; /* This makes each figure take up equal space */
        margin: 0; /* Override the default figure margin */
    }
}

/* For tablets and smaller devices */
@media (max-width: 768px) {
    body {
        font-size: 15px;
    }

    .container {
        padding: 15px;
    }
    
    h1 {
        font-size: 1.5rem;
    }

    h2 {
        font-size: 1.3rem;
    }
    
    /* REMOVED: The old rule for .gallery-row was removed from here */
    /* because the mobile styles are now the default. */

    .compare-row {
        flex-direction: row; /* Keep comparison side-by-side if possible */
    }
}

/* For mobile phones */
@media (max-width: 480px) {
    .container {
        padding: 10px;
    }

    h1 {
        font-size: 1.25rem;
    }

    h2 {
        font-size: 1.15rem;
    }

    blockquote br {
        display: none; /* remove forced line breaks in quotes on mobile */
    }

    .compare-row {
        flex-direction: column; /* Stack comparison images on small screens */
    }
}