/* =============================================================================
   ROYCE WILLIAMS MEMORIAL — LEGION-FORWARD DESIGN SYSTEM
   Captain E. Royce Williams | Medal of Honor Recipient
   Design Language: CMOHS + American Legion Hybrid
   ============================================================================= */

/* -----------------------------------------------------------------------------
   1. CSS CUSTOM PROPERTIES (Design Tokens)
   ----------------------------------------------------------------------------- */

:root {
  /* Color Palette */
  --navy-dark:   #072946;
  --near-black:  #1f1f1f;
  --blue:        #3f6bb3;
  --blue-hover:  #32548d;
  --gold:        #c09b57;
  --gold-light:  #c3b58f;
  --red:         #fb4348;
  --white:       #fefefe;
  --gray-text:   #777777;
  --light-blue:  #94acc4;
  --cream:       #e8e0cd;

  /* Typography */
  --font-serif:  Georgia, 'Times New Roman', Times, serif;
  --font-sans:   -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  /* Spacing */
  --section-pad: 3rem;
  --card-pad:    1.5rem;
}


/* -----------------------------------------------------------------------------
   2. BASE RESET & BODY
   ----------------------------------------------------------------------------- */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-text);
  background-color: var(--white);
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  color: var(--blue);
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: var(--blue-hover);
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-serif);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--navy-dark);
  margin-top: 0;
  line-height: 1.25;
}

p {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 16px;
  line-height: 1.6;
  color: var(--gray-text);
}

ul, ol {
  padding-left: 1.5rem;
}

/* Remove Bootstrap's border-radius overrides globally */
.btn,
.card,
.badge,
.form-control,
.input-group-text,
.modal-content,
.dropdown-menu,
.popover,
.tooltip-inner {
  border-radius: 0 !important;
}


/* -----------------------------------------------------------------------------
   3. UTILITY — BORDER MOTIFS
   ----------------------------------------------------------------------------- */

/* Gold border bars — CMOHS signature motif */
.gold-border-top {
  border-top: 5px solid var(--gold-light);
}

.gold-border-bottom {
  border-bottom: 5px solid var(--gold-light);
}

.gold-border-thin-top {
  border-top: 3px solid var(--gold-light);
}

.gold-border-thin-bottom {
  border-bottom: 3px solid var(--gold-light);
}


/* -----------------------------------------------------------------------------
   4. UTILITY — UNDERLINE ACCENTS
   ----------------------------------------------------------------------------- */

/* Heading underline accent bar (blue, 60px, left-aligned) */
.underline-accent {
  position: relative;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
}

.underline-accent::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 60px;
  height: 3px;
  background-color: var(--blue);
}

/* Centered variant (40px) */
.underline-accent--center {
  position: relative;
  padding-bottom: 0.75rem;
  margin-bottom: 1.25rem;
  text-align: center;
}

.underline-accent--center::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 40px;
  height: 3px;
  background-color: var(--blue);
}

/* Gold color variant */
.underline-accent--gold::after {
  background-color: var(--gold);
}


/* -----------------------------------------------------------------------------
   5. UTILITY — GOLD LABEL
   ----------------------------------------------------------------------------- */

.gold-label {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--gold);
  display: block;
  margin-bottom: 0.35rem;
}


/* -----------------------------------------------------------------------------
   6. SITE HEADER
   ----------------------------------------------------------------------------- */

.site-header-border-top {
  height: 5px;
  background-color: var(--gold-light);
  width: 100%;
}

.site-header-border-bottom {
  height: 3px;
  background-color: var(--gold-light);
  width: 100%;
}

.site-header {
  background-color: var(--navy-dark);
  position: sticky;
  top: 0;
  z-index: 1030;
}

/* Navbar */
.site-header .navbar {
  padding: 0.5rem 1rem;
  background-color: var(--navy-dark);
}

.navbar-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  padding: 0.25rem 0;
}

