/* Minimal custom CSS - Bootstrap handles most styling */

/* Quick Links tiles (home page) */
.quicklink-tile {
  transition: filter 0.2s, transform 0.15s;
}
.quicklink-tile:hover {
  filter: brightness(0.94);
  transform: translateY(-2px);
}

/* Services Page */
.service-card {
  transition: transform 0.2s, box-shadow 0.2s;
}
.service-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 .5rem 1rem rgba(0,0,0,.15) !important;
}
.service-icon-wrap {
  width: 64px;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Footer */
.footer-link {
  color: #adb5bd;
  text-decoration: none;
  font-size: 0.875rem;
  transition: color 0.2s;
}
.footer-link:hover { color: #ffffff; }

.footer-social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid #6c757d;
  color: #adb5bd;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}
.footer-social-btn:hover {
  background: #0d6efd;
  border-color: #0d6efd;
  color: #fff;
}

/* Map image styles */
.map-container {
  position: relative;
  width: 100%;
  min-height: 260px;
  /* allow script to set explicit height on resize; provide sensible minimum */
  display: block;
}

.map-image {
  width: 100%;
  height: 100%;
  display: block;
  transition: opacity 0.3s ease;
  object-fit: cover;
  border-radius: 0.25rem;
}

/* Content height consistency fixes */
/* .content-row intentionally uses Bootstrap grid; no custom rules here */

.content-col {
  display: flex;
  flex-direction: column;
}

.h-100-card {
  height: 100%;
  display: flex;
  flex-direction: column;
}

.card-body {
  flex: 1 1 auto;
}

/* Statistics section fixes */
.stats-card {
  height: 100%;
  min-height: 160px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Enhanced custom styling */

/* Hero Section Styles */
.hero-section {
  min-height: 80vh;
  position: relative;
  display: flex;
  align-items: center;
}

.hero-background {
  z-index: 0;
}

.hero-content {
  z-index: 1;
}

.hero-title {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.hero-subtitle {
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

/* Officials Cards */
.official-card {
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 1px solid rgba(255, 255, 255, 0.1);
  backdrop-filter: blur(10px);
}

.official-card:hover {
  transform: translateY(-10px);
}

.transform-hover {
  transition: all 0.3s ease;
}

.transform-hover:hover {
  transform: translateY(-5px);
  box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175) !important;
}

/* Services Section */
.services-section {
  overflow: hidden;
}

.card {
  transition: all 0.3s ease;
  border: none;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Search Bar Enhancement */
.search-container {
  max-width: 600px;
  margin: 0 auto;
}

.search-container .form-control:focus {
  box-shadow: none;
}

.search-container .btn-primary:hover {
  transform: scale(1.05);
  transition: transform 0.2s ease;
}

/* Font size controls */
.font-small {
  font-size: 0.9em !important;
}
.font-normal {
  font-size: 1em !important;
}
.font-large {
  font-size: 1.1em !important;
}

/* Apply font size to all elements */
body.font-small * {
  font-size: inherit;
}
body.font-normal * {
  font-size: inherit;
}
body.font-large * {
  font-size: inherit;
}

.bg-navbar {
  background: linear-gradient(135deg, #1e40af, #1e3a8a) !important;
  color: white !important;
}

/* Custom hover effects for accessibility controls */
.text-dark:hover {
  background-color: #1e40af !important;
  color: white !important;
}

/* Service card hover effect */
.card:hover {
  transform: translateY(-3px);
  transition: transform 0.3s ease;
}

/* Custom background for hero section */
.bg-primary {
  background: linear-gradient(135deg, #1e40af, #1e3a8a) !important;
  color: white !important;
}

.bg-primary:hover {
  background: linear-gradient(135deg, #1e40af, #1e3a8a) !important;
  color: rgb(8, 8, 8) !important;
  border: #1e3a8a solid 1px !important;
}

.gap-3 {
  gap: 1rem !important;
}

/* Sticky services bar */
/* .sticky-services-bar {
  background: linear-gradient(135deg, #1e40af, #1e3a8a);
  border-top: 2px solid rgba(255, 255, 255, 0.2);
  z-index: 1020;
  padding: 0.75rem 0;
}

.sticky-service-link {
  padding: 0.5rem 1rem;
  border-radius: 0.375rem;
  transition: all 0.3s ease;
  display: inline-block;
  color: white !important;
  text-decoration: none !important;
  font-size: 0.875rem;
  font-weight: 500;
  border: 1px solid transparent;
  white-space: nowrap;
}

.sticky-service-link:hover {
  background-color: white !important;
  color: #1e3a8a !important;
  transform: translateY(-2px);
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.2);
  border-color: white;
} */

/* Contact page tweaks */
.hero-section .hero-content {
  padding-top: 3rem;
  padding-bottom: 3rem;
}

.card .form-label {
  font-weight: 600;
}

.map-fallback {
  width: 100%;
  height: 100%;
  min-height: 260px;
  background: linear-gradient(135deg, #f1f5f9, #e2e8f0);
  border-radius: 0.25rem;
  color: #6b7280;
}

/* Tablet view (768px - 991px) */
@media (min-width: 768px) and (max-width: 991px) {
  /* Container and spacing adjustments */
  .container {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }

  /* Hero section adjustments */
  .hero-section {
    min-height: 60vh;
  }

  .hero-title {
    font-size: 2rem !important;
  }

  .hero-subtitle {
    font-size: 1.1rem !important;
  }

  /* Navbar adjustments */
  .navbar-brand img {
    height: 45px !important;
    width: 45px !important;
  }

  .navbar-brand h1 {
    font-size: 1rem !important;
    line-height: 1.3 !important;
  }

  .navbar-brand p {
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
  }

  .sticky-top {
    position: sticky;
    top: 0;
    z-index: 1030;
  }

  /* Top bar font controls */
  .bg-navbar .btn-sm {
    font-size: 0.8rem !important;
    padding: 0.35rem 0.65rem !important;
  }

  .bg-navbar .d-flex.gap-2 {
    gap: 0.5rem !important;
  }

  /* Official cards in hero section */
  .hero-section .d-flex.gap-3 {
    gap: 1rem !important;
  }

  .hero-section .d-flex.gap-2 {
    font-size: 0.85rem;
  }

  .hero-section .bg-light.rounded-circle {
    width: 45px !important;
    height: 45px !important;
  }

  .hero-section h6 {
    font-size: 0.9rem !important;
  }

  .hero-section .small {
    font-size: 0.75rem !important;
  }

  .hero-section .bg-dark.bg-opacity-50 {
    padding: 2.5rem 0 !important;
  }

  /* Search bar */
  .search-container {
    max-width: 500px;
  }

  .form-control {
    font-size: 0.95rem !important;
  }

  .search-container .btn {
    padding: 0.4rem 1.2rem !important;
  }

  /* Statistics cards */
  .stats-card {
    min-height: 140px;
  }

  .stats-card .fs-1 {
    font-size: 2rem !important;
  }

  .stats-card h3 {
    font-size: 1.5rem !important;
  }

  .stats-card p {
    font-size: 0.9rem !important;
  }

  /* Cards general */
  .card {
    margin-bottom: 1rem;
  }

  .card-body {
    padding: 1.25rem !important;
  }

  .card h4 {
    font-size: 1.25rem !important;
  }

  .card h3 {
    font-size: 1.5rem !important;
  }

  .card h5 {
    font-size: 1.1rem !important;
  }

  .card p {
    font-size: 0.95rem !important;
  }

  .card .small {
    font-size: 0.85rem !important;
  }

  /* Card hover effects - optimized for tablet touch */
  .card:hover {
    transform: translateY(-3px);
  }

  .official-card:hover {
    transform: translateY(-7px);
  }

  .transform-hover:hover {
    transform: translateY(-3px);
  }

  /* Map container */
  .map-container {
    min-height: 240px;
  }

  .map-image {
    border-radius: 0.375rem;
  }

  /* About page content row */
  .content-row {
    margin-bottom: 2rem !important;
  }

  .content-row .col-lg-6 {
    margin-bottom: 1.5rem;
  }

  /* Contact page adjustments */
  .hero-content {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  .display-6 {
    font-size: 2rem !important;
  }

  .lead {
    font-size: 1rem !important;
  }

  /* Form elements */
  .form-label {
    font-size: 0.95rem !important;
    font-weight: 600;
  }

  .form-control,
  textarea.form-control {
    font-size: 0.95rem !important;
    padding: 0.6rem 0.85rem !important;
  }

  textarea.form-control {
    min-height: 120px;
  }

  .btn {
    font-size: 0.9rem !important;
    padding: 0.5rem 1rem !important;
    min-height: 42px;
  }

  .btn-primary {
    padding: 0.55rem 1.25rem !important;
  }

  /* Make buttons more touch-friendly */
  .btn-outline-light,
  .btn-outline-primary {
    padding: 0.5rem 0.9rem !important;
  }

  /* Contact page specific */
  .col-lg-7,
  .col-lg-5 {
    margin-bottom: 1.5rem;
  }

  .gap-2 {
    gap: 0.75rem !important;
  }

  /* Footer */
  footer {
    padding: 1.5rem 0 !important;
    margin-top: 3rem !important;
  }

  footer p {
    font-size: 0.9rem !important;
  }

  /* Navigation spacing */
  .navbar-nav .gap-3 {
    gap: 1.5rem !important;
  }

  .navbar-nav .nav-link {
    font-size: 0.95rem !important;
    padding: 0.5rem 0.75rem !important;
  }

  /* Sections spacing */
  section {
    padding-top: 3rem !important;
    padding-bottom: 3rem !important;
  }

  .py-5 {
    padding-top: 2.5rem !important;
    padding-bottom: 2.5rem !important;
  }

  .my-5 {
    margin-top: 2.5rem !important;
    margin-bottom: 2.5rem !important;
  }

  /* Icons sizing */
  .bi {
    font-size: 1.1em;
  }

  .fs-1 {
    font-size: 2.25rem !important;
  }

  .fs-2 {
    font-size: 1.75rem !important;
  }

  .fs-4 {
    font-size: 1.25rem !important;
  }

  .fs-5 {
    font-size: 1.1rem !important;
  }

  /* Text sizing */
  h1 {
    font-size: 2rem !important;
  }

  h2 {
    font-size: 1.75rem !important;
  }

  h3 {
    font-size: 1.5rem !important;
  }

  h4 {
    font-size: 1.25rem !important;
  }

  h5 {
    font-size: 1.1rem !important;
  }

  h6 {
    font-size: 1rem !important;
  }

  /* Improve touch targets for tablet */
  a,
  button {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav-link {
    min-height: 40px;
  }

  /* Optimize image display */
  img {
    max-width: 100%;
    height: auto;
  }

  /* Grid adjustments */
  .row {
    margin-left: -0.75rem;
    margin-right: -0.75rem;
  }

  .row > * {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  .g-4 {
    gap: 1.25rem !important;
  }

  .gy-4 {
    row-gap: 1.25rem !important;
  }

}

@media (max-width: 767px) {
  .hero-section {
    min-height: 40vh;
  }
  .map-container {
    min-height: 200px;
  }

  .navbar-brand img {
    height: 40px !important;
    width: 40px !important;
  }

  .navbar-brand h1 {
    font-size: 0.75rem !important;
    line-height: 1.2 !important;
  }

  .navbar-brand p {
    font-size: 0.55rem !important;
    line-height: 1.2 !important;
  }

  .navbar-brand {
    max-width: 75%;
  }

  .navbar-brand .me-3 {
    margin-right: 0.5rem !important;
  }
}

@media (max-width: 576px) {
  .navbar-brand img {
    height: 32px !important;
    width: 32px !important;
    margin-right: 0.4rem !important;
  }

  .navbar-brand h1 {
    font-size: 0.65rem !important;
    margin-bottom: 0.2rem !important;
    line-height: 1.1 !important;
  }

  .navbar-brand p {
    font-size: 0.5rem !important;
    line-height: 1.1 !important;
  }

  .navbar-brand {
    max-width: 65%;
  }
}

/* Main nav bar — white on all screen sizes */
.site-main-nav {
  background-color: #ffffff;
}

/* Nested dropdown submenu */
.dropdown-submenu {
  position: relative;
}
.dropdown-submenu > .dropdown-menu {
  top: 0;
  left: 100%;
  margin-top: 0;
  min-width: 180px;
  display: none;
}
.dropdown-submenu:hover > .dropdown-menu {
  display: block;
}
.dropdown-submenu > .dropdown-toggle::after {
  border-top: 0.3em solid transparent;
  border-right: 0;
  border-bottom: 0.3em solid transparent;
  border-left: 0.3em solid;
}

@media (max-width: 400px) {
  .navbar-brand img {
    height: 28px !important;
    width: 28px !important;
    margin-right: 0.3rem !important;
  }

  .navbar-brand h1 {
    font-size: 0.6rem !important;
    margin-bottom: 0.15rem !important;
    line-height: 1.1 !important;
  }

  .navbar-brand p {
    font-size: 0.45rem !important;
    line-height: 1.1 !important;
  }

  .navbar-brand {
    max-width: 60%;
  }
}
