/* Gallery & Floor Plan dropdown styles */

.collapsible-toggle {
  background: #183153;
  color: #fff;
  border: none;
  padding: 0.75rem 1.25rem;
  font-size: 1rem;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.3s ease;
}

.collapsible-toggle:hover {
  background: #0f223a;
}

.collapsible-toggle:focus-visible {
  outline: 3px solid #ffd166;
  outline-offset: 2px;
}

.collapsible-content {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, opacity 0.4s ease;
}

.collapsible-content.open {
  max-height: 2000px;
  opacity: 1;
}

.hidden {
  display: none;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.gallery-card {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  transition: box-shadow 0.3s ease;
}

.gallery-card img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.3s ease;
}

.gallery-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(24,49,83,0.4), rgba(24,49,83,0.1));
  pointer-events: none;
}

.gallery-card figcaption {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(24,49,83,0.75);
  color: #fff;
  padding: 0.5rem;
  font-size: 0.9rem;
  text-align: center;
}

.gallery-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
}

.gallery-card:hover img {
  transform: scale(1.03);
}

/* Floor plan styles */
.floorplan-wrapper {
  margin-top: 1rem;
  text-align: center;
}

.floorplan-viewer {
  border: 1px solid #ddd;
  border-radius: 8px;
  overflow: hidden;
  background: #f7f7f7;
}

.floorplan-viewer img {
  max-width: 100%;
  height: auto;
  object-fit: contain;
  aspect-ratio: 16/10;
  display: block;
}

.floorplan-pdf {
  width: 100%;
  height: 600px;
}

@media (max-width: 640px) {
  .floorplan-pdf {
    height: 400px;
    max-height: 80vh;
  }
}

.floorplan-link {
  display: inline-block;
  margin-top: 0.75rem;
  color: #183153;
  pointer-events: auto;
}

.floorplan-link[aria-disabled='true'] {
  pointer-events: none;
  opacity: 0.6;
}

.floorplan-message {
  margin-top: 0.75rem;
}

/* Noscript fallback */
#gallery-noscript {
  display: none;
}
#gallery-noscript:target {
  display: grid;
}
.noscript-toggle {
  display: inline-block;
  margin-top: 0.5rem;
  color: #183153;
}