.logo-badge {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 2px solid var(--gold-light);
  object-fit: cover;
  flex-shrink: 0;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: var(--navy-dark);
}

.logo-badge img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-name {
  font-family: var(--font-serif);
  font-weight: 400;
  font-size: 1.05rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--white);
  margin: 0;
}

.brand-subtitle {
  font-family: var(--font-sans);
  font-size: 0.65rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold-light);
  margin: 0;
}

/* Nav links */
.site-header .nav-link {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--cream) !important;
  padding: 0.65rem 0.85rem !important;
  transition: color 0.2s ease, background-color 0.2s ease;
  border-radius: 0 !important;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus {
  color: var(--white) !important;
  background-color: rgba(255, 255, 255, 0.08);
}

.site-header .nav-link.active {
  color: var(--white) !important;
  background-color: rgba(255, 255, 255, 0.12);
}

/* Custom hamburger with gold strokes */
.navbar-toggler {
  border: 1px solid rgba(195, 181, 143, 0.5) !important;
  border-radius: 0 !important;
  padding: 0.35rem 0.6rem;
}

.navbar-toggler:focus {
  box-shadow: 0 0 0 2px rgba(195, 181, 143, 0.4) !important;
}

.navbar-toggler-icon {
  background-image: none !important;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 22px;
  height: 16px;
}

.navbar-toggler-icon::before,
.navbar-toggler-icon::after,
.navbar-toggler-icon span {
  content: '';
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--gold-light);
  border-radius: 0;
}

/* Hamburger using Bootstrap's toggler-icon custom SVG approach */
.site-header .navbar-toggler-icon {
  background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='%23c3b58f' stroke-linecap='square' stroke-miterlimit='10' stroke-width='2.5' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e") !important;
}


/* -----------------------------------------------------------------------------
   7. HERO SECTION
   ----------------------------------------------------------------------------- */

.hero {
  background-color: var(--white);
  padding: 0;
  border-bottom: none;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.8rem);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--navy-dark);
  margin-bottom: 0.5rem;
}

.hero h2,
.hero .hero-subtitle {
  font-family: var(--font-sans);
  font-size: 0.85rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--gold);
  margin-bottom: 1.25rem;
}

.hero-image {
  border: none;
  max-width: 100%;
  width: 100%;
  border-radius: 0 !important;
  object-fit: cover;
}

.hero p {
  font-size: 17px;
  color: var(--gray-text);
  line-height: 1.7;
  max-width: 640px;
}


/* -----------------------------------------------------------------------------
   8. STATS BAR
   ----------------------------------------------------------------------------- */

.stats-bar {
  background-color: var(--navy-dark);
  padding: 1.75rem 0;
  border-top: 3px solid var(--gold-light);
  border-bottom: 3px solid var(--gold-light);
}

.stat-item {
  text-align: center;
  padding: 0.5rem 1rem;
}

.stat-number {
  display: block;
  font-family: var(--font-serif);
  font-size: 2.5rem;
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.3rem;
}

.stat-label {
  display: block;
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--light-blue);
}


/* -----------------------------------------------------------------------------
   9. CONTENT CARDS
   ----------------------------------------------------------------------------- */

.content-card {
  border: 1px solid var(--cream);
  padding: var(--card-pad);
  background-color: var(--white);
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  border-radius: 0 !important;
}

.content-card:hover {
  border-color: var(--gold-light);
  box-shadow: 0 2px 12px rgba(7, 41, 70, 0.08);
}

.content-card h3,
.content-card h4 {
  color: var(--navy-dark);
  margin-bottom: 0.5rem;
}


/* -----------------------------------------------------------------------------
   10. PAGE CONTENT & PAGE HEADER
   ----------------------------------------------------------------------------- */

.page-content {
  padding: var(--section-pad) 0;
}

.page-header {
  background-color: var(--navy-dark);
  padding: 2.5rem 0 2rem;
  color: var(--white);
}

.page-header h1,
.page-header h2 {
  color: var(--white);
  font-size: clamp(1.4rem, 3.5vw, 2.2rem);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0;
}

