@import url('https://fonts.googleapis.com/css2?family=Roboto+Condensed:wght@400;700&display=swap');

/* =============================== */
/*          GLOBAL STYLES          */
/* =============================== */

html, body {
  height: 100%;
  margin: 0;
  padding: 0;
}

body {
  font-family: Arial, Helvetica, sans-serif;
  background-color: #f4f4f4;
  color: #222;
  display: flex;
  flex-direction: column;
}


/* =============================== */
/*      SITE HEADER + TOP LOGO     */
/* =============================== */


/* Base header for all pages */
header {
  background-color: #285582;
  color: white;
  padding: 25px 0 10px;
  text-align: center;
}

/* Static header layout (all NON-home pages) */
/* Works for:
   1) <header><div class="site-header">...</div></header>
   2) <header class="site-header">...</header>              */
header.site-header:not(.hero),
header:not(.hero) .site-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}




/* =============================== */
/*   HEADER SILHOUETTE BACKDROP    */
/*   (All pages EXCEPT HOME HERO)  */
/* =============================== */
/* NOTE: CSS file is /assets/css/style.css, so use ../images/ paths. */
body:not(.home) > header:not(.hero){
  position: relative;
  isolation: isolate; /* keeps blend effects contained */
}

body:not(.home) > header:not(.hero)::before{
  content: "";
  position: absolute;
  inset: 0;
  background: url("../images/sil.webp") center / cover no-repeat;
  opacity: 0.22;
  mix-blend-mode: screen;
  pointer-events: none;
  z-index: 0;
}

/* Keep TOP header contents above silhouette */
body:not(.home) > header:not(.hero) > *{
  position: relative;
  z-index: 1;
}


/* Mobile tweak: slightly stronger, fit better in short headers */
@media (max-width: 768px){
  body:not(.home) > header:not(.hero)::before{
    opacity: 0.34;
    background-size: contain;
    background-position: center;
  }
}

/* Static logo image */
header:not(.hero) .site-logo {
  max-width: 640px;   /* desktop size */
  width: 100%;
  height: auto;
  display: block;
}

/* =============================== */
/*   MAIN LOGO: ROUNDED + LIFTED   */
/* =============================== */
/* Add class="site-logo main-logo-lift" to the main logo <img> */

/* Non-hero header logo */
header:not(.hero) .site-logo.main-logo-lift{
  border-radius: 0px;
  overflow: visible; /* clips corners cleanly */
  background: rgba(255,255,255,0.98);

  /* stronger lift */
  box-shadow:
    0 18px 40px rgba(0,0,0,0.28),
    0 6px 14px rgba(0,0,0,0.18);

  /* subtle edge highlight */
  outline: 2px solid rgba(255,255,255,0.18);
  outline-offset: -2px;

  /* lift it upward a bit */
  transform: translateY(-10px);
}

/* Hero logo (home page) if you add main-logo-lift to that <img> too */
.hero-content img.main-logo-lift{
  border-radius: 22px;
  overflow: hidden;
  background: rgba(255,255,255,0.98);

  box-shadow:
    0 18px 40px rgba(0,0,0,0.28),
    0 6px 14px rgba(0,0,0,0.18);

  outline: 2px solid rgba(255,255,255,0.18);
  outline-offset: -2px;

  transform: translateY(-10px);
}

/* Static logo mobile tweak */
@media (max-width: 768px) {
  header:not(.hero) .site-logo {
    max-width: 320px;
  }

  /* Mobile: slightly less lift + smaller radius */
  header:not(.hero) .site-logo.main-logo-lift,
  .hero-content img.main-logo-lift{
    border-radius: 16px;
    transform: translateY(-6px);
    box-shadow:
      0 14px 30px rgba(0,0,0,0.26),
      0 5px 12px rgba(0,0,0,0.16);
  }
}

/* ========================================= */
/*        HOME PAGE HERO WITH VIDEO          */
/* ========================================= */

.hero {
  position: relative;
  background-color: #285582;   /* blue haze background */
  color: white;
  text-align: center;
  overflow: hidden;
  min-height: 430px;           /* shows more of the shot */
}

