/* Clean Wikipedia-style CSS */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: "Linux Libertine", "Georgia", "Times", serif;
    font-size: 14px;
    line-height: 1.6;
    color: #000;
    background-color: #f6f6f6;
    margin: 0;
    padding: 0;
}

.wiki-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0;
    background-color: #fff;
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
}

/* Site Header */
.site-header {
    background-color: #f8f9fa;
    border-bottom: 1px solid #a2a9b1;
    padding: 8px 20px;
    text-align: right;
}

.site-info {
    font-size: 16px;
    color: #333;
    font-style: normal;
    font-weight: bold;
    margin: 0;
    letter-spacing: 0.5px;
}

.main-content {
    display: flex;
    gap: 20px;
    position: relative;
    padding: 20px;
}

.sidebar {
    width: 250px;
    flex-shrink: 0;
}

.content-area {
    display: flex;
    flex: 1;
    gap: 20px;
}

.article-body {
    flex: 1;
    min-width: 0;
}

.right-sidebar {
    width: 320px;
    flex-shrink: 0;
}

.article-title {
    font-size: 28px;
    font-weight: normal;
    border-bottom: 3px solid #a2a9b1;
    padding-bottom: 5px;
    margin-bottom: 15px;
    font-family: "Linux Libertine", "Georgia", "Times", serif;
    color: #000;
}

.lead-paragraph {
    font-size: 14px;
    margin-bottom: 20px;
    line-height: 1.6;
}

