/* ===== gallery.css ===== */

/* === Visit Hub Card Styling (Professional Overhaul) === */
.visit-card {
  border: 1px solid #e9ecef; /* Lighter, cleaner border */
  border-radius: 0.75rem; /* Softer rounded corners */
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.04);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  background-color: #ffffff;
  overflow: hidden; /* Ensures image corners are rounded */
}

.visit-card:hover {
  transform: translateY(-8px);
  box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07), 0 3px 6px rgba(0, 0, 0, 0.05);
}

.visit-card .card-img-top {
  height: 220px;
  object-fit: cover; /* Prevents image stretching */
  border-bottom: 1px solid #e9ecef;
}

.visit-card .card-body {
  padding: 1.5rem;
}

.visit-card .card-title {
  font-weight: 600;
  color: #212529;
  margin-bottom: 0.5rem;
}

.visit-card .card-text.text-muted {
  font-size: 0.875rem;
  margin-bottom: 1rem;
}

.visit-card .card-text {
  color: #6c757d;
  line-height: 1.6;
}

/* === MODAL STYLING === */

.modal-header {
    position: relative; /* Needed for absolute positioning of the close button */
    border-bottom: 1px solid #dee2e6;
    padding: 1rem 1.5rem;
}

.modal-section-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #343a40;
}

/* NEW: Vertically center details column when no videos are present */
#modal-details-column.no-videos {
  display: flex;
  flex-direction: column;
  justify-content: center;
}


/* Custom Close Button (Matches adPopup) */
.modal-close-custom {
  position: absolute;
  top: -20px;
  right: -20px;
  background-color: #007bff;
  color: white;
  font-size: 24px;
  font-weight: bold;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.3s ease;
  z-index: 1060; /* Higher than modal content */
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  border: none;
  padding: 0;
  line-height: 1; /* Ensures 'x' is centered */
}

.modal-close-custom:hover {
  background-color: #0056b3;
  transform: scale(1.1);
}


/* Image Slider inside Modal */
.image-slider {
  position: relative;
  text-align: center;
}

.main-image {
  width: 100%;
  max-height: 550px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #f8f9fa;
  border-radius: 0.5rem;
  overflow: hidden;
}

.main-image img {
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 550px;
  object-fit: contain;
  transition: opacity 0.4s ease;
}

/* Navigation Arrows (High-Contrast Redesign) */
.arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: rgba(255, 255, 255, 0.9); /* Opaque white background */
  color: #212529; /* Dark icon color */
  border: none;
  border-radius: 50%;
  width: 45px;
  height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
  transition: background-color 0.3s ease, transform 0.3s ease;
  z-index: 10;
}

.arrow:hover {
  background-color: #ffffff;
  transform: translateY(-50%) scale(1.1);
}

.prev-arrow {
  left: 15px;
}

.next-arrow {
  right: 15px;
}

/* Image Counter Styling (Replaces Dots) */
.image-counter-container {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(0, 0, 0, 0.6);
    color: #fff;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.875rem;
    z-index: 10;
    -webkit-backdrop-filter: blur(5px);
    backdrop-filter: blur(5px);
}

/* Video Section in Modal */
#modal-video-container h4 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 1rem;
  color: #343a40;
}

#modal-video-container .ratio {
  border-radius: 0.5rem;
  overflow: hidden;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
}

#modal-video-container .ratio:hover {
  transform: scale(1.02);
}