/* Background video - full width, pushed back */
.hero-video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
  opacity: 0.60;               /* haze strength */
  z-index: 0;
  pointer-events: none;
}

/* Logo container on top of video */
.hero-content {
  position: relative;
  z-index: 1;
  max-width: 980px;
  margin: -40px auto 0;        /* pulls logo up */
  padding: 0 0 90px;           /* bottom space under logo */
}

/* Logo image inside hero */
.hero-content img {
  width: auto;
  max-width: 780px;            /* how big the logo can get */
  height: auto;
  display: block;
  margin: 0 auto;
}

/* Sound toggle button (shown only if autoplay blocked) */
.sound-toggle {
  position: absolute;
  right: 20px;
  bottom: 15px;
  padding: 8px 14px;
  font-size: 0.9rem;
  border: none;
  border-radius: 4px;
  background-color: rgba(0, 0, 0, 0.6);
  color: #fff;
  cursor: pointer;
  z-index: 2;
  display: none;
}

.sound-toggle:hover {
  background-color: rgba(0, 0, 0, 0.8);
}


/* Hero-specific mobile tweaks */
@media (max-width: 768px) {

  /* Shorter hero on phones so it doesn't eat the whole screen */
  .hero {
    min-height: 240px;            /* tweak 220-260 to taste */
  }

  /* Keep the video visible on mobile */
  .hero-video {
    display: block;
    opacity: 0.5;                 /* haze strength over video */
  }

  /* Tighter layout around the logo */
  .hero-content {
    margin: 0 auto;               /* cancels the desktop -40px margin */
    padding: 20px 0 30px;
    max-width: 90%;
  }

  .hero-content img {
    max-width: 320px;             /* mobile logo size */
    height: auto;
  }

  /* Don't override .sound-toggle here - JS will show it when needed */
}







/* =============================== */
/*           NAVIGATION            */
/* =============================== */
/* Icon-based top nav */
nav.icon-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 14px;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap; /* helps on smaller screens */
}

nav.icon-nav li {
  margin: 0;
  padding: 0;
}

nav.icon-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px;
  border-radius: 6px;
}

nav.icon-nav a:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 3px;
}

nav.icon-nav .nav-icon {
  height: 54px;
  width: auto;
  display: block;
}



nav {
  background-color: #1f3e63;
}

nav ul {
  list-style: none;
  margin: 0;
  padding: 10px;
  display: flex;
  flex-wrap: wrap;        /* allow wrapping on small screens */
  gap: 20px;
  justify-content: center;
}

nav ul li {
  margin: 0;
}

nav ul li a {
  color: white;
  text-decoration: none;
  font-weight: bold;
  padding: 8px 12px;
  display: inline-block;
}

nav ul li a:hover {
  background-color: #16314c;
  border-radius: 5px;
}

/* Mobile adjustments for nav */
@media (max-width: 768px) {
  nav ul {
    padding: 8px 6px;
    gap: 10px;
  }

  nav ul li a {
    font-size: 0.9rem;
    padding: 6px 8px;
  }
}

/* =============================== */
/*        MAIN CONTENT AREA        */
/* =============================== */

main {
  max-width: 1000px;
  margin: 12px auto 4px;     /* tightened top & bottom */
  padding: 18px 26px;
  background-color: #ffffff;
  box-shadow: 0 0 8px rgba(0, 0, 0, 0.1);
}

/* =============================== */
/*       HOME WELCOME LAYOUT       */
/* =============================== */

.welcome-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-start;
}

/* Image column */
.welcome-image img {
  max-width: 480px;    /* welcome image size */
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid #d0d0d0;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.15);
}

/* Text column */
.welcome-text {
  flex: 1;
  min-width: 260px;
}

