/* Start Layout Styles */

body {
  margin: 0 auto;
  max-width: 1200px; /* or your preferred width */
  padding: 20px;
}

.page-wrapper {
  margin: 0 auto;
  max-width: 1200px;
  padding: 20px;
}

.visually-hidden {
position: absolute !important;
width: 1px;
height: 1px;
padding: 0;
margin: -1px;
overflow: hidden;
clip: rect(0 0 0 0);
white-space: nowrap;
border: 0;
color: #000; /* Ensures screen readers detect it properly */
background-color: transparent;
}

.image-caption,
#image-caption {
min-height: 5.5em; /* Extended to handle your full “Angels of the Night” text */
max-width: 90%;
overflow-wrap: break-word;
text-align: center;
padding: 0.5em 1em;
margin: 0 auto;
font-size: 0.7em;
line-height: 0.9;
opacity: 1;
transition: opacity 0.5s ease-in-out;
}

.image-title,
#image-title {
min-height: 2.4em; /* Enough room for 2 lines based on your line-height */
line-height: 1.2;
display: block;
text-align: center;
}

/* Ensuring all content centers properly */
body {
font-family: "Arial", sans-serif;
font-size: 1.125rem; /* Equivalent to 18px */
background-color: #FDF997 !important;
color: #003366; /* Darker blue for better contrast */
line-height: 1.6;
margin-left: auto;
margin-right: auto;
padding-left: 1ch; /* Set margin to keep text on page */
padding-right: 2ch;
overflow-x: hidden; /* Stops left/right scrolling */
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
width: 95%;
max-width: 100vw; /* Prevents overflow */
}

/* Will force a line break without using <br>*/
.spacer {
margin-top: 1rem;
}

.spacer-sm {
margin-top: 0.5rem;
}

.spacer-lg {
margin-top: 2rem;

}

.spacer {
margin-top: 0.5rem;

}

/* Mobile Font Scaling Fix */
@media (max-width: 768px) {
body {
font-size: 17px; /* Smooth transition */
}
}

@media (max-width: 480px) {
body {
font-size: 16px; /* Keeps readability intact */
}
}
/* Heading Styles */
h1, h2, h3 {
  font-size: clamp(1.5rem, 2vw, 3rem); /* Ensures it doesn't get too large */
  font-weight: bold;
  color: #003366;
  margin-top: 10px;
  margin-bottom: 0.5rem; /* Added for vertical spacing control */
  line-height: 1.2;       /* Added for tighter line spacing */
  font-family: 'ArialWeb', Arial, sans-serif; /*  Fix to activate preloaded font */
}

h1 {
  text-shadow: 1px 1px 2px black;
}

/* Fix Font Size for h4 Inside Links */
a h4 {
  font-size: 3.6vw; /* Adjusted for better proportion */
  color: #003366;
  text-decoration: none !important;
}

.section-center {
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column; /* Centers section content */
}

h2 + h3 {
  margin-top: 0.25rem;
}

/* Add consistent styling for h2 inside sections */
section h2 {
  font-size: clamp(1.5rem, 2vw, 3rem);
  font-weight: bold;
  line-height: 1.2;
  color: #003366;
  font-family: 'ArialWeb', Arial, sans-serif;
  margin-top: 10px;
  margin-bottom: 0.5rem;
  text-align: center;
}

.text-image-container {
display: flex;
align-items: center; /* Aligns text and image vertically */
justify-content: flex-start; /* Keeps text on the left */
gap: 20px; /* Adds spacing between text and image */
flex-wrap: wrap; /* Allows wrapping on smaller screens */
}

.text-image-container img {
  aspect-ratio: 6 / 1;
  object-fit: contain;
  display: block;
}

.text-image-container {
  min-height: 112px;
}


/* Header */
header {
padding: 20px;
color: #003366;
}

/* Main Content */
main {
max-width: 100%; /* Adjust size relative to viewport */
overflow-x: hidden;
margin: auto; /* Centers the content */
padding: 20px;
white-space: normal;
}