.page-header .gold-label {
  color: var(--gold);
  margin-bottom: 0.4rem;
}

/* Blue underline accent on white (for page headers on dark) */
.page-header .underline-accent::after {
  background-color: var(--gold);
}

.page-header .breadcrumb {
  background: transparent;
  padding: 0;
  margin-bottom: 0.5rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.page-header .breadcrumb-item,
.page-header .breadcrumb-item a {
  color: var(--light-blue);
}

.page-header .breadcrumb-item.active {
  color: var(--cream);
}

.page-header .breadcrumb-item + .breadcrumb-item::before {
  color: var(--gold-light);
}


/* -----------------------------------------------------------------------------
   11. TIMELINE
   ----------------------------------------------------------------------------- */

.timeline {
  position: relative;
  padding-left: 2rem;
  border-left: 3px solid var(--gold-light);
  list-style: none;
  margin: 0;
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
}

.timeline-item {
  position: relative;
  padding-bottom: 1.75rem;
  padding-left: 1rem;
  border-bottom: 1px solid var(--cream);
  margin-bottom: 1.5rem;
}

.timeline-item:last-child {
  border-bottom: none;
  margin-bottom: 0;
  padding-bottom: 0;
}

/* Dot marker */
.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.65rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  background-color: var(--blue);
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--blue);
  border-radius: 0;
}

.timeline-date {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
  display: block;
  margin-bottom: 0.3rem;
}

.timeline-title,
.timeline-item h3 {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--navy-dark);
  margin-bottom: 0.3rem;
}

.timeline-body {
  font-size: 15px;
  color: var(--gray-text);
  margin-bottom: 0;
}


/* -----------------------------------------------------------------------------
   12. MEDAL ENTRIES
   ----------------------------------------------------------------------------- */

.medal-entry {
  border: 1px solid var(--cream);
  border-left: 4px solid var(--gold);
  padding: 1.25rem var(--card-pad);
  margin-bottom: 1rem;
  background-color: var(--white);
  transition: border-color 0.2s ease;
  border-radius: 0 !important;
}

.medal-entry:hover {
  border-color: var(--gold-light);
  border-left-color: var(--gold);
}

/* Highlighted top-tier medal */
.medal-entry.medal-top {
  background-color: rgba(192, 155, 87, 0.05);
  border-left-color: var(--gold);
}

.medal-entry-name {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--navy-dark);
  margin-bottom: 0.2rem;
}

.medal-count {
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 1px;
  display: inline-block;
  margin-left: 0.5rem;
}

.medal-entry-desc {
  font-size: 14px;
  color: var(--gray-text);
  margin-bottom: 0;
  line-height: 1.5;
}


/* -----------------------------------------------------------------------------
   13. CITATION BLOCK
   ----------------------------------------------------------------------------- */

.citation-block {
  background-color: rgba(7, 41, 70, 0.04);
  border-left: 4px solid var(--navy-dark);
  padding: 1.5rem 1.75rem;
  margin: 1.5rem 0;
  font-family: var(--font-serif);
  font-style: italic;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--navy-dark);
  border-radius: 0 !important;
}

.citation-block cite {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--gold);
}


/* -----------------------------------------------------------------------------
   14. POST BANNER (American Legion Post Section)
   ----------------------------------------------------------------------------- */

.post-banner {
  background-color: var(--navy-dark);
  padding: 3rem 1.5rem;
  text-align: center;
  border-top: 3px solid var(--gold-light);
  border-bottom: 3px solid var(--gold-light);
}

.post-banner h2,
.post-banner h3 {
  font-family: var(--font-serif);
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--gold);
  margin-bottom: 0.75rem;
}

.post-banner p {
  color: var(--light-blue);
  font-size: 16px;
  max-width: 580px;
  margin: 0 auto 1.5rem;
}

.post-banner .gold-label {
  color: var(--gold-light);
  margin-bottom: 0.5rem;
}

