/**
 * Facility Page Component
 * Styles for institution hall and square pages
 */

/* Facility Layout */
.facility-intro {
  margin-bottom: 15px;
  line-height: 1.8;
}

.facility-details,
.facility-rooms,
.facility-notes,
.facility-map,
.facility-features,
.facility-equipment {
  margin-bottom: 15px;
}

.facility-details h2,
.facility-rooms h2,
.facility-notes h2,
.facility-map h2,
.facility-features h2,
.facility-equipment h2 {
  font-size: 1.3rem;
  color: var(--primary-color);
  border-bottom: 2px solid var(--primary-color);
  padding-bottom: 8px;
  margin-bottom: 10px;
}

/* Info Table */
.info-table {
  width: 100%;
  border-collapse: collapse;
}

.info-table tr {
  border-bottom: 1px solid #ddd;
}

.info-table th {
  background: var(--primary-color);
  color: #ffffff;
  padding: 10px 15px;
  text-align: left;
  width: 130px;
  font-weight: 600;
  font-size: 0.9rem;
}

.info-table td {
  padding: 10px 15px;
  background: #fafafa;
}

.info-table a {
  color: var(--primary-color);
  text-decoration: none;
}

.info-table a:hover {
  text-decoration: underline;
}

/* Rooms/Equipment List */
.rooms-list {
  list-style: none;
  padding: 0;
}

.rooms-list li {
  padding: 10px 15px;
  background: #f5f5f5;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  border-left: 4px solid var(--primary-color);
}

/* Notes Content */
.notes-content {
  background: #fff9e6;
  padding: 15px;
  border-radius: var(--radius-sm);
  border-left: 4px solid #f0ad4e;
}

.notes-content p {
  margin-bottom: 10px;
}

.notes-content p:last-child {
  margin-bottom: 0;
}

/* External Links */
.external-link-box {
  margin-top: 10px;
}

.external-link {
  color: var(--primary-color) !important;
  text-decoration: underline;
  font-weight: 600;
}

.external-link:hover {
  opacity: 0.8;
}

.link-icon {
  font-size: 0.85em;
  margin-left: 2px;
}

/* Facility Navigation */
.facility-nav {
  display: flex;
  justify-content: space-between;
  margin-top: 40px;
  padding-top: 20px;
  border-top: 1px solid #eee;
}

.facility-nav a {
  color: var(--primary-color);
  text-decoration: none;
  font-weight: 500;
}

.facility-nav a:hover {
  text-decoration: underline;
}

/* Feature Cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.feature-card {
  background: #f8f8f8;
  border-radius: var(--radius-md);
  padding: 25px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow-lg);
}

.feature-icon {
  font-size: 3rem;
  margin-bottom: 15px;
}

.feature-card h3 {
  color: var(--primary-color);
  margin-bottom: 10px;
}

.feature-card p {
  color: #666;
  font-size: 0.95rem;
  line-height: 1.6;
}

/* Facility Slideshow */
.facility-slideshow {
  margin: 30px 0;
  max-width: 100%;
}

.slideshow-container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
}

.slides-wrapper {
  display: flex;
  transition: transform 0.5s ease-in-out;
  width: 100%;
}

.slideshow-container .slide {
  width: 100%;
  min-width: 100%;
  flex: 0 0 100%;
  box-sizing: border-box;
}

.slideshow-container .slide img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
  cursor: pointer;
}

.slideshow-nav {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: white;
  cursor: pointer;
  transition: background 0.3s;
  user-select: none;
  z-index: 10;
}

.slideshow-nav.prev {
  left: 0;
  background: linear-gradient(to right, rgba(0, 0, 0, 0.4), transparent);
}

.slideshow-nav.next {
  right: 0;
  background: linear-gradient(to left, rgba(0, 0, 0, 0.4), transparent);
}

.slideshow-nav:hover {
  background: rgba(0, 0, 0, 0.5);
}

.slideshow-dots {
  text-align: center;
  padding: 15px 0;
}

.slideshow-dots .dot {
  display: inline-block;
  width: 12px;
  height: 12px;
  margin: 0 5px;
  background-color: #ccc;
  border-radius: 50%;
  cursor: pointer;
  transition: background-color 0.3s;
}

.slideshow-dots .dot.active,
.slideshow-dots .dot:hover {
  background-color: var(--primary-color);
}

/* Image Modal */
.image-modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.9);
  align-items: center;
  justify-content: center;
}

.modal-content {
  margin: auto;
  display: block;
  max-width: 90%;
  max-height: 90vh;
  border-radius: 4px;
  object-fit: contain;
  animation: zoom 0.3s;
}

@keyframes zoom {
  from {
    transform: scale(0.1);
  }

  to {
    transform: scale(1);
  }
}

.close-modal {
  position: absolute;
  top: 15px;
  right: 35px;
  color: #f1f1f1;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  z-index: 1001;
}

.close-modal:hover,
.close-modal:focus {
  color: #bbb;
  text-decoration: none;
  cursor: pointer;
}

/* Responsive */
@media (max-width: 768px) {
  .info-table th {
    display: block;
    width: 100%;
  }

  .info-table td {
    display: block;
  }

  .facility-nav {
    flex-direction: column;
    gap: 15px;
  }

  .slideshow-nav {
    width: 40px;
    font-size: 20px;
  }
}