/* Archives */
.facilities-title {
  text-align: center;
  font-size: 2.5em;
  margin-bottom: 30px;
  margin-top: 30px;
}

.facility-search-form {
  text-align: center;
  margin-bottom: 30px;
}
#facility-search-input {
  padding: 10px;
  width: 400px;
  max-width: 100%;
  font-size: 16px;
  border: 1px solid #ccc;
  border-radius: 6px;
}

.facility-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(500px, 1fr));
  gap: 20px;
}

.facility-card {
  display: flex;
  flex-direction: column;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  transition: 0.3s ease;
}

.facility-card:hover {
  box-shadow: 0 0 12px rgba(0, 0, 0, 0.08);
}

.facility-card-inner {
  display: flex;
  gap: 16px;
  padding: 16px;
  flex: 1;
}

.facility-thumbnail img {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
}

.facility-info {
  flex: 1;
}

.facility-info h3 {
  font-size: 18px;
  margin: 0 0 8px;
}

.facility-info small {
  display: block;
  color: #555;
  font-size: 13px;
}

.facility-meta .badge {
  display: inline-block;
  padding: 4px 10px;
  background: #0073aa;
  color: #fff;
  font-size: 12px;
  border-radius: 20px;
  margin-bottom: 8px;
}

.facility-meta a {
  background: #222;
  color: #fff;
  padding: 6px 12px;
  font-size: 13px;
  border-radius: 4px;
  text-decoration: none;
}
.facility-meta a:hover {
  background: #444;
}

.facility-pagination {
  margin-top: 30px;
  text-align: center;
}
.facility-pagination .page-link {
  display: inline-block;
  margin: 0 5px;
  background: #eee;
  padding: 6px 12px;
  border-radius: 4px;
  cursor: pointer;
}
.facility-pagination .page-link:hover {
  background: #ccc;
}
/* Responsive Fix for Small Screens */
@media (max-width: 768px) {
  .facility-card {
    flex-direction: column;
    text-align: center;
    align-items: center;
  }
  .facility-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
  }
  .facility-card-inner {
    display: flex;
    gap: 16px;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
  }

  .facility-thumbnail img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 6px;
  }
  .facility-thumb {
    width: 100%;
    height: 180px;
    border-radius: 8px 8px 0 0;
  }

  .facility-info,
  .facility-right {
    align-items: center;
    text-align: left;
    padding: 12px;
  }

  .facility-right {
    flex-direction: column;
    gap: 10px;
  }
}

/* Single */

.facility-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 1rem;
  margin: 1rem auto;
  font-size: 16px;
  color: #444;
}

.spinner-loader {
  width: 20px;
  height: 20px;
  border: 3px solid #ddd;
  border-top: 3px solid #0073aa;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

.spinner-text {
  font-weight: 500;
  font-family: "Segoe UI", sans-serif;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Jumbotron */
.facility-jumbotron {
  position: relative;
  overflow: hidden;
}
.facility-jumbotron img {
  width: 100%;
  height: 500px;
  object-fit: cover;
}

.facility-title {
  font-size: 44px;
  margin-bottom: 10px;
  margin-top: 20px;
  font-weight: 600;
}
.facility-meta {
  font-size: 14px;
  line-height: 1.6;
  display: flex;
  gap: 10px;
  align-items: center;
}

/* Main content */
.facility-description {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 40px;
}
.facility-description .description {
  flex: 2;
}
.facility-description .gallery-facility {
  flex: 2;
}
.facility-description .gallery-facility h3 {
  margin-bottom: 10px;
}
.facility-description .gallery-facility a img {
  width: 129px;
  height: 100px;
  object-fit: cover;
  border-radius: 6px;
  margin-right: 10px;
  margin-top: 10px;
}

/* Related Sidebar */
.facility-related {
  margin-top: 40px;
}
.facility-related ul {
  list-style: none;
  padding: 0;
}
.facility-related li {
  margin-bottom: 10px;
  border-left: 5px solid #0c5d1c;
  background-color: rgb(145, 253, 190);
  box-shadow: 0 2px 8px rgb(0 0 0 / 46%);
  padding: 5px;
}
.facility-related a {
  color: rgb(0, 0, 0);
  text-decoration: none;
  margin-left: 10px;
}
.facility-related li:hover {
  text-decoration: none;
  background-color: rgb(12, 218, 132);
}

/* Facility detail */
.facility-details-grid {
  margin-top: 50px;
}
.facility-details-grid h3 {
  margin-bottom: 20px;
}
.facility-details-grid .grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 15px;
  align-items: baseline;
}
.grid-item {
  background: rgb(191, 255, 182);
  border: 1px solidrgb(189, 182, 182);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  padding: 15px;
  border-radius: 8px;
  font-weight: 500;
  text-align: left;
  transition: 0.3s ease;
  border-left: 5px solid #0e3111ee;
}
.grid-item:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Map */
.location-map {
  margin-top: 0;
}
.facility-map {
  margin-top: -50px;
}
.map-wrapper iframe {
  width: 100%;
  height: 250px;
  border: none;
  border-radius: 8px;
}

/* Last update */
.last-updated {
  font-size: 14px;
  color: rgb(26, 28, 29);
  margin-top: 30px;
  text-align: left;
}

/* Responsive */
@media (max-width: 768px) {
  .facility-jumbotron img {
    width: 100%;
    height: auto;
    display: block;
  }
  .facility-description {
    flex-direction: column;
    margin-top: 15px;
  }
  .facility-title {
    font-size: 24px;
    margin-bottom: 10px;
    margin-top: 20px;
    font-weight: 600;
  }
  .facility-meta {
    font-size: 11px;
    display: flex;
    gap: 6px;
    align-items: center;
    flex-wrap: wrap;
  }
  .gallery-facility {
    margin-top: 0;
  }
  .facility-map {
    margin-top: 50px;
  }
  .facility-description .gallery-facility a img {
    width: 100%;
    height: auto;
    object-fit: cover;
    border-radius: 6px;
    margin-right: 10px;
    margin-top: 10px;
  }
}
