/* General body styles */
html,
body {
  font-family: sans-serif;
  font-size: 14px;
  /* Set base font size to 10px */
  min-height: 100%;
  width: 100%;
  padding: 0;
  margin: 0;
  color: #ffffff !important;
  /* Set font color to white */
}

body {
  display: flex;
  flex-direction: column;
}

html {
  font-size: clamp(14px, 0.72vw, 18px);
}

h1 {
  font-size: 2rem;
  /* 2rem = 28px (2 * 14px) */
}

p {
  font-size: 1rem;
  /* 1rem = 14px (base font size) */
}

.nav-item {
  font-size: 0.857rem;
  /* 0.857rem ≈ 12px (12 / 14 ≈ 0.857) */
}

nav.top-nav {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  min-width: 0;
}

nav.top-nav a {
  display: flex;
  align-items: center;
  margin-right: 0;
  padding: 0 4px;
  color: #545454;
  text-decoration: none;
}

nav.top-nav i {
  margin-right: 40px;
}

nav.top-nav span {
  font-size: 1.1em;
}

nav.top-nav a:hover {
  color: #007bff;
}

@media (max-width: 890px) {
  nav.top-nav span {
    display: none;
    /* Hide the text */
  }

  nav.top-nav {
    gap: 6px;
  }

  nav.top-nav a {
    padding: 0 2px;
  }

  nav.top-nav i {
    font-size: 1.05em;
    margin-right: 0;
  }

  header img#mainlogo {
    width: 118px !important;
    height: 78px !important;
    margin-right: 8px;
  }



}

nav.sidebar-nav a {
  display: flex;
  align-items: center;
  margin: 0 10px;
  color: #545454;
  text-decoration: none;
}

nav.sidebar-nav i {
  margin-right: 8px;
  font-size: 1.2em;
}

nav.sidebar-nav span {
  font-size: 1em;
}

nav.sidebar-nav a:hover {
  color: #007bff;
}

.container {
  display: flex;
  min-height: 0;
  justify-content: center;
  flex: 1 0 auto;
}

.main-content {
  padding-bottom: 24px;
  width: 100%;
  max-width: 1600px;
  margin: 0 auto;
}

#WelcomStatement,
#MainSlider {
  width: 100%;
  max-width: 1480px;
  margin-left: auto;
  margin-right: auto;
}

#Emblem {
  display: grid;
  grid-template-columns: 136px minmax(0, 1fr) 136px;
  align-items: center;
  justify-items: center;
  column-gap: 12px;
  width: min(1120px, 100%);
  margin: 0 auto;
}

#Emblem > div,
#Emblem > a {
  width: 100%;
  display: flex;
  justify-content: center;
}

.emblem-side {
  display: flex;
  flex-direction: row;
}

#FREMS_IndexLogo {
  display: block;
  width: min(100%, 760px);
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

#mainlogo1,
#mainlogo2 {
  width: 136px !important;
  height: 90px !important;
}

#WelcomStatement > a.ALink {
  display: inline-block;
  margin-top: 2px;
}

#WelcomStatement > a.ALink h3 {
  margin: 2px 0 2px;
  line-height: 1.2;
}

#WelcomStatement .call911 h3 {
  margin: 4px 0;
}

#WelcomStatement > h4 {
  margin: 8px 0;
}

.partner-logo {
  vertical-align: middle;
  margin-left: 10px;
  width: auto;
  height: 50px;
  border-radius: 5px;
}

/* Header styles */
header {
  background-color: #f0f0f0;
  padding: 10px clamp(14px, 3vw, 40px);
  text-align: center;
  height: auto;
  min-height: 96px;
  /* Adjust header height as needed */
  display: flex;
  /* Use flexbox for alignment */
  justify-content: space-between;
  /* Distribute space between logo and switcher */
  justify-items: center;
  /* Center horizontally */
  align-items: center;
  /* Center vertically */
  box-sizing: border-box;
  position: sticky;
  top: 0;
  z-index: 1000;
}


header img#mainlogo {
  width: 150px !important;
  height: auto !important;
  max-height: 86px;
  margin-right: 12px;
  flex-shrink: 0;
}

footer {
  margin: 12px auto 18px;
  padding: 10px 12px;
  height: auto;
  text-align: center;
  color: #ffffff;
  justify-content: center;
  align-items: center;
  width: min(1600px, 100%);
  box-sizing: border-box;

}

.social-links {
  margin-top: 20px;
  margin-bottom: 40px;
}

.social-links img {
  height: 20px;
  /* Adjust logo size as needed */
  margin: 3px;
  padding-left: 10px;
  padding-right: 10px;
}


/* Sidebar styles */
aside {
  width: 140px;
  /* Adjust as needed */
  background-color: #ddd;
  padding: 10px;
  flex-shrink: 0;
  /* Prevent sidebar from shrinking */
}

/* Main content area styles */
main {
  flex-grow: 1;
  padding: 15px;
  flex-shrink: 1;
  /* Allow main content to shrink */
  overflow: visible;
  text-align: center;
  /* Center text content horizontally */
}

header img {
  margin-right: 20px;
  max-width: 100%;
}

@media (max-width: 1100px) {
  #side-bar {
    display: none;
  }
}

