/* ===== ESTILOS GALERÍA DE ARTE ===== */
.gallery-section {
  padding: 5rem 0;
  position: relative;
}

.gallery-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10%;
  right: 10%;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(35, 55, 49, 0.1) 50%,
    transparent 100%
  );
}

/* Header de la galería */
.gallery-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  flex-wrap: wrap;
  gap: 2rem;
}

.gallery-logo h2 {
  font-size: 2.8rem;
  font-weight: 700;
  color: var(--primary-dark);
  margin: 0;
  line-height: 1;
  letter-spacing: 2px;
}

.logo-subtitle {
  font-size: 0.9rem;
  color: #666;
  letter-spacing: 3px;
  text-transform: uppercase;
  margin-top: 0.5rem;
  font-weight: 500;
}

.gallery-description {
  flex: 1;
  max-width: 500px;
  padding: 0 2rem;
}

.gallery-description p {
  font-size: 1.1rem;
  line-height: 1.6;
  color: #555;
  margin: 0;
  text-align: center;
}

.gallery-cta {
  display: flex;
  align-items: center;
}

.gallery-btn {
  padding: 0.9rem 2rem;
  background-color: transparent;
  border: 1px solid var(--primary-dark);
  color: var(--primary-dark);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 1px;
  border-radius: 25px;
  transition: all var(--transition-medium);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 180px;
}

.gallery-btn:hover {
  background-color: var(--primary-dark);
  color: white;
  transform: translateY(-2px);
  box-shadow: 0 5px 15px rgba(35, 55, 49, 0.1);
}

/* Carrusel de obras - CORREGIDO */
.gallery-carousel-container {
  position: relative;
  overflow: hidden;
}

.gallery-carousel {
  display: flex;
  transition: transform 0.5s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  gap: 1rem; /* MENOS ESPACIO ENTRE FOTOS */
  padding: 0;
}

.artwork-card {
  flex: 0 0 calc(33.333% - 0.67rem); /* 3 obras exactas */
  cursor: pointer;
  position: relative;
  transition: all var(--transition-medium);
}

.artwork-image {
  position: relative;
  overflow: hidden;
  margin-bottom: 0;
  height: 280px;
  background-color: #f5f5f5;
  border-radius: 0; /* SIN BORDES REDONDEADOS */
}

.artwork-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease;
}

.artwork-info {
  opacity: 0;
  transform: translateY(20px);
  transition: all var(--transition-medium);
  padding: 1rem 0;
  text-align: center;
  background: white;
}

.artwork-title {
  font-size: 1.3rem;
  font-weight: 600;
  color: var(--primary-dark);
  margin: 0 0 0.3rem 0;
}

.artist-name {
  font-size: 0.85rem;
  color: #666;
  font-style: italic;
  margin: 0;
}

/* Hover effects - Desktop only */
@media (hover: hover) and (pointer: fine) {
  .artwork-card:hover {
    transform: translateY(-4px);
  }

  .artwork-card:hover .artwork-image img {
    transform: scale(1.02);
  }

  .artwork-card:hover .artwork-info {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Controles del carrusel */
.carousel-control {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 45px;
  height: 45px;
  background-color: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(35, 55, 49, 0.15);
  border-radius: 0; /* SIN BORDES REDONDEADOS */
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 10;
  transition: all var(--transition-medium);
  opacity: 0.9;
}

.carousel-control.prev {
  left: 15px;
}

.carousel-control.next {
  right: 15px;
}

.carousel-control i {
  color: var(--primary-dark);
  font-size: 1.1rem;
}

.carousel-control:hover {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  opacity: 1;
}

.carousel-control:hover i {
  color: white;
}

/* Indicadores del carrusel */
.carousel-indicators {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 1.5rem;
}

.indicator {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background-color: rgba(35, 55, 49, 0.2);
  cursor: pointer;
  transition: all var(--transition-medium);
}

.indicator.active {
  background-color: var(--primary-dark);
  transform: scale(1.2);
}

/* Modal de detalles de obra */
.artwork-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.9);
  backdrop-filter: blur(10px);
  z-index: 3000;
  display: none;
  opacity: 0;
  transition: opacity 0.3s ease;
  padding: 2rem;
  overflow-y: auto;
}

.artwork-modal-overlay.active {
  display: flex;
  justify-content: center;
  align-items: center;
  opacity: 1;
}

.artwork-modal {
  background: white;
  border-radius: 20px;
  width: 90%;
  max-width: 1200px;
  max-height: 90vh;
  overflow-y: auto;
  position: relative;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
  transform: scale(0.9);
  transition: transform 0.3s ease;
}