/* Footer */
footer {
padding: 20px; /* Increased padding for more space */
background-color: #FDF997;
color: #003366;
}

/* Footer Links */
.footer-links a, .footer-links button {
font-size: 1.6rem; /* Increase text size */
font-weight: bold;
padding: 12px 24px; /* Make links/buttons slightly larger */
border: 8px solid #003366; /* Thicker border */
border-radius: 10px; /* Adjust border radius for rounded edges */
display: inline-block;
margin: 8px; /* Space between links */
transition: all 0.3s ease-in-out; /* Smooth transition effect */
}


/* Hover + Focus Effect */
.footer-links a:hover, .footer-links a:focus,
.footer-links button:hover, .footer-links button:focus {
  background-color: #003366; /* Dark blue background on hover/focus */
  color: #FDF997; /* Text color reverses */
  transform: scale(1.1); /* Slightly enlarges */
}

/* Image Hover Effect */
.custom-img {
  display: inline-block;
  transition: transform 0.3s ease-in-out;
  max-width: 100%; /* Ensures responsiveness */
  height: auto;
}

.custom-img:hover,
.custom-img:focus {
  transform: scale(1.1) !important; /* Reducing hover scale for mobile */
}

/* Jumping Effect for Image */
.jump-image {
  display: inline-block;
  transition: transform 0.3s ease-in-out;
  max-width: 100%;
  height: auto;
  border-radius: 10px;
}

.jump-image:hover,
.jump-image:focus {
  transform: scale(1.1) !important; /* Smaller hover scale */
}

/* Jumping Effect for Text */
.jump-effect {
  display: inline-block;
  font-size: 1.8rem !important; /* Ensures larger default text */
  font-weight: bold;
  transition: transform 0.3s ease-in-out, font-size 0.3s ease-in-out;
}

.jump-effect:hover,
.jump-effect:focus {
  transform: scale(1.1);
  font-size: 2rem !important;
}

/* Container Controls */
.text-image-container {
  max-width: 90%;
  margin: 0 auto;
}

/* Mobile Adjustments */
@media (max-width: 600px) {
  .custom-img:hover,
  .custom-img:focus,
  .jump-image:hover,
  .jump-image:focus {
    transform: scale(1.05) !important; /* Minimizing expansion on smaller screens */
  }
}

button:focus,
a:focus,
.custom-img:focus,
.jump-image:focus,
.jump-effect:focus {
  outline: 2px dashed #FDF997;
  outline-offset: 4px;
}

/* Ensure full-width for key elements */
.hero,
.slideshow-container,
main,
footer {
width: 100%;
max-width: 100vw; /* Prevents overflow */
}

/* Improve Image & Caption Styling */
.dustoff-image {
max-width: 100%;
height: auto;
display: block;
margin: auto;
object-fit: contain;
}

/* Dustoff Acronym Section */
#dustoff-acronym-section {
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
max-width: 100%;
width: 100%;
}

/* Responsive Layout Fix for Mobile */
@media (max-width: 768px) {
body,
main {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
}

h1 {
font-size: 20px; /* Switching to 'px' for better control */
}

h2 {
font-size: 18px;
}

h3 {
font-size: 16px;
}

main {
width: 95%;
padding: 10px;
}
}

/* Mobile Scaling Fix for Portrait Mode */
@media (max-width: 480px) {
body {
font-size: 16px; /* Consistent scaling with px */
}

h1 {
font-size: 18px;
}

h2 {
font-size: 16px;
}

.dustoff-image {
width: 100%;
height: auto;
max-width: 90%;
display: block;
margin: auto;
object-fit: contain;
}
}

/*.dustoff-banner {
 # max-width: 100%;
 #height: auto;
} */

.visitor-heading {
  font-size: 2rem;
  color: #222;
  background-color: #FCF897;
  margin-bottom: 0.5rem;
}

.visitor-count {
  font-size: 2.5rem;
  font-weight: bold;
  letter-spacing: 0.25em;
}