@media (max-width: 900px) {
  #Emblem {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2px;
  }

  #mainlogo1,
  #mainlogo2 {
    display: none;
  }

  #FREMS_IndexLogo {
    width: min(94vw, 520px);
  }
}


/* General Styling for all anchor tags */
a {
  font-family: "Fira Sans", sans-serif;
  text-decoration: none;
  /* Removes the default underline */
  color: #545454;
  /* A default text color */
}

/* Top Header Navigation Styling */
nav a {
  font-weight: 400;
  /* Regular weight */
  font-size: 1 rem;
  /* Adjust as needed */
  margin-right: 20px;
  /* Spacing between links */
  margin-top: 15px;
}

nav a:hover {
  color: #007bff;
  /* Example: Change color on hover */
}

nav.top-nav i {
  margin-right: 5px;
  /* More spacing */
  font-size: 1.2em;
}

/* Sidebar Navigation Styling */
.sidebar-nav {
  /* Added a class for easier targeting */
  display: flex;
  flex-direction: column;
}

.sidebar-nav a,
.top-nav a {
  font-weight: 700;
  /* Bold weight */
  font-size: 1.2 rem;
  /* Adjust as needed */
  padding: 10px 0;
  /* Spacing around links */
}

.sidebar-nav a:hover,
.top-nav a:hover {
  color: #2547df;
  /* Example: Change color on hover */
}

.ALink {
  color: #007bff;
}

.ALinkBlue {
  color: #5b73e0;
}

.cards-container {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  /*  equal-width columns */
  grid-gap: 10px;
  /* Space between the cards */
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  justify-content: center;
  justify-items: center;
  /* Center horizontally */
  align-items: center;
  /* Center vertically */
}

@media (max-width: 1200px) {
  .cards-container {
    display: grid;
    grid-template-columns: 1fr;
    /* Single column */
    grid-gap: 10px;
    /* Space between the cards */
    width: min(980px, calc(100% - 24px));
    margin: 10px auto 0;
    justify-items: center;
    /* Center horizontally */
    align-items: center;
    /* Center vertically */
  }
}

.card {
  background-color: #f5f4f4;
  color: #000000 !important;
  /* Set font color to black */
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
  margin: 30px auto;
  width: min(650px, calc(100% - 12px));
  max-width: 650px;
  max-height: 300px;
  box-sizing: border-box;
  padding-top: 0px;
  padding-bottom: 20px;
  padding-left: 16px;
  padding-right: 16px;
  text-align: center;
}


.donate-button {
  width: auto;
  background-color: #007bff;
  border: none;
  border-radius: 5px;
  color: #fff;
  cursor: pointer;
  font-size: 1 rem;
  padding: 5px 10px;
  margin: 5px;
  text-decoration: none;
  text-align: center;
}

.carousel-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  z-index: 10;
  border-radius: 8px;
}

.carousel-frame {
  height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.18);
}

@media (max-width: 1200px) {
  .carousel-frame {
    height: 300px;
  }
}

@media (max-width: 700px) {
  .carousel-frame {
    height: 220px;
  }

  .card {
    width: min(650px, calc(100% - 8px));
    padding-left: 14px;
    padding-right: 14px;
  }
}

.owl-carousel .item {
  border-radius: 10px;
  width: 100%;
}

.owl-carousel .item img {
  display: block;
  /* Make images behave like block elements */
  margin: 0 auto;
  width: 100%;
  height: 100%;
  object-fit: contain;
  text-align: center;
}

@media (min-width: 1000px) {
  header {
    min-height: 88px;
    padding: 8px clamp(16px, 2.8vw, 36px);
  }

  header img#mainlogo {
    width: 138px !important;
    max-height: 80px;
    margin-right: 10px;
  }

  nav.top-nav {
    gap: 8px;
  }

  nav.top-nav a {
    padding: 0 2px;
    margin-top: 0;
  }

  nav.top-nav span {
    font-size: 1rem;
  }

  .main-content {
    padding-top: 10px;
    padding-bottom: 18px;
  }

  .cards-container {
    width: min(1480px, calc(100% - 40px));
    margin: 0 auto;
  }

  .card {
    margin: 20px auto;
  }

  .carousel-frame {
    height: 320px;
  }
}

#videoModal1 {
  display: none;
  position: fixed;
  z-index: 10000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.4);
  justify-content: center;
  align-items: center;
}

#videoModal1 div {
  background-color: #fefefe;
  margin: 10% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
}

.closeVideo1 {
  color: #aaa;
  float: right;
  font-size: 28px;
  font-weight: bold;
  cursor: pointer;
}

#modalVideo1 {
  max-width: 100%;
  max-height: 80vh;
}

#modalTitle1 {
  color: black;
  text-align: center;
  font-size: 1rem;
}

body {
  background-color: #1a2a6c;
  background-image: linear-gradient(180deg, #243b55 0%, #1f347a 32%, #1a2a6c 100%);
  background-position: center;
  background-size: cover;
  /* Final position (original) */
  opacity: 1;
}

@media (max-width: 890px) {
  nav.top-nav i {
    margin-right: 0;
  }

  header {
    padding: 8px clamp(10px, 3.5vw, 20px);
  }
}