.artwork-modal-overlay.active .artwork-modal {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 40px;
  height: 40px;
  background: rgba(35, 55, 49, 0.1);
  border: none;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  transition: all var(--transition-medium);
}

.modal-close:hover {
  background: var(--primary-dark);
  transform: rotate(90deg);
}

.modal-close i {
  color: var(--primary-dark);
  font-size: 1.2rem;
}

.modal-close:hover i {
  color: white;
}

.modal-content-ben {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  min-height: 600px;
}

.modal-artwork {
  padding: 3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f9f9f9;
  border-radius: 20px 0 0 20px;
}

.modal-artwork-image {
  width: 100%;
  height: 100%;
  max-height: 500px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.modal-artwork-image img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-height: 500px;
}

.modal-artist-info {
  padding: 3rem;
  background: white;
  border-radius: 0 20px 20px 0;
}

.artist-profile {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 3rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.artist-photo {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--accent-gold);
}

.artist-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.artist-details h3 {
  font-size: 1.8rem;
  color: var(--primary-dark);
  margin: 0 0 0.3rem 0;
}

.artist-location {
  color: #666;
  font-size: 0.9rem;
  margin: 0;
}

.artwork-details h2 {
  font-size: 2.2rem;
  color: var(--primary-dark);
  margin: 0 0 1rem 0;
  font-weight: 700;
}

.artwork-year,
.artwork-technique,
.artwork-dimensions {
  color: #666;
  font-size: 0.95rem;
  margin: 0 0 0.5rem 0;
}

.artwork-description {
  margin: 2rem 0;
  padding: 1.5rem;
  background: #f9f9f9;
  border-radius: 10px;
  border-left: 3px solid var(--accent-gold);
}

.artwork-description p {
  line-height: 1.6;
  color: #555;
  margin: 0;
}

.artwork-price {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 1.5rem;
  background: rgba(35, 55, 49, 0.05);
  border-radius: 10px;
  margin: 2rem 0;
}

.price-label {
  font-size: 0.9rem;
  color: #666;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.price-amount {
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--primary-dark);
}

.btn-more-info {
  width: 100%;
  padding: 1.2rem;
  background: var(--primary-dark);
  color: white;
  border: none;
  border-radius: 10px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition-medium);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.btn-more-info:hover {
  background: var(--secondary-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 20px rgba(35, 55, 49, 0.2);
}

/* Responsive design */
@media (max-width: 992px) {
  .artwork-card {
    flex: 0 0 calc(50% - 0.5rem); /* 2 obras en tablet */
  }

  .artwork-image {
    height: 350px;
  }

  .modal-content-ben {
    grid-template-columns: 1fr;
  }

  .gallery-header {
    flex-direction: column;
    text-align: center;
    gap: 1.5rem;
  }

  .gallery-description {
    padding: 0;
    order: 3;
  }

  .gallery-logo h2 {
    font-size: 2.2rem;
  }
}

@media (max-width: 768px) {
  .gallery-section {
    padding: 3rem 0;
  }

  .artwork-card {
    flex: 0 0 100%; /* 1 obra en móvil */
  }

  .artwork-image {
    height: 300px;
  }

  .carousel-control {
    opacity: 1;
    background-color: rgba(255, 255, 255, 0.9);
  }

  .artwork-info {
    opacity: 1;
    transform: translateY(0);
  }

  .artwork-modal {
    width: 98%;
    max-height: 95vh;
  }

  .modal-artwork,
  .modal-artist-info {
    padding: 1.5rem;
  }

  .gallery-btn {
    padding: 0.5rem 0.8rem;
    min-width: 160px;
    border-radius: 8px;
    font-weight: 400;
  }
}

@media (max-width: 576px) {
  .gallery-logo h2 {
    font-size: 1.8rem;
  }

  .artwork-title {
    font-size: 1.1rem;
  }

  .artist-profile {
    flex-direction: column;
    text-align: center;
    gap: 1rem;
  }

  .artist-photo {
    width: 80px;
    height: 80px;
  }
}

/* Estilos para mejor integración */
.section {
  padding: 6rem 0;
  position: relative;
  overflow: hidden;
}

/* Garantizar que siempre se muestren exactamente 3 obras en desktop */
@media (min-width: 993px) {
  .gallery-carousel-container {
    width: 100%;
  }

  .artwork-card {
    flex: 0 0 calc(33.333% - 0.67rem) !important;
    min-width: 0;
  }

  .gallery-carousel {
    width: 100%;
    justify-content: flex-start;
  }
}

.gallery-carousel-container:hover .carousel-control-prev,
.gallery-carousel-container:hover .carousel-control-next {
  opacity: 1;
}
