/* Reset & Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat', sans-serif;
  line-height: 1.6;
  background-color: #f8f8f8;
  color: #333;
}

a {
  text-decoration: none;
  color: inherit;
}

/* Navigation */
nav {
  background: rgba(192, 0, 0, 0.9);
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 30px;
  height: 60px;
  box-sizing: border-box;
}

nav .logo a {
  color: #fff;
  font-weight: bold;
  font-size: 1.2em;
  text-decoration: none;
}

nav ul {
  list-style: none;
  display: flex;
  margin: 0;
  padding: 0;
}

nav ul li {
  margin: 0 15px;
  position: relative;
}

nav ul li a,
nav ul li span {
  color: #fff;
  font-weight: bold;
  transition: color 0.3s;
  cursor: pointer;
  text-decoration: none;
  line-height: 1;
}

nav ul li a:hover,
nav ul li span:hover {
  color: #ffeeba;
}

/* Dropdown Menu */
nav ul li .dropdown-content {
  display: none;
  position: absolute;
  background: rgba(192, 0, 0, 0.9);
  top: 100%;
  left: 0;
  min-width: 180px;
  z-index: 101;
  margin-top: -1px;
}

nav ul li:hover .dropdown-content {
  display: block;
}

nav ul li .dropdown-content li {
  margin: 0;
}

nav ul li .dropdown-content li a {
  display: block;
  padding: 10px 15px;
  color: #fff;
}

nav ul li .dropdown-content li a:hover {
  background: #ffeeba;
  color: #c00;
}

/* Hamburger Menu */
.hamburger {
  display: none;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  width: 25px;
  height: 3px;
  background: #fff;
}

/* Main Container */
.container {
  max-width: 1100px;
  margin: 100px auto 50px;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Typography */
h1,
h2,
h3 {
  color: #c00;
  margin-bottom: 15px;
  text-align: center;
}

h1 {
  margin-bottom: 30px;
}

h2 {
  font-size: 2em;
}

h3 {
  font-size: 1.2em;
}

p {
  margin-bottom: 15px;
  font-size: 1.1em;
  line-height: 1.6;
}

ul {
  list-style: none; /* Remove bullet points */
  margin: 15px 0; /* Adjust margin for spacing */
  padding: 0; /* Remove default padding */
}

li {
  margin-bottom: 10px;
  padding-left: 20px; /* Add slight indent for readability without bullets */
}

/* Hero Section */
.hero {
  background: url('images/firefighter-hero.jpg') no-repeat center center/cover;
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  color: #fff;
  position: relative;
}

.hero::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  z-index: 1;
  pointer-events: none;
}

.hero h1 {
  font-size: 3em;
  z-index: 2;
  margin-bottom: 10px;
  color: #fff !important;
}

.hero p {
  font-size: 1.5em;
  z-index: 2;
  margin-bottom: 20px;
}

.hero .cta {
  z-index: 2;
}

.hero .cta a {
  background: #ffeeba;
  color: #c00;
  padding: 15px 30px;
  border-radius: 30px;
  font-size: 1.2em;
  transition: background 0.3s;
  display: inline-block;
  text-align: center;
}

.hero .cta a:hover {
  background: #fff;
}

/* Section Styling */
.section {
  margin-bottom: 40px;
  text-align: center;
}

.section h2 {
  margin-bottom: 20px;
}

/* Training Calendar Section */
.training-calendar {
  margin-bottom: 40px;
  text-align: center;
}

.training-calendar ul {
  margin: 15px 0;
}