/* Mobile: stack image over text */
@media (max-width: 768px) {
  .welcome-layout {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .welcome-text {
    text-align: left;
    max-width: 100%;
  }
}

/* =============================== */
/*            FOOTER               */
/* =============================== */

footer {
  background-color: #285582;
  color: white;
  padding: 8px;          /* slightly tighter */
  text-align: center;
  margin-top: 6px;       /* small gap below main */

}/* Footer links (keep high contrast on the blue footer) */
footer a:link,
footer a:visited{
  color: #ffffff;
}

footer a:hover,
footer a:focus{
  color: #ffffff;
  text-decoration: underline;
}
/* =============================== */
/*   SITE FOOTER (IPC badge layout) */
/* =============================== */

footer.site-footer{
  padding: 18px 12px;
}

footer.site-footer .footer-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

footer.site-footer .footer-inner p{
  margin: 0;
}

footer.site-footer .ipc-badge{
  position: static;
  display: inline-block;
  border-radius: 12px;
  padding: 8px;
  background: rgba(255,255,255,0.85);
  backdrop-filter: blur(4px);
  box-shadow: 0 6px 18px rgba(0,0,0,0.18);
  text-decoration: none;
  transition: transform 150ms ease, box-shadow 150ms ease;
}

footer.site-footer .ipc-badge img{
  display: block;
  width: 92px;
  height: auto;
}

footer.site-footer .ipc-badge:focus,
footer.site-footer .ipc-badge:hover{
  transform: translateY(-1px);
}

@media (max-width: 720px){
  footer.site-footer .footer-inner{
    flex-direction: column;
    justify-content: center;
    text-align: center;
  }
}


/* =============================== */
/*       ARTIFACT SPEC TABLE       */
/* =============================== */

.spec-table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 20px;
  background-color: #ffffff;
  border: 1px solid #d0d0d0;
}

.spec-table th {
  background-color: #285582;
  color: white;
  padding: 10px;
  text-align: left;
  font-size: 1.1em;
}

.spec-table td {
  padding: 8px 10px;
  border-bottom: 1px solid #d0d0d0;
}

.spec-table tr:last-child td {
  border-bottom: none;
}

.spec-table td:first-child {
  font-weight: bold;
  width: 30%;
}

/* Typography spacing */
h2 {
  margin-top: 0;
  margin-bottom: 10px;
}

h3 {
  margin-top: 25px;
  margin-bottom: 8px;
}

/* =============================== */
/* =============================== */
/*     ARTIFACT IMAGE GRID         */
/* =============================== */

/* Responsive grid used across Artifacts, Field Gear, and Restoration pages */
.image-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 18px;
  margin: 18px 0 26px;
  padding: 0;
}

/* Optional: force clean "rows" of 4 on desktop (8 images = 2 rows of 4)
   and 2 on smaller screens for easier viewing. Add class="grid-4" to the grid. */
.image-grid.grid-4{
  grid-template-columns: repeat(4, 1fr);
}

@media (max-width: 980px){
  .image-grid.grid-4{
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 560px){
  .image-grid.grid-4{
    grid-template-columns: 1fr;
  }
}

.image-grid figure{
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.image-grid a{
  display: block;
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 0;
  box-shadow: none;
  border-radius: 0;
}

/* Thumbnails: rounded, no white "card" behind */
.image-grid img{
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 18px;
  box-shadow: 0 10px 22px rgba(0,0,0,0.12);
}

.image-grid figcaption{
  margin-top: 8px;
  font-size: 0.95rem;
  color: #555;
  text-align: center;
}

/* =============================== */
/*            LIGHTBOX             */
/* =============================== */

/* Hash-based lightbox: any element with class="lightbox" + an id, opened via href="#that-id" */
.lightbox{
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.86);
  z-index: 9999;
  padding: 20px;
  cursor: zoom-out;
  text-decoration: none; /* if the lightbox is an <a> */
}

.lightbox:target{
  display: flex;
}

.lightbox-content{
  max-width: min(92vw, 1200px);
  max-height: 90vh;
}

/* Support both patterns:
   1) <a class="lightbox" id="img1"><span class="lightbox-content"><img ...></span></a>
   2) <div class="lightbox" id="img1"><img ...><a class="lightbox-close" ...>×</a></div>
*/
.lightbox-content img,
.lightbox > img{
  display: block;
  max-width: 100%;
  max-height: 90vh;
  width: auto;
  height: auto;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
}

/* Optional close button for legacy pages (your newer pages can omit it) */
.lightbox-close{
  position: absolute;
  top: 14px;
  right: 18px;
  font-size: 2.25rem;
  color: #fff;
  text-decoration: none;
  line-height: 1;
  padding: 4px 10px;
  border-radius: 10px;
  background: rgba(0,0,0,0.35);
}

.lightbox-close:hover{
  background: rgba(0,0,0,0.55);
}
/* ===============================
   LIGHTBOX IMAGE SIZE CONTROL
   (prevents "giant" images)
   =============================== */

.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 88vh;

  width: auto !important;
  height: auto !important;

  object-fit: contain;
  display: block;
  margin: 0 auto;
}