.btn-post {
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--blue);
  background-color: transparent;
  border: 2px solid var(--blue);
  padding: 0.65rem 1.75rem;
  border-radius: 0 !important;
  transition: background-color 0.2s ease, color 0.2s ease;
  display: inline-block;
  text-decoration: none;
}

.btn-post:hover,
.btn-post:focus {
  background-color: var(--blue);
  color: var(--white) !important;
  text-decoration: none;
}


/* -----------------------------------------------------------------------------
   15. GALLERY
   ----------------------------------------------------------------------------- */

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}

.gallery-item {
  overflow: hidden;
  border: 1px solid var(--cream);
  background-color: var(--white);
  transition: border-color 0.25s ease, box-shadow 0.25s ease;
  border-radius: 0 !important;
}

.gallery-item:hover {
  border-color: var(--gold);
  box-shadow: 0 4px 16px rgba(7, 41, 70, 0.1);
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-item:hover img {
  transform: scale(1.03);
}

.gallery-item .caption {
  padding: 0.75rem 1rem;
  font-size: 13px;
  color: var(--gray-text);
  line-height: 1.45;
  border-top: 1px solid var(--cream);
}

.gallery-item .caption strong {
  display: block;
  color: var(--navy-dark);
  font-weight: 600;
  margin-bottom: 0.15rem;
}


/* -----------------------------------------------------------------------------
   16. LIGHTBOX
   ----------------------------------------------------------------------------- */

.lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(7, 41, 70, 0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
}

.lightbox-overlay.active {
  display: flex;
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1.25rem;
  color: var(--white);
  font-size: 2rem;
  line-height: 1;
  background: none;
  border: none;
  cursor: pointer;
  opacity: 0.8;
  transition: opacity 0.2s ease;
  z-index: 10000;
  font-family: var(--font-sans);
  font-weight: 300;
}

.lightbox-close:hover {
  opacity: 1;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 85vh;
  text-align: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border: 3px solid var(--gold-light);
  display: block;
  margin: 0 auto;
}

.lightbox-caption {
  color: var(--light-blue);
  font-size: 13px;
  margin-top: 0.75rem;
  text-align: center;
  font-family: var(--font-sans);
}


/* -----------------------------------------------------------------------------
   17. BUTTONS
   ----------------------------------------------------------------------------- */

/* Primary: filled blue */
.btn-primary-custom {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--white);
  background-color: var(--blue);
  border: 2px solid var(--blue);
  padding: 0.65rem 1.75rem;
  border-radius: 0 !important;
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
  line-height: 1.4;
}

.btn-primary-custom:hover,
.btn-primary-custom:focus {
  background-color: var(--blue-hover);
  border-color: var(--blue-hover);
  color: var(--white);
  text-decoration: none;
}

/* Outline: transparent with blue border */
.btn-outline-custom {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--blue);
  background-color: transparent;
  border: 2px solid var(--blue);
  padding: 0.65rem 1.75rem;
  border-radius: 0 !important;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
  line-height: 1.4;
}

.btn-outline-custom:hover,
.btn-outline-custom:focus {
  background-color: var(--blue);
  color: var(--white);
  text-decoration: none;
}

/* Donate / high-priority red button */
.btn-donate {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--white);
  background-color: var(--red);
  border: 2px solid var(--red);
  padding: 0.65rem 1.75rem;
  border-radius: 0 !important;
  text-decoration: none;
  transition: opacity 0.2s ease;
  cursor: pointer;
  line-height: 1.4;
}

.btn-donate:hover,
.btn-donate:focus {
  opacity: 0.88;
  color: var(--white);
  text-decoration: none;
}


/* -----------------------------------------------------------------------------
   18. SITE FOOTER
   ----------------------------------------------------------------------------- */

.site-footer-border-top {
  height: 3px;
  background-color: var(--gold-light);
  width: 100%;
}

.site-footer-border-bottom {
  height: 5px;
  background-color: var(--gold-light);
  width: 100%;
}