/* Table of Contents - Sidebar */
.sidebar .toc {
    background-color: #f8f9fa;
    border: 1px solid #a2a9b1;
    padding: 15px;
    margin: 0;
    font-size: 13px;
    position: sticky;
    top: 20px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.sidebar .toc .toctitle {
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 10px;
    text-align: center;
    color: #000;
    border-bottom: 1px solid #a2a9b1;
    padding-bottom: 8px;
}

.sidebar .toc .toc_list {
    list-style: none;
    padding-left: 0;
}

.sidebar .toc .toc_list li {
    margin: 3px 0;
}

.sidebar .toc .toc_list ul {
    list-style: none;
    padding-left: 15px;
    margin-top: 3px;
}

.sidebar .toc .toc_list a {
    color: #0645ad;
    text-decoration: none;
    display: block;
    padding: 2px 4px;
    border-radius: 2px;
    transition: background-color 0.2s ease;
}

.sidebar .toc .toc_list a:hover {
    background-color: #eaecf0;
    text-decoration: none;
}

/* Headings */
h2 {
    font-size: 20px;
    font-weight: normal;
    border-bottom: 1px solid #a2a9b1;
    margin-top: 30px;
    margin-bottom: 15px;
    padding-bottom: 3px;
    font-family: "Linux Libertine", "Georgia", "Times", serif;
    color: #000;
}

h3 {
    font-size: 16px;
    font-weight: bold;
    margin-top: 25px;
    margin-bottom: 10px;
    font-family: "Linux Libertine", "Georgia", "Times", serif;
    color: #000;
}

/* Paragraphs and text */
p {
    margin-bottom: 15px;
    text-align: justify;
}

/* Links */
a {
    color: #0645ad;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

a:visited {
    color: #0b0080;
}

/* Lists */
ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

li {
    margin-bottom: 5px;
}

/* Infobox - Right Sidebar */
.right-sidebar .infobox {
    width: 100%;
    margin-bottom: 20px;
}

.right-sidebar .infobox-table {
    width: 100%;
    border-collapse: collapse;
    border: 1px solid #a2a9b1;
    background-color: #f8f9fa;
    font-size: 13px;
}

.right-sidebar .infobox-table th,
.right-sidebar .infobox-table td {
    border: 1px solid #a2a9b1;
    padding: 8px;
    vertical-align: top;
}

.right-sidebar .infobox-title {
    background-color: #ccccff;
    font-weight: bold;
    text-align: center;
    font-size: 14px;
    color: #000;
}

.right-sidebar .infobox-label {
    background-color: #e6e6fa;
    font-weight: bold;
    width: 30%;
    text-align: left;
    color: #000;
}

.right-sidebar .infobox-table td {
    background-color: #f8f9fa;
}

.right-sidebar .infobox-table a {
    color: #0645ad;
    text-decoration: none;
}

.right-sidebar .infobox-table a:hover {
    text-decoration: underline;
}

/* Archive notice styling */
.archive-notice {
    background-color: #f8f9fa;
    border: 1px solid #a2a9b1;
    padding: 8px 12px;
    margin: 10px 0 15px 0;
    font-size: 12px;
    color: #666;
    border-left: 4px solid #0645ad;
}

.archive-notice p {
    margin: 0;
    text-align: center;
}

/* Inline image styling for retired photo */
.image-container-inline {
    float: right;
    margin: 0 0 15px 15px;
    text-align: center;
}

.retired-image {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border: 1px solid #a2a9b1;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Presidential Letter Styling */
.presidential-letter {
    background-color: #f8f9fa;
    border: 2px solid #0645ad;
    border-radius: 8px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    font-family: "Linux Libertine", "Georgia", "Times", serif;
    line-height: 1.8;
}

.letter-header {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    color: #000;
    margin-bottom: 20px;
    letter-spacing: 1px;
}

.letter-body {
    text-align: justify;
    margin-bottom: 15px;
    font-size: 14px;
    color: #333;
}

.letter-signature {
    text-align: right;
    margin-top: 25px;
    font-size: 14px;
    color: #000;
}

.presidential-seal {
    font-style: italic;
    color: #666;
    font-size: 12px;
}

/* Responsive design */
@media (max-width: 768px) {
    .wiki-container {
        margin: 0;
        box-shadow: none;
    }
    
    .main-content {
        flex-direction: column;
        padding: 10px;
    }
    
    .sidebar {
        width: 100%;
        order: 3;
    }
    
    .content-area {
        flex-direction: column;
        order: 1;
    }
    
    .article-body {
        order: 1;
    }
    
    .right-sidebar {
        width: 100%;
        order: 2;
    }
    
    .sidebar .toc {
        position: static;
        max-height: none;
    }
    
    .site-header {
        padding: 6px 10px;
    }
    
    .site-info {
        font-size: 11px;
    }
    
    /* Mobile image fixes */
    .article-body .military-image {
        max-width: 100%;
        width: 100%;
        height: auto;
    }
    
    .article-body .image-container {
        margin: 15px 0;
    }
    
    .image-container-inline {
        float: none;
        margin: 15px auto;
        display: block;
        width: fit-content;
    }
    
    .retired-image {
        width: 100px;
        height: 100px;
    }
    
    /* Text justification off on mobile for better readability */
    p {
        text-align: left;
    }
    
    /* Fix ordered list numbering on mobile */
    ol {
        margin-left: 25px;
        padding-left: 5px;
    }
    
    ol li {
        margin-bottom: 8px;
    }
    
    .article-title {
        font-size: 24px;
    }
    
    h2 {
        font-size: 18px;
    }
    
    h3 {
        font-size: 15px;
    }
    
    .presidential-letter {
        padding: 20px;
        margin: 15px 0;
    }
    
    .letter-header {
        font-size: 14px;
    }
    
    .letter-body {
        font-size: 13px;
        text-align: left;
    }
    
    .letter-signature {
        font-size: 13px;
    }
}

/* Emphasis */
em {
    font-style: italic;
}

strong {
    font-weight: bold;
}

/* Section spacing */
#Early_life,
#Military_career,
#Post-military_career,
#Education_and_training,
#Awards_and_decorations,
#See_also,
#References {
    scroll-margin-top: 20px;
}

/* Image styling */
.right-sidebar .image-container {
    margin-bottom: 20px;
    text-align: center;
}

.right-sidebar .military-image {
    max-width: 100%;
    height: auto;
    border: 1px solid #a2a9b1;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.right-sidebar .image-caption {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 8px;
    text-align: center;
    line-height: 1.4;
}

.article-body .image-container {
    margin: 20px 0;
    text-align: center;
}

.article-body .military-image {
    max-width: 450px;
    height: auto;
    border: 1px solid #a2a9b1;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.article-body .image-caption {
    font-size: 12px;
    color: #666;
    font-style: italic;
    margin-top: 8px;
    text-align: center;
}

/* Print styles */
@media print {
    body {
        background: white;
    }
    
    .wiki-container {
        max-width: none;
        padding: 0;
        box-shadow: none;
    }
    
    .site-header {
        background: #f8f9fa !important;
        color: #666 !important;
        print-color-adjust: exact;
    }
    
    .infobox {
        break-inside: avoid;
    }
    
    .toc {
        break-inside: avoid;
    }
}
