.aldeias-custom-gallery {
  margin-top: clamp(1.75rem, 3vw, 2.5rem);
}

.aldeias-custom-gallery-note {
  margin: 0 0 0.9rem;
  color: #5c5146;
  font-size: 0.88rem;
  line-height: 1.5;
  text-align: center;
}

.aldeias-custom-gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.aldeias-custom-gallery-item {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  margin: 0;
}

.aldeias-custom-gallery-link {
  display: block;
  border-radius: 8px;
  overflow: hidden;
  background: #f5f1eb;
  box-shadow: 0 16px 32px rgba(51, 24, 0, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.aldeias-custom-gallery-link:hover,
.aldeias-custom-gallery-link:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 20px 38px rgba(51, 24, 0, 0.14);
}

.aldeias-custom-gallery-image {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1;
  object-fit: cover;
}

.aldeias-custom-gallery-caption {
  margin: 0;
  font-size: 0.89rem;
  line-height: 1.55;
  color: #5c5146;
  text-align: center;
}

.glightbox-clean .gslide-description {
  background: transparent;
}

.glightbox-clean .gdesc-inner {
  padding: 0.9rem 0 0;
  color: #f7f1eb;
  font-size: 0.98rem;
  line-height: 1.6;
}

.glightbox-clean .gprev,
.glightbox-clean .gnext,
.glightbox-clean .gclose {
  width: 44px;
  height: 44px;
  border-radius: 999px;
  background-color: rgba(237, 78, 38, 0.92);
  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
  color: transparent;
  box-shadow: 0 14px 30px rgba(237, 78, 38, 0.28);
}

.glightbox-clean .gprev {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 18l-6-6 6-6'/%3E%3C/svg%3E");
}

.glightbox-clean .gnext {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 6l6 6-6 6'/%3E%3C/svg%3E");
}

.glightbox-clean .gclose {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23ffffff' stroke-width='2.25' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M18 6L6 18M6 6l12 12'/%3E%3C/svg%3E");
}

@media (min-width: 768px) {
  .aldeias-custom-gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (min-width: 1200px) {
  .aldeias-custom-gallery-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }
}

.wp-admin .aldeias-custom-gallery-admin-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 0.75rem;
}

.wp-admin .aldeias-custom-gallery-admin-list {
  display: grid;
  gap: 0.75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.wp-admin .aldeias-custom-gallery-admin-item {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem;
  border: 1px solid #d9d9d9;
  border-radius: 10px;
  background: #fff;
  cursor: move;
}

.wp-admin .aldeias-custom-gallery-admin-placeholder {
  min-height: 96px;
  border: 2px dashed #d0d7de;
  background: #f6f8fa;
}

.wp-admin .aldeias-custom-gallery-admin-thumb {
  width: 80px;
  aspect-ratio: 1 / 1;
  border-radius: 8px;
  overflow: hidden;
  background: #f6f6f6;
}

.wp-admin .aldeias-custom-gallery-admin-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.wp-admin .aldeias-custom-gallery-admin-meta {
  display: grid;
  gap: 0.25rem;
}

.wp-admin .aldeias-custom-gallery-admin-meta strong {
  font-size: 0.95rem;
  color: #1f2328;
}

.wp-admin .aldeias-custom-gallery-admin-meta span {
  font-size: 0.9rem;
  color: #646970;
  line-height: 1.45;
}

.wp-admin .aldeias-custom-gallery-admin-empty {
  margin: 0.75rem 0 0;
  color: #646970;
}

.wp-admin .aldeias-custom-gallery-admin-empty.is-hidden {
  display: none;
}

@media (max-width: 782px) {
  .wp-admin .aldeias-custom-gallery-admin-item {
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .wp-admin .aldeias-custom-gallery-remove {
    grid-column: 1 / -1;
    justify-self: start;
  }
}
