/* galicia.css - Stili per la pagina Galicia */

.galicia-page {
  padding: 0;
  margin: 0;
  max-width: 100%;
}

/* ===== HERO SLIDESHOW ===== */
.hero-slideshow {
  position: relative;
  width: 100%;
  height: 70vh;
  min-height: 400px;
  max-height: 800px;
  overflow: hidden;
}

.slideshow-container {
  position: relative;
  width: 100%;
  height: 100%;
}

.slide {
  position: absolute;
  width: 100%;
  height: 100%;
  opacity: 0;
  transition: opacity 1.5s ease-in-out;
  display: flex;
  align-items: center;
  justify-content: center;
}

.slide.active {
  opacity: 1;
  z-index: 1;
}

.slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.slide-overlay {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  color: white;
  z-index: 2;
  text-shadow: 2px 2px 12px rgba(0, 0, 0, 0.8);
  padding: 2rem;
  max-width: 90%;
  background: rgba(0, 0, 0, 0.3);
  border-radius: 8px;
  backdrop-filter: blur(5px);
}

.slide-overlay h1 {
  font-size: clamp(32px, 6vw, 64px);
  font-weight: 700;
  margin-bottom: 1rem;
  animation: fadeInUp 1s ease-out;
}

.slide-overlay p {
  font-size: clamp(18px, 5vw, 22px);
  font-weight: 400;
  animation: fadeInUp 1s ease-out 0.3s backwards;
}

/* Placeholder quando non ci sono immagini */
.slide-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
}

.placeholder-content {
  text-align: center;
  color: #333;
  padding: 2rem;
}

.placeholder-content h1 {
  font-size: clamp(32px, 6vw, 64px);
  margin-bottom: 1rem;
  color: #333;
}

.placeholder-content p {
  font-size: clamp(18px, 3vw, 28px);
  color: #666;
}

/* ===== CONTENT SECTIONS ===== */
.content-section {
  padding: 5rem 2rem;
  max-width: 1200px;
  margin: 0 auto;
}

.content-wrapper {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: center;
}

.content-wrapper.reverse {
  direction: rtl;
}

.content-wrapper.reverse > * {
  direction: ltr;
}

.text-content h2 {
  font-size: clamp(28px, 5vw, 48px);
  color: #004B37;
  margin-bottom: 1.5rem;
  font-weight: 700;
}

.text-content p {
  font-size: clamp(16px, 2vw, 20px);
  color: #004B37;
  line-height: 1.8;
  text-align: justify;
  text-justify: inter-character;
}

.image-content {
  position: relative;
  width: 100%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  background: #f0f0f0;
}

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

.image-content:hover .gallery-image {
  transform: scale(1.05);
}

.gallery-indicator {
  position: absolute;
  bottom: 15px;
  right: 15px;
  background: rgba(0, 0, 0, 0.7);
  color: white;
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 14px;
  font-weight: 600;
}

/* Placeholder per gallerie senza immagini */
.placeholder-gallery {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f5f5f5;
  border: 1px dashed #ccc;
}

.placeholder-icon {
  font-size: 4rem;
  opacity: 0.2;
}

/* ===== SCROLL ANIMATIONS ===== */
.fade-in-section {
  opacity: 0;
  transform: translateY(50px);
  transition: opacity 1s ease-out, transform 1s ease-out;
}

.fade-in-section.visible {
  opacity: 1;
  transform: translateY(0);
}

.t-section {
  background: #DCEFDA;
  color: #004B37;
  text-align: center;
  padding: 1rem 1rem;
  margin-top: 0rem;
}

.t-section h1 {
  font-size: clamp(38px, 5vw, 48px);
  margin-bottom: 0;
  font-weight: 700;
  color: #004B37;
}

/* ===== CTA SECTION ===== */
.cta-section {
  background: #DCEFDA;
  color: #004B37;
  text-align: center;
  padding: 5rem 2rem;
  margin-top: 3rem;
  border-top: 1px solid #e0e0e0;
}

.cta-section h2 {
  font-size: clamp(28px, 5vw, 48px);
  margin-bottom: 1rem;
  font-weight: 700;
  color: #004B37;
}

.cta-section p {
  font-size: clamp(16px, 2vw, 22px);
  margin-bottom: 2rem;
  color: #004B37;
}

.cta-button {
  display: inline-block;
  padding: 16px 40px;
  background: #2D8B6F;
  color: #DCEFDA;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 600;
  font-size: clamp(16px, 2vw, 20px);
  transition: all 0.3s ease;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.cta-button:hover {
  background: #004B37;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
  .hero-slideshow {
    height: 50vh;
    min-height: 300px;
  }
  
  .content-section {
    padding: 3rem 1rem;
  }
  
  .content-wrapper,
  .content-wrapper.reverse {
    grid-template-columns: 1fr;
    gap: 2rem;
    direction: ltr;
  }
  
  .image-content {
    order: -1; /* Immagine sempre prima su mobile */
  }
  
  
  .dot {
    width: 10px;
    height: 10px;
  }
  
  .cta-section {
    padding: 3rem 1.5rem;
  }
}

@media (max-width: 480px) {
  .slide-overlay {
    padding: 1rem;
  }
  
  .content-section {
    padding: 2rem 1rem;
  }
}

/* ===== GALLERY SLIDESHOW ===== */
.gallery-slideshow {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: 12px;
}

.gallery-slideshow .gallery-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1s ease-in-out;
  z-index: 1;
}

.gallery-slideshow .gallery-image.active {
  opacity: 1;
  z-index: 2;
}

/* Sovrascrivi le regole esistenti per .gallery-image nell'image-content */
.image-content .gallery-image {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 1s ease-in-out, transform 0.5s ease;
}
