/* ==================================================================== */
/* Global page styles for overall look and feel */
/* ==================================================================== */

html {
    max-width: 960px;
    margin: 0 auto;
}

body {
    background-color: white;
    font-family: Baskerville, 'Palatino Linotype', Palatino, 'Century Schoolbook L', 'Times New Roman', serif;
    text-align: left;
    font-size: medium;
    line-height: 1.6;
    color: black;
    margin: 0;
    padding: 0 10px;
}

/* ==================================================================== */
/* Header layout and image alignment */
/* ==================================================================== */

.page-header {
    width: 100%;
    margin-bottom: 20px;
}

/* Flexbox container for header */
.header-content {
    display: flex;
    justify-content: space-between; /* Pushes left/right elements apart */
    align-items: center;
    width: 100%;
    padding: 10px 0;
}

/* Left logo */
.header-content > img {
    display: block;
    margin-right: auto;
    max-width: 250px;
    height: auto;
}

/* Right logo — responsive scaling */
.header-content > .right-logo {
    margin-left: auto;
    display: block;
}

.header-content > .right-logo img {
    display: block;
    max-width: 150px;  /* Desktop default */
    height: auto;
    transition: max-width 0.2s ease-in-out;
}

/* General image cleanup */
.header-content img {
    display: block;
    height: auto;
    max-width: 100%;
}

/* Divider under header */
.header-divider {
    border: none;
    border-top: 2px solid #000;
    margin-top: 10px;
    margin-bottom: 20px;
}

/* ==================================================================== */
/* Text and heading formatting */
/* ==================================================================== */

/* Headings are now sans-serif */
h1, h2, h3, h4 {
    font-family: Arial, Helvetica, sans-serif;
    color: black;
    margin-top: 1em;
    margin-bottom: 0.5em;
    text-align: center;
}

/* Centering utilities for main content */
.center {
    display: block;
    margin-left: auto;
    margin-right: auto;
    text-align: center !important; /* for author lines, captions, etc. */
}

.right {
    display: block;
    margin-left: auto;
    margin-right: 0;
    text-align: right !important;
}

/* Highlighted brown text */
.brown {
    color: #8B4513;
}

/* ==================================================================== */
/* Link styling */
/* ==================================================================== */

a {
    color: #8B0000; /* dark red for main links */
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* ==================================================================== */
/* Footer styling */
/* ==================================================================== */

footer {
    text-align: left; /* left-aligned footer */
    font-size: small;
    margin-top: 30px;
    color: black;
}

footer hr {
    border: none;
    border-top: 1px solid #000;
    margin: 10px 0;
}

/* Footer links — neutral and distinct from main links */
footer a {
    color: #555;
    text-decoration: none;
}

footer a:hover {
    color: #8B0000;
    text-decoration: underline;
}

/* ==================================================================== */
/* Responsive layout adjustments */
/* ==================================================================== */

@media (max-width: 800px) {
    .header-content > .right-logo img {
        max-width: 120px;
    }
}

@media (max-width: 600px) {
    .header-content {
        flex-direction: column;
        text-align: center;
    }

    .header-content > img {
        margin: 0 auto 10px auto;
    }

    .header-content > .right-logo {
        margin-left: 0;
        margin-top: 5px;
    }

    .header-content > .right-logo img {
        max-width: 100px;
    }

    body {
        padding: 0 5px;
    }
}