﻿/**
 * Galeria uniforme - carrusel responsive (Divi)
 */
.galeria-uniforme.et_pb_gallery_grid {
  position: relative;
  overflow: hidden;
}

.galeria-uniforme .et_pb_gallery_items {
  display: flex;
  flex-wrap: wrap;
  transition: none;
}

.galeria-uniforme .et_pb_gallery_grid .et_pb_gallery_items {
  transition: height 0s !important;
}

.galeria-uniforme .et_pb_gallery_item {
  animation: none !important;
}

.galeria-uniforme.is-tablet .et_pb_gallery_items,
.galeria-uniforme.is-mobile .et_pb_gallery_items {
  flex-wrap: nowrap;
}

.galeria-uniforme .et_pb_gallery_item {
  box-sizing: border-box;
}

.galeria-uniforme .et_pb_gallery_image img,
.galeria-uniforme .et_pb_gallery_item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.galeria-uniforme .et_pb_gallery_image,
.galeria-uniforme .et_pb_gallery_item .et_portfolio_image {
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.galeria-uniforme .et_pb_gallery_image a {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
}

.galeria-uniforme .et_pb_gallery_image a img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
}
.galeria-uniforme .et_pb_gallery_image,
.galeria-uniforme .et_pb_gallery_image a,
.galeria-uniforme .et_pb_gallery_image img,
.galeria-uniforme .et_pb_gallery_item img {
  transition: none !important;
}

/* Desktop: 4 imágenes en una fila, sin wrap */
.galeria-uniforme.is-desktop .et_pb_gallery_items {
  display: flex !important;
  flex-wrap: nowrap !important;
  gap: 6px;
}

.galeria-uniforme.is-desktop .et_pb_gallery_item {
  flex: 1 1 0;
  min-width: 0;
  width: auto !important;
  max-width: none !important;
  margin: 0 !important;
  margin-right: 0 !important;
  padding: 0 !important;
  float: none !important;
  clear: none !important;
}

.galeria-uniforme .et_pb_gallery_pagination {
  display: none !important;
}

.galeria-uniforme .xhome-gallery-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-top: 1.25rem;
  flex-wrap: wrap;
}

.galeria-uniforme .xhome-gallery-arrow {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border: 2px solid #4f2c1d;
  background: rgba(255, 255, 255, 0.92);
  color: #4f2c1d;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.25rem;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  transition: background 0.2s ease, color 0.2s ease;
  touch-action: manipulation;
}

.galeria-uniforme .xhome-gallery-arrow:hover,
.galeria-uniforme .xhome-gallery-arrow:focus {
  background: #4f2c1d;
  color: #fff;
  outline: none;
}

.galeria-uniforme .xhome-gallery-arrow:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

.galeria-uniforme .xhome-gallery-dots {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  max-width: 100%;
}

.galeria-uniforme .xhome-gallery-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: none;
  background: rgba(79, 44, 29, 0.35);
  cursor: pointer;
  padding: 0;
  flex-shrink: 0;
  touch-action: manipulation;
  transition: background 0.2s ease, transform 0.2s ease;
}

.galeria-uniforme .xhome-gallery-dot.is-active {
  background: #4f2c1d;
  transform: scale(1.15);
}

.galeria-uniforme .xhome-gallery-dot:hover,
.galeria-uniforme .xhome-gallery-dot:focus {
  background: #4f2c1d;
  outline: none;
}

@media (min-width: 768px) {
  .galeria-uniforme.is-desktop,
  .galeria-uniforme.is-tablet {
    padding-left: 52px;
    padding-right: 52px;
  }

  .galeria-uniforme.is-desktop > .xhome-gallery-arrow--side,
  .galeria-uniforme.is-tablet > .xhome-gallery-arrow--side {
    position: absolute;
    top: 40%;
    transform: translateY(-50%);
    z-index: 5;
  }

  .galeria-uniforme.is-desktop > .xhome-gallery-arrow--prev,
  .galeria-uniforme.is-tablet > .xhome-gallery-arrow--prev {
    left: 4px;
  }

  .galeria-uniforme.is-desktop > .xhome-gallery-arrow--next,
  .galeria-uniforme.is-tablet > .xhome-gallery-arrow--next {
    right: 4px;
  }

  .galeria-uniforme.is-desktop .xhome-gallery-controls,
  .galeria-uniforme.is-tablet .xhome-gallery-controls {
    justify-content: center;
  }
}

@media (min-width: 768px) and (max-width: 980px) {
  .galeria-uniforme.is-tablet .et_pb_gallery_items {
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 6px;
  }

  .galeria-uniforme.is-tablet .et_pb_gallery_item {
    flex: 1 1 0;
    min-width: 0;
    width: auto !important;
    max-width: none !important;
    margin: 0 !important;
    margin-right: 0 !important;
    padding: 0 !important;
    float: none !important;
    clear: none !important;
  }

  .galeria-uniforme.is-tablet .et_pb_gallery_item.xhome-slide-visible {
    display: block !important;
    opacity: 1 !important;
  }

  .galeria-uniforme.is-tablet .xhome-gallery-controls {
    gap: 1rem;
  }
}

@media (max-width: 767px) {
  .galeria-uniforme.is-mobile .et_pb_gallery_items {
    touch-action: pan-y;
    user-select: none;
    min-height: 280px;
  }

  .galeria-uniforme.is-mobile .et_pb_gallery_item {
    flex: 0 0 100%;
    max-width: 100%;
    padding: 0 4px 12px;
    float: none !important;
    width: 100% !important;
    margin: 0 !important;
  }

  .galeria-uniforme.is-mobile .et_pb_gallery_item.xhome-slide-visible {
    display: block !important;
    opacity: 1 !important;
  }

  .galeria-uniforme.is-mobile .xhome-gallery-controls {
    flex-direction: row;
    flex-wrap: nowrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0 0.25rem;
  }

  .galeria-uniforme.is-mobile .xhome-gallery-dots {
    flex: 1 1 auto;
    min-width: 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    justify-content: flex-start;
    flex-wrap: nowrap;
    padding: 0.25rem 0;
  }

  .galeria-uniforme.is-mobile .xhome-gallery-dots::-webkit-scrollbar {
    display: none;
  }

  .galeria-uniforme.is-mobile .xhome-gallery-arrow {
    width: 48px;
    height: 48px;
  }
}