/* usnamemorialhall - Primary Stylesheet */

@page {
    size: A4;
    margin: 15mm;
    background-color: #ffffff;
}

body {
    font-family: 'Crimson Text', serif; /* Higher quality than Georgia */
    font-size: 1.15rem; /* Increased base size for better readability */
    line-height: 1.6;
    color: #333;
    background-color: #fdfdfd;
    margin: 0;
    padding: 0;
}

h1, h3, .card-name {
    font-family: 'Libre Baskerville', serif;
    color: #1C2D5B;
}

h2 {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.9rem;
    color: #1C2D5B;
    font-family: 'Georgia', serif;
    font-variant: small-caps;
    letter-spacing: 2px;
    padding-bottom: 8px;
    border-bottom: 4px solid #1C2D5B;
    position: relative;
    margin-top: 50px;
}

h2::after {
    content: "";
    position: absolute;
    bottom: -8px; /* Places it just below the navy line */
    left: 0;
    width: 60px;
    height: 4px;
    background-color: #BEA75A; /* The Gold accent */
}

/* Header & Navigation */
/* 1. Site Branding (The Navy Top Bar) */
.site-header {
    background-color: #1C2D5B;
    padding: 3px 0; /* Shorter band */
    border-bottom: 4px solid #BEA75A;
    text-align: center;
}

.header-container h1 {
    font-size: 1.5rem; 
    margin-bottom: 10px;
}

.site-header h1 a {
    color: #ffffff !important;
    font-size: 1.8rem;
    margin: 0;
    letter-spacing: 2px;
}

/* 2. Taxonomy Header (The Page Content) */
.taxonomy-header {
    background-color: transparent !important; /* Remove the blue band */
    padding: 0;
    margin-top: 40px;
    text-align: left; /* Align with your list */
    border-bottom: 2px solid #eee;
    margin-bottom: 30px;
}

.taxonomy-header h1 {
    color: #1C2D5B !important; /* Navy text on white background */
    font-size: 2.8rem; 
    margin-bottom: 5px;
}

.count-badge {
    display: inline-block;
    color: #BEA75A; /* Gold */
    font-family: 'Libre Baskerville', serif;
    font-size: 0.9rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 15px;
}

header a {
    color: #BEA75A;
    text-decoration: none;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

header a:hover {
    color: white;
}

/* Ensure the parent <li> is the reference point */
.site-nav li {
    position: relative;
    padding: 10px 0; /* Creates a "bridge" so the mouse can move to the menu */
}

/* 1. The Submenu Box */
.site-nav ul li ul.dropdown {
    display: none !important; 
    visibility: hidden;
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1C2D5B !important;
    border: 2px solid #BEA75A !important; /* Thicker gold border */
    padding: 20px !important;
    z-index: 9999;
    list-style: none;
    box-shadow: 0px 10px 30px rgba(0,0,0,0.4);
    min-width: 350px; /* Wider for better spacing */
}

/* 2. Grid Layout on Hover */
.site-nav ul li.has-children:hover ul.dropdown {
    display: grid !important; 
    visibility: visible;
    grid-template-columns: repeat(4, 1fr); /* 4 columns on Desktop */
    gap: 12px 20px; /* More breathing room */
}

/* 3. Submenu Links */
.site-nav ul.dropdown li a {
    color: #e0e0e0 !important; /* Soft white/grey */
    font-size: 1rem !important; /* Larger text */
    font-family: 'Libre Baskerville', serif;
    font-weight: 400;
    text-align: center;
    padding: 5px 0;
    transition: all 0.2s ease;
    border-bottom: 1px solid rgba(190, 167, 90, 0.2); /* Very subtle divider */
}

.site-nav ul.dropdown li a:hover {
    color: #BEA75A !important; /* Gold only on hover */
    background-color: rgba(255, 255, 255, 0.05);
    border-bottom-color: #BEA75A;
}

/* 4. Fix the main nav list alignment */
.site-nav ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    justify-content: center;
    gap: 30px;
}

/* 3. Reset the dropdown LI styles so they don't inherit top-level flex */
.site-nav ul.dropdown li {
    display: block !important;
    padding: 0 !important;
    margin: 0 !important;
}

