/* Estilos para a galeria de imagens com tabs */

.image-gallery-section {
  margin: 3rem 0;
  padding: 2rem;
  background-color: #f8f9fa;
  border-radius: 10px;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
}

[data-bs-theme="dark"] .image-gallery-section {
  background-color: #2a2a2a;
  box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.image-gallery-section h2 {
  margin-bottom: 1.5rem;
  color: var(--primary);
  font-weight: 600;
  display: flex;
  align-items: center;
}

.image-gallery-section h2 i {
  margin-right: 0.75rem;
}

/* Tabs de navegação da galeria */
.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid rgba(0, 0, 0, 0.1);
  padding-bottom: 1rem;
}

[data-bs-theme="dark"] .gallery-tabs {
  border-bottom-color: rgba(255, 255, 255, 0.1);
}

.gallery-tab-btn {
  background: none;
  border: none;
  padding: 0.5rem 1rem;
  font-weight: 500;
  color: var(--gray);
  border-radius: 30px;
  transition: all 0.3s ease;
  cursor: pointer;
  display: flex;
  align-items: center;
}

.gallery-tab-btn i {
  margin-right: 0.5rem;
  font-size: 0.9rem;
}

.gallery-tab-btn:hover {
  color: var(--primary);
  background-color: rgba(183, 28, 80, 0.05);
}

.gallery-tab-btn.active {
  color: white;
  background-color: var(--primary);
}

[data-bs-theme="dark"] .gallery-tab-btn {
  color: #aaa;
}

[data-bs-theme="dark"] .gallery-tab-btn:hover {
  color: var(--primary-light);
  background-color: rgba(230, 62, 115, 0.1);
}

[data-bs-theme="dark"] .gallery-tab-btn.active {
  color: white;
  background-color: var(--primary-light);
}

/* Conteúdo da galeria */
.gallery-content {
  position: relative;
}

.gallery-pane {
  display: none;
  transition: opacity 0.3s ease;
}

.gallery-pane.active {
  display: block;
}

/* Grid de imagens */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 1rem;
}

.gallery-item {
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
  position: relative;
}

.gallery-item:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 15px rgba(0, 0, 0, 0.15);
}

.gallery-item img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  display: block;
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 0.5rem;
  font-size: 0.9rem;
  transform: translateY(100%);
  transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-caption {
  transform: translateY(0);
}

/* Modal para visualização de imagens */
.gallery-modal {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.9);
  z-index: 2000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
}

.gallery-modal.show {
  display: flex;
}

.gallery-modal-content {
  max-width: 90%;
  max-height: 90vh;
  position: relative;
}

.gallery-modal-img {
  max-width: 100%;
  max-height: 80vh;
  object-fit: contain;
  border-radius: 5px;
}

.gallery-modal-caption {
  color: white;
  text-align: center;
  margin-top: 1rem;
  font-size: 1.1rem;
}

.gallery-modal-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: white;
  background: none;
  border: none;
  font-size: 2rem;
  cursor: pointer;
  transition: color 0.3s ease;
}

.gallery-modal-close:hover {
  color: var(--primary);
}

.gallery-modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  color: white;
  border: none;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  cursor: pointer;
  transition: background-color 0.3s ease;
}

.gallery-modal-nav:hover {
  background-color: var(--primary);
}

.gallery-modal-prev {
  left: -70px;
}

.gallery-modal-next {
  right: -70px;
}

/* Responsividade */
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  }
  
  .gallery-modal-nav {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }
  
  .gallery-modal-prev {
    left: -50px;
  }
  
  .gallery-modal-next {
    right: -50px;
  }
}

@media (max-width: 576px) {
  .gallery-tabs {
    justify-content: center;
  }
  
  .gallery-modal-prev {
    left: 10px;
  }
  
  .gallery-modal-next {
    right: 10px;
  }
}
