/* Photos Section Styles */

.photos-section {
  width: 100%;
  max-width: 100%;
  margin: 60px auto 0 auto;
  padding: 60px 0;
}

.photos-header {
  background: #3a1f46;
  padding: 12px 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: white;
  height: 40px;
  position: relative;
  overflow: visible;
  box-shadow: 0 4px 12px rgba(58, 31, 70, 0.3);
  margin-bottom: 30px;
}

.photos-header-icon {
  position: absolute;
  left: -50px;
  top: 20%;
  transform: translateY(-50%);
  width: 160px;
  height: 160px;
  object-fit: contain;
  z-index: 1;
  pointer-events: none;
}

.photos-title-container {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  position: relative;
}

.photos-title {
  font-weight: 950;
  font-size: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0;
  margin-left: 120px;
}

.photos-plus-btn {
  position: absolute;
  right: 20px;
  top: -30px;
  width: 40px;
  height: 40px;
  background: transparent;
  border: 4px solid #ff8670;
  border-radius: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ff8670;
  font-size: 2rem;
  font-weight: 900;
  text-decoration: none;
  transition: all 0.3s ease;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

.photos-plus-btn:hover {
  background: #ff8670;
  color: white;
  transform: scale(1.05);
}

/* Container principal com grid e banner */
.photos-content {
  display: flex;
  gap: 24px;
}

/* Grid de 6 fotos (3x2) */
.photos-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 24px;
  height: 380px;
}

/* Quando há banner, reduz a altura */
.photos-content:has(.photos-sidebar-banner) .photos-grid {
  height: 280px;
}

.photo-item {
  position: relative;
  background: transparent;
  cursor: pointer;
  height: 100%;
  width: 100%;
  perspective: 1000px;
  display: block;
  text-decoration: none;
  color: inherit;
}

.photo-item-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.6s ease;
  transform-style: preserve-3d;
}

.photo-item:hover .photo-item-inner {
  transform: rotateX(180deg);
}

.photo-item-front,
.photo-item-back {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
}

.photo-item-front {
  background: #000;
  z-index: 2;
  transform: rotateX(0deg);
}

.photo-item-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.photo-item-back {
  background: #ff8670;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 20px;
  box-sizing: border-box;
  transform: rotateX(180deg);
}

/* Banner lateral */
.photos-sidebar-banner {
  width: 320px;
  flex-shrink: 0;
}

.photos-sidebar-banner .banner-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Conteúdo do verso (back) */
.photo-back-icon {
  width: 45px;
  height: 45px;
  border: 3px solid #3a1f46;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 15px;
}

.photo-back-icon svg {
  width: 22px;
  height: 22px;
  fill: #3a1f46;
}

.photo-back-title {
  font-size: 14px;
  font-weight: 900;
  line-height: 1.2;
  margin: 0 0 10px 0;
  color: #3a1f46;
  text-transform: uppercase;
  text-align: center;
  word-break: break-word;
}

.photo-back-date {
  font-size: 20px;
  font-weight: 700;
  margin: 0;
  color: white;
}

/* Responsive Design */
@media (max-width: 1024px) {
  .photos-content {
    flex-direction: column;
  }

  .photos-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
    height: auto;
  }

  .photos-sidebar-banner {
    width: 100%;
    height: 250px;
  }
}

@media (max-width: 768px) {
  .photos-section {
    padding: 40px 0 0 0;
    margin: 40px auto 0 auto;
  }

  .photos-header {
    height: 36px;
    padding: 10px 15px;
  }

  .photos-header-icon {
    width: 200px;
    height: 200px;
    left: -80px;
  }

  .photos-title-container {
    margin-left: 60px;
  }

  .photos-title {
    font-size: 0.9rem;
    margin-left: 40px;
  }

  .photos-plus-btn {
    font-size: 28px;
  }

  .photos-grid {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(6, 200px);
    gap: 16px;
  }

  .photos-sidebar-banner {
    height: 200px;
  }
}

/* Mobile adjustments */
@media (max-width: 768px) {
  .photos-header-icon {
    display: none;
  }

  .photos-title {
    font-size: 0.85rem;
    margin-left: 0;
    text-align: left;
  }

  .photos-title-container {
    justify-content: flex-start;
  }

  .photos-grid {
    grid-template-rows: repeat(6, 300px);
  }

  .photos-sidebar-banner {
    height: 300px;
  }
}

@media (max-width: 480px) {
  .photos-title {
    font-size: 0.8rem;
  }

  .photos-grid {
    grid-template-rows: repeat(6, 280px);
  }

  .photos-sidebar-banner {
    height: 280px;
  }
}
