#ministry,
#presidency {
  background-color: #fefefe;
  padding: 6rem 0rem;
}

.ministry h2 {
  color: #003476;
  font-weight: 600;
  font-size: 1.7rem;
}

.top-ministry {
  align-items: center;
}

.ministry p {
  color: #515058;
  margin: 1rem 0;
  font-size: 1rem;
}

.ministry-content {
  text-align: start;
  margin-bottom: 34px;
  max-width: 322px;
  margin-right: 14%;
  flex-shrink: 0;
}

.ministries-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
  align-items: flex-start;
}

.ministry-card {
  flex: 1 1 calc(20% - 20px);
  border-radius: 5px;
  padding: 20px;
  text-align: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease,
    background-color ease 0.2s;
  position: relative;
  min-height: 220px;
  text-decoration: none;
  background: transparent linear-gradient(321deg, #2b6cbe 0%, #16365f 100%) 0%
    0% no-repeat padding-box;
  box-shadow: 0px 2px 6px #00000019;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ministry-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
  background: transparent linear-gradient(316deg, #00b0f0 0%, #016fbf 100%) 0%
    0% no-repeat padding-box;
}

.ministry-icon {
  height: auto;
  position: absolute;
  right: 0;
  bottom: 0;
}

.ministry-title {
  font-size: 19px;
  font-weight: 500;
  color: #fff;
  text-align: start;
}

.deliberation-button {
  background: #003476 0% 0% no-repeat padding-box;
  border-radius: 4px;
  width: 100%;
  max-width: 230px;
  color: #fff !important;
  text-decoration: none !important;
  text-align: center;
  padding: 0.5rem;
  transition: all ease 0.2s;
}

.deliberation-button:hover {
  background: #00aeef;
}

.ministry-card .deliberation-count {
  font-size: 13px;
}

.ministry-card .status-indicator::before {
  vertical-align: middle;
}

/* Responsive rules */
@media screen and (max-width: 1199px) {
  .ministry-card {
    flex: 1 1 calc(25% - 20px);
  }

  .ministry-content {
    margin-right: 5%;
  }
}

@media screen and (max-width: 992px) {
  .ministries-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .ministry-content {
    grid-column: 1 / -1;
    max-width: 100%;
    margin-right: 0;
  }
}

@media screen and (max-width: 767px) {
  .ministries-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .ministry-title {
    text-align: center;
  }

  .ministry-card {
    justify-content: center;
    align-items: center;
  }

  .ministry-content {
    text-align: center;
  }
}

@media screen and (max-width: 480px) {
  .ministries-grid {
    grid-template-columns: 1fr;
  }
}

#single-navigation {
  margin-top: 4rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid #acacac;
}

/* Style for the navigation links */
#single-navigation .nav-item .nav-link {
  padding: 0.5rem 1rem;
  color: #013476 !important;
  text-decoration: none;
  /* Remove underline */
  position: relative;
  /* Needed for positioning the ::after pseudo-element */
  display: inline-block;
  /* Essential to allow pseudo-element to be controlled */
  transition: color 0.3s ease-in-out;
  /* Smooth transition for text color */
  font-weight: 500;
}

/* Pseudo-element for the border */
#single-navigation .nav-item .nav-link::after {
  content: "";
  /* Required for pseudo-elements */
  position: absolute;
  bottom: 0;
  /* Position at the bottom of the link */
  left: 50%;
  /* Start in the middle */
  transform: translateX(-50%);
  /* Center the pseudo-element horizontally */
  height: 3px;
  /* Thickness of the border */
  background-color: transparent;
  /* Default transparent state */
  width: 0;
  /* Initially no width */
  transition: width 0.3s ease-in-out, background-color 0.3s ease-in-out;
  /* Smooth transitions for width and color */
}

/* Style for the active tab link */
#single-navigation .nav-item .nav-link.active {
  color: #013476 !important;
  font-weight: bold;
}

/* Active tab border (always visible and specific width) */
#single-navigation .nav-item .nav-link.active::after {
  background-color: #013476;
  /* Dark blue border for active tab */
  width: calc(100% + 20px);
}

/* Hover effect for ALL tabs (including active, if you want it to behave the same on hover) */
#single-navigation .nav-item .nav-link:hover::after {
  background-color: #013476;
  /* Slightly lighter blue on hover */
  width: calc(100% + 20px);
}

#single-navigation .nav-item .nav-link:not(.active):hover::after {
  background-color: #013476;
  /* Slightly lighter blue on hover */
  width: calc(100% + 20px);
}

.all-ministries-card {
  background-color: #003476;
  padding: 1.5rem 3rem;
  font-size: 22px;
}

.all-ministries-card button {
  background-color: transparent;
  color: #fff;
  border: none;
}

.foreas-list .card-body {
  padding: 3rem;
}

.foreas-list a {
  max-width: fit-content;
}

#glossary-search-form label {
  font-size: 20px;
  color: #003476;
}

#glossary-search {
  border: none;
  border-bottom: 1px solid #6f6f6f;
  border-radius: 0;
  outline: none;
  box-shadow: none;
}

#glossary-search-form button {
  background: #003376 0% 0% no-repeat padding-box;
  border-radius: 5px;
  border: 1px solid transparent;
  padding: 1rem 2rem;
  transition: all ease 0.2s;
}

#glossary-search-form button:hover {
  background: #01aff2 0% 0% no-repeat padding-box;
}

@media screen and (max-width: 768px) {
  #glossary-search-form {
    flex-direction: column !important;
  }

  #single-navigation {
    width: 100%;
    margin: 0;
  }
}

.case-text {
  margin: 2rem 0;
}

.favorite-btn {
  background-color: #003376;
  color: #fff;
  border: 1px solid #003376;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 250px;
  transition: all ease 0.2s;
  gap: 1rem;
  box-shadow: 0px 3px 6px #00000029;
  padding: 1rem 0.5rem;
  font-size: 16px;
  text-decoration: none;
}

.rss {
  max-width: 50px;
}

.favorite-btn:hover {
  background-color: #00aeef;
  border: 1px solid #00aeef;
}

.rss:hover {
  color: #fff;
}

@media screen and (max-width: 1024px) {
  .top-ministry {
    flex-direction: column-reverse;
    margin: 2rem 0;
  }
  .favorite-btn {
    margin-bottom: 2rem;
  }

  .favorite-btn {
    max-width: 100%;
  }
  .col-md-4 {
    max-width: 100% !important;
    width: 100% !important;
  }
  .top-ministry {
    align-items: unset;
  }

  .rss {
    max-width: 100%;
  }
}

.content p,
.deliberation-post-content {
  color: #24282f;
}
