
/* ====================== Global Styles =========================== */
html {
  -webkit-text-size-adjust: 100%; /* Allow text scaling */
  -ms-text-size-adjust: 100%;
  text-size-adjust: 100%;
  box-sizing: border-box;
  scroll-behavior: smooth;
}
*, *::before, *::after {
  box-sizing: inherit;
}

body {
  font-family: Arial, sans-serif;
  font-size: 16px;
  background-color: #FBF796;
  color: #003366;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  max-width: 100vw;
  overflow-x: hidden;
}

.page-wrapper {
  max-width: 1200px;
  margin: 0 auto;
}
.content-wrapper {
  max-width: 90%;
  margin: 0 auto;
  background-color: #FBF796;
  padding: 0;
}

/* =========================== Typography =========================== */
h1, h2, h3, h4, h5, h6, p, em {
  color: #003366;
  margin: 10px 0;
  text-align: center;
}
h1 {
  font-size: 60px;
  text-decoration: underline;
}
h2, h3, h4, h5 {
  font-size: 40px;
}
h6 {
  font-size: 40px;
  font-style: italic;
}
p {
  font-size: 40px;
  font-weight: bold;
}
em {
  font-style: italic;
  font-weight: bold;
  display: block;
  font-size: 40px;
}

/* =========================== Images & Media =========================== */
img {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 2px auto;
  background-color: #FBF796;
  padding: 2px;
  transition: transform 0.3s ease;
}
.jump-on-hover:hover {
  transform: scale(1.25);
  z-index: 10;
}
.audio-label {
  font-size: 2.25rem;
  font-weight: bold;
  color: #003366;
  display: inline-block;
  margin-top: 10px;
}

/* ========================= Slideshow & Captions ======================== */
.slideshow-container {
  max-width: 700px;
  margin: 20px auto;
  padding: 10px;
  background-color: #FBF796;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.caption-box {
  background-color: #FBF796;
  padding: 10px;
  margin-top: 10px;
  font-size: 1rem;
  line-height: 1.4;
  max-width: 1200px;
  min-height: 300px;
  max-height: 300px;
  overflow-y: hidden;
}
.caption-box p {
  color: #003366;
}

/* =========================== Skip Links =========================== */
.skip-link {
  position: absolute;
  left: -10000px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.skip-link:focus {
  position: relative;
  left: auto;
  width: auto;
  height: auto;
  padding: 8px;
  font-size: 40px;
  background-color: #003366;
  color: #FBF796;
  font-weight: bold;
  text-decoration: underline;
  z-index: 1000;
}

/* =========================== Buttons =========================== */
button {
  font-family: Arial, sans-serif;
  font-size: 1rem;
  color: #003366;
  background-color: #FBF796;
  padding: 10px 20px;
  cursor: pointer;
  transition: background-color 0.3s ease, color 0.3s ease;
}
button:hover {
  background-color: #003366;
  color: #FBF796;
}
button:focus {
  outline: 2px solid #003366;
  outline-offset: 4px;
}
.nav-buttons {
  margin-top: 15px;
  display: flex;
  justify-content: center;
  gap: 20px;
}
.nav-buttons button {
  background-color: #003366;
  color: #FBF796;
  border: none;
  padding: 14px 28px;
  font-size: 1.25rem;
  border-radius: 6px;
}
.nav-buttons button:hover {
  transform: scale(1.05);
}

/* =========================== Accessibility Icon =========================== */
.accessibility-icon {
  width: 100px;
  height: auto;
  cursor: pointer;
}
.accessibility-icon:hover {
  transform: scale(1.2);
}

/* =========================== Focus Styles =========================== */
:focus-visible {
  outline: 3px solid #003366;
  outline-offset: 3px;
}
a:focus-visible, button:focus-visible {
  background-color: #003366;
  color: #FBF796;
}

/* =========================== Miscellaneous =========================== */
.full-width-line {
  width: 90%;
  height: 4px;
  background-color: #003366;
  border: none;
  margin: 2px auto;
}
.hidden {
  display: none;
}
audio {
  width: 100%;
  max-width: 600px;
  margin: 10px auto;
  display: block;
}

/* =========================== Responsive =========================== */
@media (max-width: 600px) {
  body {
    font-size: 16px;
    padding: 10px;
  }
  h1 {
    font-size: 36px;
  }
  h2 {
    font-size: 1.8em;
  }
  .slideshow-container,
  .caption-box {
    max-width: 100%;
    margin: 10px auto;
    padding: 5px;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    transition: none !important;
  }
}
@media (prefers-contrast: more) {
  body {
    background-color: #003366;
    color: #FBF796;
  }
  .content-wrapper {
    background-color: #003366;
  }
  button, .nav-buttons button {
    background-color: #FBF796;
    color: #003366;
  }
  a:focus-visible, button:focus-visible {
    background-color: #FBF796;
    color: #003366;
  }
}

.square-container {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}
.square-container img {
  width: 100%;
  height: 100%;
  object-fit: contain; /* or cover if you want to crop */
}

.square-container .caption-box {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #003366;
  color: #FBF796;
  padding: 10px;
  text-align: center;
}

.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;
}


/* ========================= YouTube Video Section ========================= */
#youtube_video_Section {
  text-align: center;
  padding: 20px;
  background-color: #FBF796; /* Matches your theme */
}

#youtube_video_Section h2 {
  font-size: 2rem;
  margin-bottom: 15px;
  color: #003366;
}

/* Video container for responsive iframe */
.video-container {
  position: relative;
  width: 100%;
  max-width: 800px; /* Limit max width for large screens */
  margin: 0 auto;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Thumbnail image styling */
#youtube_video_Section img {
  max-width: 100%;
  height: auto;
  margin-top: 20px;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

#youtube_video_Section img:hover {
  transform: scale(1.05);
}

/* ========================= Responsive Adjustments ========================= */
@media (max-width: 768px) {
  #youtube_video_Section h2 {
    font-size: 1.5rem;
  }
}

@media (max-width: 480px) {
  #youtube_video_Section {
    padding: 10px;
  }
  #youtube_video_Section h2 {
    font-size: 1.2rem;
  }
}


#aircrew-body-armor {
  font-size: 1.2rem; /* Base size for all text */
  color: #003366;
  line-height: 1.6;
  text-align: center; /* Centers all text */
  max-width: 1200px;
  margin: 0 auto;
  padding: 1rem;
}

/* Force all child elements to inherit size and alignment */
#aircrew-body-armor h2,
#aircrew-body-armor h3,
#aircrew-body-armor p,
#aircrew-body-armor ul,
#aircrew-body-armor li,
#aircrew-body-armor table,
#aircrew-body-armor th,
#aircrew-body-armor td {
  font-size: inherit !important;
  text-align: inherit !important;
}