/*       COUNTRY PAGE SECTIONS     */
/* =============================== */

.country-section {
  margin-top: 20px;
  margin-bottom: 20px;
}

.country-section ul {
  margin: 0;
  padding-left: 20px;
}

.country-section li {
  margin-bottom: 6px;
}

/* =============================== */
/*          GENERIC FIGURE         */
/* =============================== */

figure {
  margin: 0;
  padding: 0;
  text-align: center;
  max-width: 100%;
}

/* Article titles on the Articles & References page */
.article-title {
  font-family: "Georgia", "Times New Roman", serif;
  font-size: 1.35rem;
  color: #264a7e;          /* slightly darker blue to stand out */
  margin-top: 2em;
  margin-bottom: 0.3em;
  border-bottom: 2px solid #d0d0d0;
  padding-bottom: 0.2em;
}

/* Extra breathing room between articles */
.reference-article {
  margin-bottom: 2.5em;
}

.about-link-home{
  text-align: center;
  margin: 2.5rem 0 1.5rem;
  font-size: 1.05rem;
}

.about-link-home a{
  text-decoration: none;
  font-weight: 600;
  color: inherit; /* link color is controlled below */
}

.about-link-home a:hover{
  text-decoration: underline;
}

.section-title,
main > h2,
main > section > h2,
main > h3,
main .country-section > h3{
  font-family: "Trebuchet MS","Segoe UI",Arial,sans-serif;
  color: rgb(40,85,130);
  font-weight: 900;
  letter-spacing: 0.3px;
  margin-top: 18px;
  margin-bottom: 10px;
  font-size: 1.6rem;
  text-transform: none;
}

/* =============================== */
/*          LINK COLORS            */
/* =============================== */
/* Military OD links */
main a:link,
main a:visited,
.about-link-home a:link,
.about-link-home a:visited {
  color: #3E4F18; /* deep OD green */
}

main a:hover,
main a:focus,
.about-link-home a:hover,
.about-link-home a:focus {
  color: #6B8E23; /* slightly brighter OD for hover */
  text-decoration: underline;
}

/* =============================== */
/*      LINK FONT (Option B)       */
/* =============================== */
/* Field manual links: condensed + uppercase */
main a,
.about-link-home a {
  font-family: "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
  font-weight: 700;
  letter-spacing: 0.4px;
  text-transform: uppercase;
  font-size: 1.05em;
}




/* SEO accessibility helper */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}


/* ========================================= */
/*   HOME HERO TITLE: RUSTED METAL (BOLDER)  */
/*   Ensures the visible text title shows.   */
/* ========================================= */
.home .hero-content{
  text-align: center;
}

.home header.hero .site-title{
  display: inline-block;
  font-family: "Copperplate", "Copperplate Gothic Light", "Georgia", "Times New Roman", serif;
  font-weight: 900;
  letter-spacing: 1.6px;
  text-transform: uppercase;
  line-height: 1.05;
  font-size: clamp(2.05rem, 4vw, 3.15rem);
  margin: 10px 0 0;
  padding: 0;

  /* Fallback color if clipping isn't supported */
  color: #b4572a;

  /* Extra weight via shadow + micro outline */
  text-shadow:
    0 1px 0 rgba(255,255,255,0.18),
    0 2px 0 rgba(0,0,0,0.55),
    0 12px 22px rgba(0,0,0,0.28),
    0 0 1px rgba(0,0,0,0.65);
}