/* 1. Main Navigation Links (Home, 1846-1874, etc.) */
.site-nav > ul > li > a {
    color: #ffffff !important; /* Force to White */
    font-family: 'Libre Baskerville', serif; /* Or your preferred serif */
    font-size: .95rem;           /* Increased from 0.85rem */
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 1px;         /* Readable, not squished */
    text-decoration: none;
    padding: 10px 15px;
    transition: color 0.3s ease;
}

/* 2. Hover State: Soft Gold */
.site-nav > ul > li > a:hover {
    color: #BEA75A !important;   /* Only turns gold when you interact with it */
}

/* 3. Dropdown Menu Links (The years) */
.site-nav ul.dropdown li a {
    color: #f0f0f0 !important;   /* Slightly off-white for the submenu */
    font-size: 1.1rem !important; /* Matches the top level for legibility */
    font-family: 'Crimson Text', serif; /* A bit more classic for numbers */
    border-bottom: 1px solid rgba(255, 255, 255, 0.1); /* Subtle divider */
}

.site-nav ul.dropdown li a:hover {
    color: #BEA75A !important;
    background: rgba(190, 167, 90, 0.1); /* Very faint gold highlight */
}

/* Target all links within the main content wrapper */
main a, 
.biography a, 
.lucky-bag a, 
.class-footer a,
.taxonomy-header a,
footer a {
    color: #1C2D5B;
    text-transform: none;
    /* The Dashed Underline */
    text-decoration: underline dashed #1C2D5B;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;

    transition: all 0.2s ease-in-out;
}

.nav-buttons a {
	text-decoration: none;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    
    transition: all 0.2s ease-in-out;
}