.site-footer {
  background-color: var(--near-black);
  padding: 3rem 0 2rem;
  color: var(--gold-light);
}

.site-footer a {
  color: var(--gold-light);
  text-decoration: none;
  transition: color 0.2s ease;
}

.site-footer a:hover {
  color: var(--gold);
}

.footer-title {
  font-family: var(--font-serif);
  font-size: 0.85rem;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--white);
  margin-bottom: 0.75rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  display: inline-block;
  margin-right: 1.25rem;
  margin-bottom: 0.4rem;
}

.footer-links a {
  font-size: 13px;
  color: var(--gold-light);
}

.footer-links a:hover {
  color: var(--gold);
}

/* Vertical footer nav list */
.footer-links--vertical li {
  display: block;
  margin-right: 0;
  margin-bottom: 0.4rem;
}

.footer-copyright {
  font-size: 12px;
  color: var(--gray-text);
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(195, 181, 143, 0.2);
  text-align: center;
}

.footer-gold-label {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 2.5px;
  color: var(--gold);
  display: block;
  margin-bottom: 0.5rem;
}


/* -----------------------------------------------------------------------------
   19. SECTION UTILITIES
   ----------------------------------------------------------------------------- */

.section-navy {
  background-color: var(--navy-dark);
  color: var(--white);
}

.section-navy h2,
.section-navy h3 {
  color: var(--white);
}

.section-navy p {
  color: var(--light-blue);
}

.section-cream {
  background-color: rgba(232, 224, 205, 0.25);
}

.section-pad {
  padding: var(--section-pad) 0;
}

.section-pad-sm {
  padding: 2rem 0;
}

/* Divider rules */
.divider-gold {
  border: none;
  border-top: 1px solid var(--gold-light);
  margin: 2rem 0;
}

.divider-navy {
  border: none;
  border-top: 1px solid rgba(7, 41, 70, 0.2);
  margin: 2rem 0;
}


/* -----------------------------------------------------------------------------
   20. RESPONSIVE — 768px BREAKPOINT
   ----------------------------------------------------------------------------- */

@media (max-width: 768px) {

  /* Headings */
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.35rem; }
  h3 { font-size: 1.1rem; }

  /* Hero — stack vertically on mobile */
  .hero {
    padding: 0;
  }

  .hero .row {
    flex-direction: column;
  }

  .hero-image {
    max-width: 100%;
    max-height: 350px;
    object-fit: cover;
    object-position: top;
  }

  .hero .col-md-9,
  .hero .col-md-8,
  .hero .col-md-7 {
    text-align: center;
  }

  .hero .col-md-9 > div,
  .hero .col-md-8 > div,
  .hero .col-md-7 > div {
    padding: 1.5rem 1.25rem !important;
  }

  .hero p {
    font-size: 15px;
    text-align: left;
  }

  .hero .underline-accent::after {
    left: 50%;
    transform: translateX(-50%);
  }

  .hero .d-flex.flex-wrap {
    justify-content: center;
  }

  /* Stats bar — wrap into 2 rows on tablet */
  .stats-bar {
    padding: 1rem 0;
  }

  .stats-bar .row {
    flex-wrap: wrap;
  }

  .stats-bar .col {
    flex: 0 0 25%;
    max-width: 25%;
    margin-bottom: 0.75rem;
  }

  .stat-number {
    font-size: 1.5rem;
  }

  .stat-label {
    font-size: 8px;
    letter-spacing: 1px;
  }

  .stat-item {
    padding: 0.25rem;
  }

  /* Medal entry — stack button below on mobile */
  .medal-entry .d-flex {
    flex-direction: column;
    gap: 0.5rem;
  }

  .medal-entry .btn-outline-custom {
    align-self: flex-start;
    margin-top: 0.25rem;
  }

  /* Content cards */
  .content-card {
    padding: 1.25rem;
  }

  /* Page content — reduce side padding */
  .page-content {
    padding: 2rem 0;
  }

  /* Timeline */
  .timeline {
    padding-left: 1.25rem;
  }

  .timeline-item {
    padding-left: 0.75rem;
  }

  /* Page header */
  .page-header {
    padding: 1.5rem 0 1.25rem;
  }

  /* Gallery anchor nav */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
  }

  .gallery-item img {
    height: 180px;
  }

  /* Post banner */
  .post-banner {
    padding: 2rem 1rem;
  }

  .post-banner h3 {
    font-size: 1.1rem;
  }

  /* Footer */
  .site-footer {
    padding: 1.5rem 0;
    text-align: center;
  }

  .site-footer .row {
    text-align: center;
  }

  .site-footer .text-md-end {
    text-align: center !important;
  }

  .footer-links li {
    display: block;
    margin-right: 0;
    margin-bottom: 0.25rem;
  }

  /* Citation block */
  .citation-block {
    padding: 1rem 1.25rem;
    font-size: 14px;
  }
}