/* Cards for Updates Section */
.cards {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.card {
  flex: 1 1 calc(33% - 20px);
  background: #f9f9f9;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  text-align: left;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.card h3 {
  margin-bottom: 10px;
}

.card p {
  font-size: 0.95em;
  margin-bottom: 10px;
}

.card a {
  display: block;
  padding: 8px 16px;
  background: rgba(192, 0, 0, 0.9);
  color: #fff;
  border-radius: 5px;
  transition: background 0.3s;
  text-align: center;
  margin-top: auto; /* Pushes the link to the bottom of the card */
}

.card a:hover {
  background: #ffeeba;
  color: #c00;
}

/* Call-to-Action Section */
.cta-section {
  background: #ffeeba;
  padding: 40px;
  border-radius: 8px;
  margin-bottom: 60px;
  text-align: center;
}

.cta-section h2 {
  color: #c00;
}

.cta-section p {
  font-size: 1.2em;
  margin: 20px 0;
}

.cta-section a {
  display: inline-block;
  padding: 15px 30px;
  background: rgba(192, 0, 0, 0.9);
  color: #fff;
  border-radius: 30px;
  font-size: 1.1em;
  transition: background 0.3s;
  text-align: center;
}

.cta-section a:hover {
  background: #ffeeba;
  color: #c00;
}

/* Apparatus Section */
.apparatus {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.apparatus:last-child {
  border-bottom: none;
}

.apparatus img {
  width: 300px; /* Fixed width for uniformity */
  height: 200px; /* Fixed height for uniformity */
  object-fit: cover; /* Ensures images fill the space without distortion */
  object-position: top; /* Prioritizes the top of the image to avoid cutting off heads */
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Station Section */
.station {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.station:last-child {
  border-bottom: none;
}

.station img {
  width: 300px; /* Fixed width for uniformity */
  height: 200px; /* Fixed height for uniformity */
  object-fit: cover; /* Ensures images fill the space without distortion */
  object-position: top; /* Prioritizes the top of the image to avoid cutting off heads */
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

/* Station and Apparatus Info */
.apparatus-info,
.station-info {
  flex: 1;
}

.apparatus-info h3,
.station-info h3 {
  color: #c00;
  margin-bottom: 10px;
  text-align: left;
}

.apparatus-info p,
.station-info p {
  margin-bottom: 10px;
  text-align: left;
}

/* Calendar Placeholder (Deprecated) */
.calendar-placeholder {
  border: 2px dashed #ccc;
  padding: 20px;
  text-align: center;
  margin: 30px 0;
  font-style: italic;
  color: #777;
}

/* 404 Error Page Styles */
.container h1 {
  font-size: 48px;
  color: #c00;
  margin-bottom: 20px;
}

.container p {
  font-size: 18px;
  color: #666;
  margin-bottom: 20px;
}

.container img {
  max-width: 100%;
  height: auto;
  margin: 20px 0;
}

.btn {
  display: inline-block;
  padding: 10px 20px;
  background-color: rgba(192, 0, 0, 0.9);
  color: #fff;
  text-decoration: none;
  border-radius: 5px;
  transition: background 0.3s;
  text-align: center;
}

.btn:hover {
  background-color: #ffeeba;
  color: #c00;
}

.search {
  margin: 20px 0;
}

.search input {
  padding: 10px;
  width: 200px;
  border: 1px solid #ccc;
  border-radius: 5px;
  margin-right: 5px;
}

.search button {
  padding: 10px 20px;
  background-color: rgba(192, 0, 0, 0.9);
  color: #fff;
  border: none;
  border-radius: 5px;
  cursor: pointer;
  transition: background 0.3s;
}

.search button:hover {
  background-color: #ffeeba;
  color: #c00;
}

.popular-pages {
  list-style: none;
  padding: 0;
}

.popular-pages li {
  margin: 10px 0;
}

.popular-pages li a {
  color: rgba(192, 0, 0, 0.9);
  text-decoration: none;
  font-weight: bold;
  transition: color 0.3s;
}

.popular-pages li a:hover {
  color: #ffeeba;
}

/* Contact Info Styling */
.contact-info {
  background: #f0f0f0;
  padding: 15px;
  border-radius: 5px;
  text-align: center;
  font-size: 1.1em;
  margin-top: 20px;
}

/* Table Styles */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
}

table,
th,
td {
  border: 1px solid #ddd;
}

th,
td {
  padding: 10px;
  text-align: center;
}

th {
  background: #f2f2f2;
}

/* Checkboxes */
.checkboxes {
  margin: 15px 0;
}

.checkboxes label {
  margin-right: 20px;
  font-weight: bold;
}

/* FAQ Interactivity */
.faq-item h3 {
  padding: 15px;
  background: #eee;
  cursor: pointer;
  transition: background 0.3s;
}

.faq-item h3:hover {
  background: #ddd;
}

.faq-item p {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.5s ease, opacity 0.5s ease;
  padding: 0 15px;
}

.faq-item.active p {
  max-height: 500px;
  opacity: 1;
  padding: 15px;
}

/* Timeline Styling */
.timeline {
  position: relative;
  padding: 40px 0;
  margin: 20px auto;
  max-width: 800px;
  background: linear-gradient(135deg, #f8f8f8, #fff);
}

.timeline::before {
  content: '';
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 4px;
  background: #c00;
  transform: translateX(-50%);
}

.timeline-item {
  position: relative;
  width: 45%;
  margin: 0 0 40px 0;
  padding: 20px;
  background: #fff;
  border-radius: 8px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transition: all 0.3s ease;
}

.timeline-item:nth-child(odd) {
  left: 0;
  transform: translateX(-100%);
}

.timeline-item:nth-child(even) {
  left: 55%;
  transform: translateX(100%);
}

.timeline-item.visible {
  opacity: 1;
  transform: translateX(0);
}

.timeline-item::before {
  content: '';
  position: absolute;
  top: 20px;
  width: 16px;
  height: 16px;
  background: #c00;
  border-radius: 50%;
  z-index: 1;
}

.timeline-item:nth-child(odd)::before {
  right: -28px;
}

.timeline-item:nth-child(even)::before {
  left: -28px;
}

.timeline-item:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 25px rgba(204, 0, 0, 0.3);
}

.timeline-item h3 {
  font-size: 28px;
  font-weight: 700;
  color: #c00;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.timeline-item p {
  font-size: 16px;
  color: #333;
  font-style: italic;
}

/* Leadership Section */
.leadership {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 40px;
}

.leadership-item {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 40px;
  padding-bottom: 20px;
  border-bottom: 1px solid #eee;
}

.leadership-item:last-child {
  border-bottom: none;
}

.leadership-item img {
  width: 150px; /* Fixed width for uniformity */
  height: 150px; /* Fixed height for uniformity */
  object-fit: cover; /* Ensures images fill the space without distortion */
  object-position: top; /* Prioritizes the top of the image to avoid cutting off heads */
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px; /* Space between image and text */
}

.leadership-info {
  flex: 1;
}

.leadership-info h3 {
  color: #c00;
  margin-bottom: 10px;
  text-align: left;
}

.leadership-info p {
  margin-bottom: 10px;
  text-align: left;
}

/* Board Members Section */
.board-members {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 40px;
}

.board-members li {
  flex: 1 1 calc(50% - 10px); /* Two columns on desktop */
  margin-bottom: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.board-members img {
  width: 150px; /* Fixed width for uniformity */
  height: 150px; /* Fixed height for uniformity */
  object-fit: cover; /* Ensures images fill the space without distortion */
  object-position: top; /* Prioritizes the top of the image to avoid cutting off heads */
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  margin-bottom: 10px; /* Space between image and text */
}

.board-member-info {
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
  width: 100%;
  text-align: center;
}

.board-member-info h3 {
  color: #c00;
  margin-bottom: 10px;
  text-align: center;
}

.board-member-info p {
  margin-bottom: 10px;
  text-align: center;
}

/* Divisions Section */
.divisions {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 40px;
}

.division-item {
  flex: 1 1 calc(50% - 10px); /* Two columns on desktop */
  margin-bottom: 20px;
}

.division-info {
  padding: 15px;
  background: #f9f9f9;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.division-info h3 {
  color: #c00;
  margin-bottom: 10px;
  text-align: center;
}

.division-info p {
  margin-bottom: 10px;
  text-align: center;
}

/* Footer */
footer {
  background: #222;
  color: #fff;
  text-align: center;
  padding: 30px;
}

footer p {
  margin: 5px;
}

footer a {
  color: #ffeeba;
}

/* Responsive */
@media (max-width: 768px) {
  nav {
    position: relative;
    padding: 10px 15px;
    height: auto;
  }

  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(192, 0, 0, 0.9);
    z-index: 100;
  }

  .nav-links.active {
    display: flex;
  }

  .nav-links li {
    margin: 10px 0;
    text-align: center;
  }

  .dropdown {
    position: relative;
  }

  .dropdown-content {
    position: static;
    width: 100%;
    background: rgba(255, 255, 255, 0.1);
    display: none;
    box-shadow: none;
  }

  .dropdown.active .dropdown-content {
    display: block;
  }

  .hamburger {
    display: flex;
  }

  .container {
    margin: 20px 10px;
  }

  .hero h1 {
    font-size: 2.5em;
  }

  .hero p {
    font-size: 1.2em;
  }

  .cards {
    flex-direction: column;
  }

  .card {
    flex: 1 1 100%;
  }

  .apparatus {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 15px;
  }

  .apparatus img {
    width: 100%; /* Full width on mobile */
    max-width: 300px; /* Limit maximum width for better fit */
    height: auto; /* Maintain aspect ratio */
    object-fit: cover; /* Preserve scaling */
    object-position: top; /* Prioritizes the top of the image */
  }

  .apparatus-info {
    width: 100%;
    text-align: center;
  }

  .apparatus-info h3 {
    text-align: center;
  }

  .apparatus-info p {
    text-align: center;
  }

  .station {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 15px;
  }

  .station img {
    width: 100%; /* Full width on mobile */
    max-width: 300px; /* Limit maximum width for better fit */
    height: auto; /* Maintain aspect ratio */
    object-fit: cover; /* Preserve scaling */
    object-position: top; /* Prioritizes the top of the image */
  }

  .station-info {
    width: 100%;
    text-align: center;
  }

  .station-info h3 {
    text-align: center;
  }

  .station-info p {
    text-align: center;
  }

  .timeline {
    margin: 20px 20px;
    padding-left: 15px;
  }

  .timeline::before {
    left: 20px;
  }
  .timeline-item {
    width: 80%;
    left: 40px !important;
    transform: translateX(0) !important;
  }
  .timeline-item::before {
    left: -20px !important;
    right: auto !important;
  }
  .timeline-item h3 {
    font-size: 22px;
  }
  .timeline-item p {
    font-size: 14px;
  }

  .leadership {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 15px;
  }

  .leadership-item {
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-bottom: 30px;
    padding-bottom: 15px;
    flex: 1; /* Ensures full width on mobile */
  }

  .leadership-item img {
    width: 100%; /* Full width on mobile */
    max-width: 200px; /* Limit maximum width for better fit */
    height: auto; /* Maintain aspect ratio */
    object-fit: cover; /* Preserve scaling */
    object-position: top; /* Prioritizes the top of the image */
  }

  .leadership-info {
    width: 100%;
    text-align: center;
  }

  .leadership-info h3 {
    text-align: center;
  }

  .leadership-info p {
    text-align: center;
  }

  .board-members {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .board-members li {
    flex: 1 1 100%; /* Full width on mobile */
  }

  .board-members img {
    width: 120px; /* Slightly smaller on mobile for better fit */
    height: 120px; /* Matching height */
    object-fit: cover; /* Preserve scaling */
    object-position: top; /* Prioritizes the top of the image */
  }

  .board-member-info {
    width: 100%;
  }

  .divisions {
    flex-direction: column;
    align-items: center;
    gap: 15px;
  }

  .division-item {
    flex: 1 1 100%; /* Full width on mobile */
  }

  .division-info {
    width: 100%;
  }

  h1 {
    font-size: 2.5em;
  }

  p {
    font-size: 1em;
  }

  .container h1 {
    font-size: 36px;
  }

  .container p {
    font-size: 16px;
  }
}

/* Gallery Section */
.gallery {
  margin: 2rem 0;
}

.gallery h2 {
  text-align: center;
  margin-bottom: 1.5rem;
}

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

.gallery-item {
  width: 100%;
  height: 200px; /* Adjust height as needed */
  overflow: hidden;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover; /* Ensures images scale nicely */
  display: block;
  border-radius: 8px; /* Optional: Adds rounded corners */
}