/* Hover state: Transition to solid Gold */
main a:hover, 
.biography a:hover, 
.lucky-bag a:hover, 
.class-footer a:hover,
.taxonomy-header a:hover,
footer a:hover {
    color: #BEA75A;
    text-decoration: underline solid #BEA75A;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

h4 {
    color: #1C2D5B;
    margin-bottom: 0.5rem;
}

.smallcaps {
    font-variant: small-caps;
}

/* Layout Containers */
main {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.meta-data {
    font-style: italic;
    color: #666;
    margin-bottom: 2rem;
    border-left: 4px solid #BEA75A;
    padding-left: 15px;
}

/* Lucky Bag Shortcode Styling */
.lucky-bag-card {
    background: #fff;
    border: 1px solid #ddd;
    border-left: 5px solid #BEA75A;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    margin-bottom: 2rem;
    padding: 25px; /* Slightly more breathing room */
}

.lucky-bag-title {
    margin: 0;
    font-size: 1.1rem;
    color: #1C2D5B;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-weight: bold;
}

.lucky-bag-link {
    font-size: 0.95 rem;
    font-style: italic;
    margin: 5px 0 20px 0;
}

.lucky-bag-container {
    display: flex;
    gap: 30px; /* Increased gap for larger layout */
}

.lucky-bag-image {
    flex: 0 0 350px; /* Increased from 250px */
}

.lucky-bag-image img {
    border: 1px solid #eee;
    padding: 4px;
    background: #fff;
    width: 100%; /* Take up the full 350px */
    height: auto;
    box-shadow: 2px 2px 5px rgba(0,0,0,0.1);
}

.lucky-bag-content {
    flex: 1;
}

.lucky-bag-name {
    margin: 0;
    font-size: 1.6rem; /* Slightly larger to match bigger photo */
    color: #1C2D5B;
    line-height: 1.2;
}

.lb-meta-line {
    margin: 4px 0 10px 0;
    font-size: 1rem;
    color: #555;
    font-weight: 500;
}

.lb-ecas {
    margin-bottom: 15px;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #333;
}

.lucky-bag-text {
    font-family: 'Georgia', serif;
    font-size: 1.05rem;
    line-height: 1.7;
    margin-bottom: 15px;
}

.lb-hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 20px 0 10px 0;
}

.lb-other {
    font-size: 1rem;
    line-height: 1.5;
    color: #222;
    font-style: italic;
}

@media (max-width: 900px) { /* Adjusted breakpoint for larger image */
    .lucky-bag-container { 
        flex-direction: column; 
    }
    .lucky-bag-image { 
        margin: 0 auto; 
        max-width: 100%; 
        flex: 0 0 auto;
    }
}

/* Footer */
footer {
    text-align: center;
    padding: 40px 0;
    font-size: 0.8rem;
    color: #999;
    border-top: 1px solid #eee;
}

/* =================== */
/* The Main Blockquote (First Level) */
blockquote {
    background-color: #f0f4f7; /* Cool Light Gray-Blue */
    border-left: 5px solid #1C2D5B; /* USNA Navy */
    margin: -10px 0 40px 0; /* Pulls up toward the intro line */
    padding: 1px 35px;
    position: relative;
    color: #334155; /* Slate color for text */
    box-shadow: 2px 2px 8px rgba(28, 45, 91, 0.08);
}

/* Internal Paragraph spacing */
blockquote p {
    margin-bottom: 1.5rem;
    line-height: 1.7;
}

blockquote p:last-child {
    margin-bottom: 0;
}

/* The Decorative Quote Mark */
blockquote::before {
    content: "\201C";
    font-family: Georgia, serif;
    font-size: 4rem;
    color: #BEA75A; /* USNA Gold */
    position: absolute;
    left: 8px;
    top: -20px;
    opacity: 0.25;
}

/* Nested Blockquote (Second Level) */
blockquote blockquote {
    background-color: rgba(255, 255, 255, 0.5); /* Slightly lighter/semi-transparent */
    border-left: 3px solid #BEA75A; /* Gold border for the nested quote */
    padding: 1px 35px;
    font-size: 1.1rem;
}

/* If a paragraph precedes a blockquote, pull the quote up */
p + blockquote {
    margin-top: -10px;
}

/* Styling for the attribution/source */
blockquote cite {
    display: block;       /* Forces it to a new line */
    text-align: right;    /* Aligns it to the right side of the box */
    margin-top: 5px;     /* Space between the quote text and the name */
    font-size: 0.9rem;    /* Slightly smaller than the quote text */
    font-style: normal;   /* Removes the default italic (since the quote is already italic) */
    font-weight: bold;
    color: #BEA75A;       /* USNA Gold to make it pop */
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Optional: Add a small dash before the name automatically */
blockquote cite::before {
    content: "— ";
}

/* =================== */
.class-footer {
    max-width: 800px;
    margin: 40px auto;
}

.card {
    border: 2px solid #1C2D5B;
    border-radius: 4px;
    overflow: hidden;
}

.card-header {
    background-color: #1C2D5B;
    color: #BEA75A; /* Gold text on Navy background */
    padding: 10px 20px;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.card-body {
    padding: 20px;
    background-color: #fff;
    text-align: center;
}

.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 10px;
}

.nav-buttons .spacer {
    flex: 1;
}

/* Optional: Make the buttons look a bit more "Navy" */
.btn-outline {
    font-family: 'Georgia', serif;
    font-weight: bold;
    border: 2px solid #1C2D5B;
    background-color: transparent;
    color: #1C2D5B;
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.btn-outline:hover {
    background-color: #1C2D5B;
    color: white;
}

/* =================== */
.taxonomy-footer {
    margin-top: 50px;
    padding: 30px 20px;
    border-top: 1px solid #eee;
    
    /* Centering Magic */
    display: flex;
    flex-direction: column; 
    align-items: center;    
    gap: 15px;              
}

.taxonomy-group {
    display: flex;
    flex-wrap: wrap;        
    justify-content: center; 
    align-items: center;
    gap: 10px;
    max-width: 800px;       
}

.taxo-tag {
	font-size: 0.95rem;
    background-color: #f0f4f7; /* Cool blue-gray */
    color: #1C2D5B;
    padding: 4px 12px;
    border-radius: 20px;
    text-decoration: none;

    border: 1px solid #1C2D5B;
    transition: all 0.2s;
}

.taxo-tag:hover {
    background-color: #BEA75A; /* Gold on hover */
    color: white;
    border-color: #BEA75A;
}

/* =================== */
/* Gallery Container */
.photo-gallery {
    column-count: 2; /* Creates two columns like a newspaper */
    column-gap: 20px;
    margin-top: 30px;
}

@media (max-width: 600px) {
    .photo-gallery {
        column-count: 1; /* Single column on phones */
    }
}

.gallery-item {
    break-inside: avoid; /* Prevents an image from splitting across columns */
    background: #f0f4f7;
    padding: 12px;
    border: 1px solid #ddd;
    margin-bottom: 20px; /* Space between stacked images */
    display: inline-block; /* Required for column-count stability */
    width: 100%;
    box-sizing: border-box;
}

.gallery-img {
    width: 100%;
    height: auto; /* IMPORTANT: Allows natural height */
    display: block;
    border-bottom: 2px solid #BEA75A;
}

.gallery-meta {
    padding: 10px 0 5px 0;
}

.gallery-caption {
    display: block;
    font-family: 'Georgia', serif;
    font-size: 0.95rem;
    color: #333;
    line-height: 1.4;
}

.gallery-source {
    display: inline-block;
    margin-top: 5px;
    color: #BEA75A !important;
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: bold;
}

.gallery-source:hover {
    text-decoration: underline;
}

/* =================== */
/* Data box at top */
/* =================== */
.honoree-record-container {
    width: 100%;
    display: flex;
    justify-content: center; /* Centers the ledger horizontally */
    margin: 40px 0;
}

.record-ledger {
    width: 100%;
    max-width: 400px; /* Adjust width to your taste */
    border: 1px solid #e0e0e0;
    border-top: 4px solid #1C2D5B; /* Navy accent bar at the top */
    padding: 5px 15px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    border-radius: 2px;
}

.record-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    padding: 8px 0;
    border-bottom: 1px solid #eee;
}

.record-row:last-child {
    border-bottom: none; /* Removes the line under the last item */
}

.record-label {
    font-weight: bold;
    color: #1C2D5B;
    text-transform: uppercase;
    font-size: 0.7rem;
    letter-spacing: 1px;
}

.record-value {
    color: #333;
    font-family: 'Georgia', serif;
    font-size: 1.05rem;
    text-align: right;
}

/* =================== */
.nd-entry {
    background: #fff;
    border: 1px solid #ddd;
    border-left: 5px solid #1C2D5B;
    margin-bottom: 1.5rem;
    padding: 15px 20px;
}

.nd-date {
    margin: 0 0 4px 0;
    color: #1C2D5B;
    font-family: 'Georgia', serif;
    font-size: 1.1rem;
}

.nd-main-info {
    font-size: 1rem;
    line-height: 1.4;
}

.nd-hr {
    border: 0;
    border-top: 1px solid #eee;
    margin: 12px 0;
}

.nd-label {
    display: block;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
    color: #666;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}

.nd-columns-wrapper {
    column-count: 3;
    column-gap: 30px;
    column-fill: auto;
    display: block; /* Ensure the wrapper itself isn't a flexbox or something else */
}

.nd-columns-wrapper2 {
    column-count: 2;
    column-gap: 30px;
    column-fill: auto;
    display: block; /* Ensure the wrapper itself isn't a flexbox or something else */
}

.nd-person-unit {
    display: inline-block;
    width: 100%;
    break-inside: avoid-column;
    margin-bottom: 6px;
    padding-left: 15px;      /* Create space for indent */
    text-indent: -15px;     /* Pull first line back */
    line-height: 1.3;
}

/* Hugo's markdownify will wrap the text in a <p> tag */
.nd-person-unit p {
    display: inline; /* This is crucial: keeps the text and parentheses on one line */
    margin: 0;
}

@media (max-width: 768px) {
    .nd-columns-wrapper { column-count: 1; }
}

/* =================== */
/* Style the footnote section at the bottom */
.footnotes {
    font-size: 0.9em;
    color: #4A5568;
    border-top: 1px solid #e2e8f0;
    margin-top: 2rem;
    padding-top: 1rem;
}

/* Style the back-link arrow */
.footnote-backref {
    text-decoration: none;
    color: #BEA75A; /* Your Gold color */
    margin-left: 5px;
}

/* 1. Remove the horizontal rule Hugo/Goldmark inserts automatically */
.footnotes hr {
    display: none;
}

/* 2. Remove any top border/line the theme adds to the footnote container */
.footnotes {
    border-top: none !important;
    margin-top: 0;
    padding-top: 0;
}

/* 3. Optional: Ensure the list has a little breathing room below your ## header */
.footnotes ol {
    margin-top: 1rem;
    padding-left: 1.5rem; /* Keeps the numbers aligned nicely */
}

/* =================== */
/* Taxonomy Pages */
.taxonomy-header h1 {
    font-family: 'Libre Baskerville', serif;
    color: #1C2D5B !important;
    font-size: 2.5rem;
    margin-top: 40px;
    margin-bottom: 20px;
    text-align: left;
}

/* The Lucky Bag / Description Inset */
.taxonomy-description {
	text-align: left;
    max-width: 900px;
    margin: 25px 0 45px 0;
    padding: 30px 40px;
    
    /* Lucky Bag aesthetic: Parchment and Gold */
    background-color: #fdfcf8; 
    border-left: 6px solid #BEA75A;
    box-shadow: inset 0 0 15px rgba(190, 167, 90, 0.05), 2px 2px 5px rgba(0,0,0,0.02);
    
    /* Typography */
    font-family: 'Crimson Text', serif;
    font-size: 1.1rem; /* Slightly larger for "Story" feel */
    line-height: 1.7;
    color: #333;
}

/* Ensure any paragraphs inside the description don't have extra margin */
.taxonomy-description p:last-child {
    margin-bottom: 0;
}

/* The new indivSummary */
.honoree-card {
    padding: 25px 0;
    border-bottom: 1px solid;
    border-image: linear-gradient(to right, #BEA75A, rgba(190, 167, 90, 0)) 1;
}

.card-content {
    display: flex; /* Flexbox is easier for simple left/right split */
    gap: 30px;
    align-items: flex-start;
}

/* Constrain the Photo */
.card-photo {
    flex: 0 0 150px; /* Width of the photo column */
}

.card-photo img {
    width: 100%;
    max-width: 450px; /* Your requested constraint */
    height: auto;
    border-radius: 4px;
    box-shadow: 2px 2px 8px rgba(0,0,0,0.1);
}

.card-info {
    flex: 1;
}

.card-header-line {
    display: flex;
    align-items: baseline; /* Aligns the bottom of the text */
    gap: 15px;            /* Space between Name and Class */
    margin-bottom: 2px;
}

.card-name {
    margin: 0;
    font-size: 1.6rem;
    font-weight: 700;
    display: inline;
    border-bottom: none !important;
    padding-bottom: 0;
}

.card-name a {
    color: #1C2D5B; /* Navy */
    text-decoration: none;
}

.card-meta {
    margin-bottom: 15px;
    font-size: 1.05rem;
    color: #555;
}

.card-rank-service {
    font-size: 1.1rem;
    color: #222;
    margin-bottom: 4px;
}

.card-class {
    font-weight: bold;
    color: #BEA75A;
    white-space: nowrap;
}

.divider {
    margin: 0 10px;
    color: #BEA75A;
}

/* ========================== */
/* Class page statistics  */
/* ========================== */
.class-statistics {
    display: flex;
    gap: 40px;
    margin: 20px 0;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.8rem;
    font-weight: bold;
    color: #1C2D5B; /* Navy */
}

.stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #888;
    margin-top: -5px;
}

.class-notes {
    margin-top: 20px;
    padding: 15px 20px;
    background-color: #f9f9f9;
    border-left: 4px solid #BEA75A; /* Gold left border for significance */
}

.class-notes p {
    margin: 0;
    font-size: 1rem;
    line-height: 1.6;
    color: #444;
}

/* ========================== */
/* Class page navigation  */
/* ========================== */
.class-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 30px 0;
    padding: 20px 0;
    border-top: 1px solid #eee;
}

/* Container for the buttons */
.class-pagination.nav-buttons {
    display: flex;
    justify-content: space-between;
    margin: 40px 0;
    border-top: 1px solid #eee;
    padding-top: 20px;
}

/* Base button style */
.nav-buttons a.pag-btn {
    text-decoration: none !important; /* Force removal of solid/dashed lines */
    border: 1px solid #ddd;
    padding: 10px 20px;
    color: #1C2D5B;
    font-family: 'Libre Baskerville', serif;
    font-weight: bold;
    transition: all 0.2s ease-in-out;
    background-color: transparent;
}

/* Hover state */
.nav-buttons a.pag-btn:hover {
    background-color: #1C2D5B;
    color: #ffffff !important;
    border-color: #1C2D5B;
    text-decoration: none !important;
}

/* If you prefer the 'Gold' hover look to match the rest of the site: */
/* 
.nav-buttons a.pag-btn:hover {
    background-color: #fcfcfc;
    color: #BEA75A !important;
    border-color: #BEA75A;
}
 */

.nav-buttons .spacer {
    flex: 1; /* Helps keep the single button pushed to its correct side */
}
.arrow {
    font-size: 1.2rem;
    line-height: 1;
}

/* ========================== */
/* Taxonomy Pills */
/* ========================== */
.card-taxonomies {
    font-size: 0.95rem;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}


.container {
    max-width: 1140px;
    margin: 0 auto;
    padding: 0 20px;
}

.btn-outline {
    display: inline-block;
    padding: 10px 20px;
    border: 2px solid #1C2D5B;
    color: #1C2D5B !important;
    text-decoration: none !important;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    background: transparent;
}

.btn-outline:hover {
    background-color: #1C2D5B;
    color: #BEA75A !important; /* Gold text on Navy background */
}

/* Hero & Logo */
.home-hero {
    text-align: center;
    padding: 30px 0;
    border-bottom: 1px solid #eee;
}

.home-logo {
    margin-bottom: 40px;
}

.mission-statement {
    max-width: 800px;
    margin: 0 auto;
}

.lead {
    font-size: 1.4rem;
    font-family: 'Libre Baskerville', serif;
    color: #1C2D5B;
    margin-bottom: 30px;
}

/* ========================== */
/* Homepage */
/* ========================== */
.intro-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    padding: 40px 0;
    border-bottom: 1px solid #eee;
}

.category-section {
    padding: 30px 0;
}

.section-heading {
    text-align: center;
    margin-bottom: 40px;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.category-section .section-heading {
    margin-top: 20px;
    margin-bottom: 30px;
    padding-bottom: 0;
}

.portal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.portal-card {
    background: #fff;
    padding: 15px 25px;
    text-decoration: none !important;
    border: 1px solid #eee;
    border-top: 4px solid #BEA75A;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
    min-height: 140px; /* Reduced from 180px */
}

.portal-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-top-color: #1C2D5B; /* Changes to Navy on hover */
}

.portal-card h4 {
    font-family: 'Libre Baskerville', serif;
    color: #1C2D5B;
    margin-bottom: 8px;
    font-size: 1.3rem;
}

.portal-card p {
    color: #555;
    font-size: 1.05rem;
    line-height: 1.4;
}

/* Apply your standard site link style to index page content */
.mission-statement a,
.intro-grid a,
.category-section a:not(.portal-card) {
    color: #1C2D5B;
    text-decoration: underline dashed #1C2D5B;
    text-decoration-thickness: 1px;
    text-underline-offset: 4px;
    transition: all 0.2s ease-in-out;
}

/* Hover state: Transition to solid Gold */
.mission-statement a:hover,
.intro-grid a:hover,
.category-section a:not(.portal-card):hover {
    color: #BEA75A;
    text-decoration: underline solid #BEA75A;
    text-decoration-thickness: 2px;
    text-underline-offset: 4px;
}

.class-section {
    margin-bottom: 3rem;
    width: 100%;
    clear: both;
}

.class-header {
    text-align: center;
    font-family: 'Libre Baskerville', serif;
    font-weight: 700;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    position: relative;
}

.class-header a {
    text-decoration: none;
    color: #1a1a1a;
    transition: color 0.2s ease;
    display: inline-block;
    padding: 0 15px; /* Creates a small gap for the text over the line */
    background: #fff; /* Match your site background to "break" the line behind the text */
    position: relative;
    z-index: 2;
}

.class-header a:hover {
    color: #b3a369;
}

/* The Subtle Underline that spans the full width */
.class-header::after {
    content: "";
    position: absolute;
    bottom: 50%; /* Moves the line to the middle of the text height */
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(to right, transparent, #b3a369, transparent);
    z-index: 1;
}

.class-column-grid {
    list-style: none;
    padding: 0;
    column-count: 3; 
    column-gap: 3rem;
}

.class-column-grid li {
    break-inside: avoid;
    margin-bottom: 0.3rem;
    font-size: 1.05rem;
}

.category-section .section-heading::after { /* remove gold accent under h2 on index page */
    display: none !important;
}

/* Responsive adjustment: 2 columns on tablets, 1 on mobile */
@media (max-width: 900px) {
    .class-column-grid { column-count: 2; }
}
@media (max-width: 600px) {
    .class-column-grid { column-count: 1; }
}

/* ======================= */
/* start Companies taxonomy page  */
/* ======================= */
.company-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 20px;
    margin-top: 40px;
    margin-bottom: 60px;
}

/* The Individual Card */
.company-card {
    background: #fff;
    border: 1px solid #ddd;
    border-bottom: 4px solid #1C2D5B; /* Navy accent */
    padding: 20px;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.company-card:hover {
    transform: translateY(-5px);
    border-bottom-color: #BEA75A; /* Turns Gold on hover */
    box-shadow: 0 10px 20px rgba(0,0,0,0.1);
}

.company-number {
    font-family: 'Libre Baskerville', serif;
    font-size: 2.8rem; /* Slightly larger to account for superscript */
    font-weight: bold;
    color: #1C2D5B;
    line-height: 1;
    display: inline-block;
    position: relative;
}

.company-number sup {
    font-size: 1.1rem; /* Smaller than the number */
    color: #BEA75A;    /* Match the gold theme */
    top: -0.8em;       /* Elevate it higher */
    margin-left: 2px;
    font-variant: small-caps;
}

.company-label {
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 2px;
    color: #888;
    margin: 5px 0 10px 0;
}

.company-stats {
    font-size: 0.85rem;
    color: #BEA75A;
    font-weight: 700;
}

/* ===================== */
/* KIA page */
/* ===================== */
.kia-list {
    list-style: none;
    padding: 0;
    column-count: 2; /* Still highly recommended for 900 names */
    column-gap: 3rem;
}

.kia-link {
    text-decoration: none;
    color: inherit;
    display: inline-block;
    padding: 2px 0;
    transition: color 0.2s ease;
}

.kia-link:hover {
    color: #BEA75A;
    text-decoration: none; /* Ensures underline stays off on hover */
}

@media (max-width: 600px) {
    .kia-list {
        column-count: 1;
    }
}

.kia-list li {
    font-family: 'Libre Baskerville', serif;
    font-size: 1.1rem;
    margin-bottom: 8px;
    text-transform: uppercase; /* Standard for KIA panels */
    break-inside: avoid;
}

.memorial-plaque {
    text-align: center;
    max-width: 800px;
    margin: 4rem auto;
    padding: 2rem;
    color: #333;
    font-family: 'Libre Baskerville', 'Georgia', serif;
}

.plaque-title {
color: #b3a369; /* Your USNA Gold */
    font-size: 2.5rem;
    font-weight: 700;
    letter-spacing: 0.15rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    padding-bottom: 0.5rem;
}

.plaque-inscription {
    line-height: 1.8;
    font-style: italic;
    font-size: 1.15rem;
}

.dedication {
    font-weight: 700;
    text-transform: uppercase;
    font-style: normal;
    font-size: 0.9rem;
    letter-spacing: 0.05rem;
    margin-bottom: 2rem;
}

.narrative, .watch {
    margin-bottom: 1.5rem;
}

/* Horizontal rule to separate the plaque from the list of names */
.plaque-divider {
    border: 0;
    height: 1px;
    background-image: linear-gradient(to right, rgba(0,0,0,0), rgba(179, 163, 105, 0.75), rgba(0,0,0,0));
    margin: 1rem 0;
}

/* ======================= */
/* Responsive adjustments */
/* ======================= */
@media (max-width: 768px) {
    .intro-grid { grid-template-columns: 1fr; }
    .lead { font-size: 1.2rem; }
    .lb-flex-wrapper {
        flex-direction: column;
    }
    .lb-photo {
        flex: 1 1 auto;
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }
}

@media (max-width: 576px) {
    .honoree-card .media-desktop {
        gap: 12px;
        align-items: flex-start;
    }
    
    .media-photo img {
        width: 80px; /* Smaller thumbnail for mobile list view */
        height: auto;
    }

    .media-body h5 {
        font-size: 1rem;
        line-height: 1.2;
    }

    .media-body p, .media-body h6 {
        font-size: 0.85rem;
    }
}

.search-container {
    position: relative;
    max-width: 600px;
    margin: 2rem auto;
}

#search-input {
    width: 100%;
    padding: 12px 20px;
    font-family: 'Libre Baskerville', serif;
    border: 2px solid #b3a369;
    border-radius: 4px;
}

#search-results {
    position: absolute;
    width: 100%;
    background: white;
    list-style: none;
    padding: 0;
    margin: 0;
    border: 1px solid #ddd;
    border-top: none;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#search-results li a {
    display: block;
    padding: 10px 20px;
    text-decoration: none;
    color: #333;
    border-bottom: 1px solid #eee;
}

#search-results li a:hover {
    background-color: #f9f7f0; /* Very light gold tint */
}

.res-title { font-weight: bold; color: #1a1a1a; }
.res-meta { font-size: 0.8rem; color: #666; }