/* -----------------------------------------------------------------------------
   21. RESPONSIVE — 576px BREAKPOINT
   ----------------------------------------------------------------------------- */

@media (max-width: 576px) {

  /* Headings even smaller */
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.2rem; }

  /* Hero text */
  .hero .col-md-9 > div,
  .hero .col-md-8 > div,
  .hero .col-md-7 > div {
    padding: 1.25rem 1rem !important;
  }

  /* Stats — 3 columns top, 4 bottom on small phones */
  .stats-bar .col {
    flex: 0 0 calc(100% / 3);
    max-width: calc(100% / 3);
  }

  .stat-number {
    font-size: 1.25rem;
  }

  .stat-label {
    font-size: 7px;
    letter-spacing: 0.5px;
  }

  /* Gallery — 2 columns */
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }

  .gallery-item img {
    height: 140px;
  }

  .gallery-item .caption {
    font-size: 11px;
    padding: 0.5rem;
  }

  /* Medal entries */
  .medal-entry {
    padding: 1rem;
  }

  /* Buttons full-width */
  .btn-primary-custom,
  .btn-outline-custom,
  .btn-donate,
  .btn-post {
    display: block;
    width: 100%;
    text-align: center;
    margin-bottom: 0.5rem;
  }

  /* Post banner */
  .post-banner {
    padding: 1.5rem 1rem;
  }

  /* Sidebar images */
  .col-lg-4 img {
    margin-bottom: 1rem;
  }

  /* Content card */
  .content-card {
    padding: 1rem;
    margin-bottom: 0.75rem;
  }

  /* Gallery anchor nav */
  nav .d-flex.gap-4 {
    gap: 1rem !important;
  }
}


/* -----------------------------------------------------------------------------
   22. TAG FILTER BUTTONS
   ----------------------------------------------------------------------------- */

.tag-btn {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--gray-text);
  background: transparent;
  border: 1px solid var(--cream);
  padding: 0.35rem 0.75rem;
  cursor: pointer;
  transition: all 0.2s;
  border-radius: 0;
}

.tag-btn:hover {
  border-color: var(--blue);
  color: var(--blue);
}

.tag-btn.active {
  background: var(--navy-dark);
  border-color: var(--navy-dark);
  color: #fff;
}

.gallery-item.hidden {
  display: none;
}


/* -----------------------------------------------------------------------------
   23. PRINT STYLES
   ----------------------------------------------------------------------------- */

@media print {
  .site-header,
  .site-footer,
  .lightbox-overlay,
  .navbar-toggler {
    display: none !important;
  }

  body {
    font-size: 12pt;
    color: #000;
  }

  .page-header {
    background-color: transparent !important;
    color: #000 !important;
    border-bottom: 2px solid #000;
    padding: 1rem 0;
  }

  .page-header h1,
  .page-header h2 {
    color: #000 !important;
  }

  a {
    color: #000;
    text-decoration: underline;
  }

  .citation-block {
    border-left: 3px solid #000;
    background: transparent;
  }
}