@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .home header.hero .site-title{
    background-image:
      linear-gradient(180deg,
        #f2e5d8 0%,
        #c7834f 18%,
        #7b3c1f 55%,
        #e1b089 100%
      ),
      radial-gradient(circle at 22% 35%, rgba(0,0,0,0.28) 0 12px, transparent 13px),
      radial-gradient(circle at 68% 62%, rgba(255,255,255,0.18) 0 10px, transparent 11px),
      radial-gradient(circle at 55% 18%, rgba(90,40,18,0.35) 0 16px, transparent 17px),
      repeating-linear-gradient(-12deg, rgba(0,0,0,0.12) 0 2px, transparent 2px 6px);

    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;

    /* Bolder "forged edge" */
    -webkit-text-stroke: 1.25px rgba(20,10,6,0.72);
    filter: saturate(1.05) contrast(1.08);
  }
}

/* Mobile sizing so it stays readable */
@media (max-width: 768px){
  .home header.hero .site-title{
    letter-spacing: 1.1px;
    font-size: clamp(1.55rem, 6vw, 2.15rem);
    margin-top: 8px; /* will be fixed below if typo exists */
  }
}

/* Fix accidental typo if any (safe override) */
@media (max-width: 768px){
  .home header.hero .site-title{ margin-top: 8px; }
}

/* Accessibility helper */
.visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0;}




/* ============================================ */
/*   HOME PAGE TITLE: RUSTED METAL (THICKER)    */
/*   Visible H1 above the Welcome section       */
/* ============================================ */
.home .home-title{
  font-family: "Copperplate", "Copperplate Gothic Light", "Georgia", "Times New Roman", serif;
  font-weight: 900;
  letter-spacing: 1.2px; /* slightly tighter for longer title */
  text-transform: uppercase;
  line-height: 1.08;

  /* responsive sizing */
  font-size: clamp(1.35rem, 2.6vw, 2.15rem);

  margin: 10px 0 18px;
  text-align: center;

  /* Always-visible fallback (rust) */
  color: #b4572a;

  /* "Thicker" look via layered shadows */
  text-shadow:
    0 1px 0 rgba(255,255,255,0.20),
    0 2px 0 rgba(0,0,0,0.55),
    0 3px 0 rgba(0,0,0,0.45),
    0 10px 18px rgba(0,0,0,0.22),
    0 0 1px rgba(0,0,0,0.75);
}

/* Textured metal look only where fully supported (Chrome/Edge/Safari) */
@supports (-webkit-background-clip: text) and (-webkit-text-fill-color: transparent) {
  .home .home-title{
    background-image:
      linear-gradient(180deg,
        #f2e5d8 0%,
        #c7834f 18%,
        #7b3c1f 55%,
        #e1b089 100%
      ),
      radial-gradient(circle at 22% 35%, rgba(0,0,0,0.22) 0 12px, transparent 13px),
      radial-gradient(circle at 68% 62%, rgba(255,255,255,0.15) 0 10px, transparent 11px),
      repeating-linear-gradient(-12deg, rgba(0,0,0,0.12) 0 2px, transparent 2px 6px);

    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;

    /* Thicker forged edge */
    -webkit-text-stroke: 1.45px rgba(20,10,6,0.76);
    filter: saturate(1.05) contrast(1.08);
  }
}

/* Mobile: keep it readable and prevent crowding */
@media (max-width: 768px){
  .home .home-title{
    letter-spacing: 0.8px;
    font-size: clamp(1.15rem, 4.3vw, 1.55rem);
    margin: 10px 0 14px;
    padding: 0 10px; /* avoid touching edges */
  }
}
/* Post-nominal credential (IPC) */
.postnominal{
  margin-left: 0.15rem;     /* small, consistent gap */
  font-variant: small-caps;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: #285582;           /* matte blue (RGB 40,85,130) */
  font-size: 0.85em;        /* slightly smaller */
  font-style: italic;       /* requested */
  white-space: nowrap;
}
