.gallery-section {
  padding: 5rem 0;
}

.gallery-shell {
}

.gallery-segments {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  padding: 0.3rem;
  background: #f1f3f5;
  border-radius: 999px;
  margin-bottom: 1.75rem;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.gallery-segment {
  appearance: none;
  border: 0;
  background: transparent;
  color: #444;
  border-radius: 999px;
  padding: 0.7rem 1.1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.gallery-segment:hover {
  background: rgba(255, 255, 255, 0.7);
}

.gallery-segment.is-active {
  background: #ff8000;
  color: #fff;
  box-shadow: 0 4px 10px rgba(255, 128, 0, 0.28);
}

.gallery-overview {
  display: block;
}

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

.gallery-card {
  border: 0;
  background: #fff;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.08);
  cursor: pointer;
  text-align: left;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  padding: 0;
}

.gallery-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
}

.gallery-card-cover {
  position: relative;
  overflow: hidden;
  aspect-ratio: 16 / 10;
  background: #d9d9d9;
}

.gallery-card-cover img {
  width: 200%;
  height: 100%;
  object-fit: cover;
  object-position: left center;
  display: block;
}

.gallery-card-body {
  padding: 1rem 1rem 1.1rem;
}

.gallery-card-type {
  display: inline-block;
  margin-bottom: 0.45rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #ff8000;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.gallery-card-title {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
  color: #222;
}

.gallery-card-subtitle {
  margin: 0.45rem 0 0 0;
  color: #666;
  font-size: 0.95rem;
}

.gallery-viewer-panel {
  margin-top: 0.5rem;
}

.gallery-viewer-panel.is-hidden {
  display: none;
}

.gallery-viewer-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}

.gallery-viewer-meta h3 {
  margin: 0;
  font-size: 1.3rem;
}

.gallery-viewer-meta p {
  margin: 0.35rem 0 0 0;
  color: #666;
}

.gallery-viewer-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.gallery-action-btn {
  appearance: none;
  border: 1px solid rgba(255, 128, 0, 0.28);
  background: #fff;
  color: #333;
  border-radius: 999px;
  padding: 0.75rem 1rem;
  font: inherit;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.18s ease;
}

.gallery-action-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.08);
}

.gallery-action-btn--primary {
  background: #ff8000;
  color: #fff;
  border-color: #ff8000;
}

.gallery-iframe-wrap {
  position: relative;
  width: 100%;
  min-height: 70vh;
  border-radius: 22px;
  overflow: hidden;
  background: #000;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

#galleryViewerFrame {
  width: 100%;
  height: 70vh;
  border: 0;
  display: block;
  background: #000;
}

.gallery-empty {
  padding: 2rem;
  border-radius: 20px;
  background: #fff;
  color: #666;
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

@media (max-width: 991px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .gallery-segments {
    display: flex;
    width: 100%;
    justify-content: center;
  }

  .gallery-segment {
    flex: 1 1 auto;
    text-align: center;
    padding: 0.7rem 0.8rem;
    font-size: 0.95rem;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .gallery-card {
    border-radius: 18px;
  }

  .gallery-card-cover {
    aspect-ratio: 16 / 9;
  }

  .gallery-card-body {
    padding: 0.9rem 0.9rem 1rem;
  }

  .gallery-viewer-toolbar {
    align-items: stretch;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
  }

  .gallery-viewer-meta h3 {
    font-size: 1.05rem;
  }

  .gallery-viewer-actions {
    width: 100%;
  }

  .gallery-action-btn {
    flex: 1 1 auto;
    text-align: center;
  }

  .gallery-iframe-wrap,
  #galleryViewerFrame {
    min-height: 78vh;
    height: 78vh;
    border-radius: 18px;
  }
}

@media (max-width: 480px) {
  .gallery-segment {
    padding: 0.65rem 0.55rem;
    font-size: 0.88rem;
  }

  .gallery-card-title {
    font-size: 1rem;
  }

  .gallery-card-subtitle {
    font-size: 0.9rem;
  }

  .gallery-iframe-wrap,
  #galleryViewerFrame {
    min-height: 82vh;
    height: 82vh;
  }
}