/* =========================================================
   Global / Header Fixes
========================================================= */
body {
  padding-top: 0 !important;
  margin: 0;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  line-height: 1.6;
}

.invisible-header {
  display: none;
}

#header {
  position: static;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

.navbar {
  position: fixed;
  top: 0;
  width: 100%;
  z-index: 1000;
}

/* =========================================================
   Banner
========================================================= */
#banner {
  background: linear-gradient(100deg, #6FA0CC, #3A6FA5);
  color: #ffffff;
  padding: 6vh 2rem 5vh;
  font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
}

#banner h2 {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  border-bottom: none;
}

.banner-subtitle {
  font-size: 1.15rem;
  opacity: 0.9;
  margin-top: 0.75rem;
}

/* =========================================================
   Services Grid (CSS Grid — Final Authority)
========================================================= */
#servicesGrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem;

  max-width: 1400px;
  margin: 0 auto;

  justify-content: start;
  justify-items: stretch;
}

/* Kill Bootstrap column behavior */
#servicesGrid > .service-item {
  width: 100%;
  max-width: none;
  flex: unset;
}

/* =========================================================
   Service Card — Layout + Equal Size
========================================================= */
.service-card.service-row {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;

  width: 100%;
  height: 100%;
  min-height: 175px;

  padding: 1.25rem 1.5rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(0, 0, 0, 0.25);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);

  transition: background-color 0.2s ease, box-shadow 0.2s ease;
}

.service-card.service-row:hover,
.service-card.service-row:focus-within {
  background-color: #f4f8fc;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

/* =========================================================
   Icon
========================================================= */

.circle-icon {
  width: 72px;
  height: 72px;
  min-width: 72px;

  border-radius: 50%;
  background-color: #094682;
  border: 2px solid #094682;

  display: flex;
  align-items: center;
  justify-content: center;
}

.circle-icon i {
  font-size: 2rem;
  color: #fff;
  transition: transform 1s ease, color 0.3s ease;
}

.service-card:hover .circle-icon {
  transform: translateY(-6px);
  box-shadow: 0 6px 14px rgba(0, 0, 0, 0.6);
}

.service-card:hover .circle-icon i {
  color: #ffffff;
  transform: rotateY(-360deg);
}

/* =========================================================
   Text Content
========================================================= */

.service-text {
  flex: 1;
  min-width: 0;
}

.service-header {
  font-size: 1.25rem;
  line-height: 1.3;
  margin-bottom: 0.3rem;
}

.service-subheader {
  font-size: 0.85rem;
  font-weight: 500;
  color: #495057;
  margin-bottom: 0.25rem;
}

.service-description {
  font-size: 0.95rem;
  line-height: 1.55;
}

/* =========================================================
   Search Input
========================================================= */

#serviceSearch {
  max-width: 900px;
  margin: 0 auto 1.25rem;
  padding: 0.75rem 1.1rem;

  font-size: 1rem;
  border-radius: 0.75rem;
  border: 1px solid #8d8d8d;
}

#serviceSearch:focus {
  border-color: #5f9dd2;
  box-shadow: 0 0 0 3px rgba(95, 157, 210, 0.25);
}

/* =========================================================
   Department Filters
========================================================= */

#deptFilters {
  border-top: 1px solid rgba(0, 0, 0, 0.3);
  margin-top: 2rem;
  padding-top: 2rem;
}

.filter-btn {
  border-radius: 2rem;
  border-color: #243f57;
  color: #243f57;
}

.filter-btn:hover {
  background-color: #6FA0CC;
  color: #ffffff !important;
}

.filter-btn.active {
  background-color: #094682;
  border-color: #094682;
  color: #ffffff !important;
}

/* =========================================================
   Responsive Grid
========================================================= */

@media (max-width: 1199px) {
  #servicesGrid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  #servicesGrid {
    grid-template-columns: 1fr;
  }

  .service-card.service-row {
    padding: 1rem;
    gap: 0.75rem;
    min-height: auto;
  }

  .circle-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
  }

  .circle-icon i {
    font-size: 1.2rem;
  }

  .service-header {
    font-size: 1rem;
  }

  .service-description {
    font-size: 0.85rem;
  }
}

/* =========================================================
   HARD OVERRIDE — Kill Bootstrap row centering
========================================================= */

#servicesGrid {
  justify-content: start !important;
  justify-items: stretch;
}

/* =========================================================
   Accessible Focus Styles
========================================================= */

.service-link:focus-visible {
  outline: 3px solid #5f9dd2;
  outline-offset: 4px;
  border-radius: 0.75rem;
}

.filter-btn:focus-visible,
#serviceSearch:focus-visible {
  outline: 3px solid #243f57;
  outline-offset: 2px;
}
