/* ========================================
   HERO SECTION - GALLERY PAGE
======================================== */
.hero-gallery {
  position: relative;
  height: 115vh;
  overflow: hidden;
}

.hero-gallery-slider {
  position: relative;
  width: 100%;
  height: 100%;
}

.hero-gallery-slider .gallery-slide {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  opacity: 1;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  background-image: url("../../images/hero/banner6.jpeg");
}

.hero-gallery-slider .gallery-slide::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.4);
}

.hero-gallery-content {
  position: absolute;
  left: 200px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 420px;
  max-width: 420px;
  padding: 35px 40px;
  background: #08153572;
  border-radius: 2%;
  backdrop-filter: blur(10px);
  border-left: 5px solid var(--accent-color);
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  color: var(--primary-color);
}

.hero-gallery-content h1 {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1.2rem;
  line-height: 1.2;
  color: var(--bg-light);
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero-gallery-content p {
  font-size: 1rem;
  margin-bottom: 2rem;
  color: var(--secondary-color);
  line-height: 1.7;
}

/* Redes sociais */
.hero-gallery .gallery-social-sidebar {
  position: absolute;
  bottom: 140px;
  right: 60px;
  top: auto;
  display: flex;
  flex-direction: row;
  gap: 12px;
  z-index: 10;
}

.hero-gallery .gallery-social-icon {
  width: 48px;
  height: 48px;
  background: #08153586;
  border: 2px solid rgba(255, 255, 255, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--secondary-color);
  text-decoration: none;
  font-size: 1.1rem;
  transition: var(--transition);
  border-radius: 12px;
  backdrop-filter: blur(5px);
}

.hero-gallery .gallery-social-icon:hover {
  background: var(--accent-color);
  border-color: var(--accent-color);
  color: var(--primary-color);
  transform: translateY(-5px);
  border-radius: 14px;
}

/* ========================================
   FILTROS DA GALERIA
======================================== */
.gallery-filters {
  padding: 40px 0;
  display: flex;
  justify-content: center;
}

.filter-buttons {
  display: flex;
  gap: 1rem;
  background: #f8f9fa;
  padding: 0.5rem;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  flex-wrap: wrap;
}

.filter-btn {
  padding: 12px 24px;
  border: none;
  background: transparent;
  color: var(--primary-color);
  font-weight: 600;
  font-size: 0.9rem;
  cursor: pointer;
  transition: all 0.3s ease;
  border-radius: 6px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.filter-btn:hover {
  background: rgba(8, 21, 53, 0.1);
}

.filter-btn.active {
  background: var(--accent-color);
  color: white;
}

.filter-btn i {
  font-size: 1.1rem;
}

/* ========================================
   GRID DA GALERIA
======================================== */
.gallery-section {
  background: var(--secondary-color);
  padding: 80px 0;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 30px;
  margin-bottom: 50px;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  box-shadow: 0 5px 20px rgba(8, 21, 53, 0.1);
  transition: var(--transition);
  height: 400px;
}

.gallery-item:hover {
  transform: translateY(-10px);
  box-shadow: 0 15px 35px rgba(8, 21, 53, 0.2);
}

.gallery-image {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

.gallery-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.gallery-item:hover .gallery-image img {
  transform: scale(1.1);
}

.gallery-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    to top,
    rgba(8, 21, 53, 0.95),
    rgba(8, 21, 53, 0.7),
    transparent
  );
  opacity: 0;
  transition: opacity 0.4s ease;
  display: flex;
  align-items: flex-end;
  padding: 30px;
}

.gallery-item:hover .gallery-overlay {
  opacity: 1;
}

.gallery-info {
  width: 100%;
  transform: translateY(20px);
  transition: transform 0.4s ease;
}

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

.gallery-info h3 {
  color: var(--secondary-color);
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.gallery-info p {
  color: var(--accent-color);
  font-size: 0.95rem;
  margin-bottom: 15px;
  font-weight: 500;
}

.view-btn {
  padding: 10px 20px;
  background: var(--accent-color);
  border: 2px solid var(--accent-color);
  color: var(--secondary-color);
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.5px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.view-btn:hover {
  background: transparent;
  color: var(--accent-color);
}

/* ========================================
   CARREGAR MAIS
======================================== */
.load-more-container {
  text-align: center;
  margin-top: 30px;
}

.load-more-btn {
  padding: 14px 32px;
  font-size: 0.95rem;
}

/* ========================================
   MODAL DE VISUALIZAÇÃO
======================================== */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.modal-content {
  position: relative;
  max-width: 90%;
  max-height: 90vh;
  margin: 5vh auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
}

.modal-image {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.modal-caption {
  background: var(--secondary-color);
  padding: 25px 30px;
  margin-top: 20px;
  border-radius: 8px;
  text-align: center;
  max-width: 600px;
  box-shadow: 0 5px 20px rgba(0, 0, 0, 0.3);
}

.modal-caption h3 {
  color: var(--primary-color);
  font-size: 1.8rem;
  font-weight: 700;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.modal-caption p {
  color: var(--accent-color);
  font-size: 1.1rem;
  font-weight: 500;
}

.close-modal {
  position: absolute;
  top: 30px;
  right: 50px;
  font-size: 3rem;
  color: var(--secondary-color);
  cursor: pointer;
  transition: var(--transition);
  z-index: 10000;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(8, 21, 53, 0.7);
  border-radius: 50%;
}

.close-modal:hover {
  color: var(--accent-color);
  background: rgba(8, 21, 53, 0.9);
  transform: rotate(90deg);
}

.modal-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(8, 21, 53, 0.8);
  border: 2px solid rgba(255, 255, 255, 0.3);
  color: var(--secondary-color);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  font-size: 1.5rem;
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

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

.prev-modal {
  left: 30px;
}

.next-modal {
  right: 30px;
}

/* ========================================
   RESPONSIVIDADE - GALLERY
======================================== */
@media (max-width: 992px) {
  .hero-gallery-content {
    left: 30px;
    width: 380px;
    max-width: 380px;
  }

  .hero-gallery-content h1 {
    font-size: 1.8rem;
  }

  .hero-gallery .gallery-social-sidebar {
    bottom: 110px;
    right: 30px;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 25px;
  }
}

@media (max-width: 768px) {
  .hero-gallery {
    height: 110vh;
  }

  .hero-gallery-content {
    left: 50%;
    transform: translate(-50%, -50%);
    width: calc(100% - 120px);
    max-width: calc(100% - 120px);
    text-align: left;
    padding: 30px 35px;
  }

  .hero-gallery-content h1 {
    font-size: 1.6rem;
  }

  .hero-gallery-content p {
    font-size: 0.95rem;
  }

  .hero-gallery .gallery-social-sidebar {
    bottom: 140px;
    right: 20px;
  }

  .hero-gallery .gallery-social-icon {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }

  .hero-gallery .gallery-social-icon:hover {
    transform: scale(1.1);
  }

  .filter-buttons {
    gap: 10px;
  }

  .filter-btn {
    padding: 10px 20px;
    font-size: 0.85rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
  }

  .gallery-item {
    height: 350px;
  }

  .modal-nav {
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
  }

  .prev-modal {
    left: 15px;
  }

  .next-modal {
    right: 15px;
  }

  .close-modal {
    top: 15px;
    right: 15px;
    font-size: 2rem;
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 576px) {
  .hero-gallery-content {
    width: calc(100% - 100px);
    max-width: calc(100% - 100px);
    padding: 25px 30px;
  }

  .hero-gallery-content h1 {
    font-size: 1.4rem;
  }

  .hero-gallery-content p {
    font-size: 0.9rem;
  }

  .hero-gallery .cta-button {
    padding: 10px 20px;
    font-size: 0.9rem;
  }

  .hero-gallery .gallery-social-sidebar {
    bottom: 130px;
    right: 15px;
  }

  .hero-gallery .gallery-social-icon {
    width: 38px;
    height: 38px;
    font-size: 0.9rem;
  }

  .filter-btn {
    padding: 8px 16px;
    font-size: 0.8rem;
    flex: 1 1 calc(50% - 10px);
    justify-content: center;
  }

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

  .gallery-item {
    height: 400px;
  }

  .modal-content {
    max-width: 95%;
  }

  .modal-image {
    max-height: 60vh;
  }

  .modal-caption {
    padding: 20px;
  }

  .modal-caption h3 {
    font-size: 1.4rem;
  }

  .modal-caption p {
    font-size: 0.95rem;
  }
}

@media (max-width: 400px) {
  .hero-gallery-content {
    width: calc(100% - 90px);
    max-width: calc(100% - 90px);
  }

  .hero-gallery-content h1 {
    font-size: 1.2rem;
  }

  .hero-gallery .gallery-social-sidebar {
    bottom: 120px;
    right: 10px;
  }

  .hero-gallery .gallery-social-icon {
    width: 36px;
    height: 36px;
  }

  .gallery-item {
    height: 350px;
  }

  .modal-nav {
    width: 40px;
    height: 40px;
    font-size: 1rem;
  }
}

/* Animação de filtro */
.gallery-item.hide {
  animation: fadeOut 0.3s ease;
  display: none;
}

.gallery-item.show {
  animation: fadeInScale 0.4s ease;
}

/* Itens ocultos inicialmente */
.gallery-item.hidden-item {
  display: none;
}

@keyframes fadeOut {
  from {
    opacity: 1;
    transform: scale(1);
  }
  to {
    opacity: 0;
    transform: scale(0.8);
  }
}

@keyframes fadeInScale {
  from {
    opacity: 0;
    transform: scale(0.8);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
