/* =========================================================
   STYLE.CSS - VERSIÓN FINAL INTEGRADA Y COMPLETA
   ========================================================= */

/* 1. FUENTES (Asegúrate de tener la carpeta 'fonts' creada) */
@font-face {
  font-family: 'Montserrat';
  src: url('./fonts/Montserrat-Regular.ttf') format('truetype');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Montserrat';
  src: url('./fonts/Montserrat-Bold.ttf') format('truetype');
  font-weight: 700;
  font-display: swap;
}

/* 2. VARIABLES GLOBALES */
:root {
  --primary: #15803d; /* green-700 */
  --secondary: #14532d; /* green-900 */
  --accent: #dcfce7; /* green-100 */
  --text: #333;
  --bg: #f9fafb;
}

/* 3. ESTILOS BASE */
body {
  font-family: 'Montserrat', sans-serif;
  color: var(--text);
  background-color: var(--bg);
  line-height: 1.7;
  overflow-x: hidden;
  margin: 0; 
  padding: 0;
}

/* 4. NAVEGACIÓN (Efecto Glass) */
.glass-nav {
  background: rgba(21, 128, 61, 0.95); /* Verde con transparencia */
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.2);
  transition: all 0.3s ease;
}

/* 5. HERO SECTION */
.hero-section {
  position: relative;
  height: 85vh; /* Altura impactante */
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Sombra fuerte para texto sobre imágenes sin filtro oscuro */
.text-shadow-hero { 
  text-shadow: 0 4px 15px rgba(0, 0, 0, 0.9); 
}

/* 6. BOTONES */
.btn-primary {
  background-color: var(--primary);
  color: white;
  padding: 14px 32px;
  border-radius: 50px;
  font-weight: 700;
  text-transform: uppercase;
  transition: all 0.3s ease;
  box-shadow: 0 4px 14px rgba(21, 128, 61, 0.4);
  display: inline-block;
  cursor: pointer;
  border: none;
}
.btn-primary:hover {
  transform: translateY(-3px);
  background-color: var(--secondary);
}

/* Botón de Audio (Reproductor) */
.btn-audio {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 28px;
  border-radius: 50px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  border: 2px solid white;
  
  /* Estado por defecto (Glass) */
  background-color: rgba(255, 255, 255, 0.25);
  backdrop-filter: blur(5px);
  color: white;
  text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.btn-audio:hover {
  background-color: rgba(255, 255, 255, 0.4);
  color: white;
}

/* Estado Activo (Reproduciendo) */
.btn-audio.active-sound {
  background-color: white !important;
  color: var(--primary) !important;
  text-shadow: none !important;
  box-shadow: 0 4px 15px rgba(0,0,0,0.3);
  border-color: white;
}

/* 7. TABS (Pestañas para Agroforestería) */
.tab-btn {
  padding: 1rem 2rem;
  font-weight: 700;
  color: #4b5563;
  border-bottom: 4px solid transparent;
  background: none;
  cursor: pointer;
  font-size: 1.1rem;
  transition: all 0.2s;
}
.tab-btn:hover { 
  color: var(--primary); 
  background-color: rgba(21, 128, 61, 0.05); 
}
.tab-btn.active {
  color: var(--primary);
  border-bottom-color: var(--primary);
  background-color: white;
  border-radius: 8px 8px 0 0;
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
  animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* 8. TIMELINE (Línea del tiempo central) */
.timeline { 
  position: relative; 
  max-width: 1200px; 
  margin: 0 auto; 
}
/* Línea central */
.timeline::after {
  content: ''; 
  position: absolute; 
  width: 4px; 
  background-color: var(--primary);
  top: 0; 
  bottom: 0; 
  left: 50%; 
  margin-left: -2px;
}
/* Contenedores */
.timeline-container {
  padding: 10px 40px; 
  position: relative; 
  width: 50%; 
  box-sizing: border-box;
}
/* Círculos en la línea */
.timeline-container::after {
  content: ''; 
  position: absolute; 
  width: 24px; 
  height: 24px;
  right: -12px; 
  background-color: white; 
  border: 5px solid var(--primary);
  top: 15px; 
  border-radius: 50%; 
  z-index: 10;
}
/* Posicionamiento Izquierda/Derecha */
.timeline-left { left: 0; }
.timeline-right { left: 50%; }

/* Flechas */
.timeline-left::before {
  content: " "; height: 0; position: absolute; top: 22px; width: 0; z-index: 1; right: 30px;
  border: medium solid white; border-width: 10px 0 10px 10px; border-color: transparent transparent transparent white;
}
.timeline-right::before {
  content: " "; height: 0; position: absolute; top: 22px; width: 0; z-index: 1; left: 30px;
  border: medium solid white; border-width: 10px 10px 10px 0; border-color: transparent white transparent transparent;
}
.timeline-right::after { left: -12px; }

/* Responsive Timeline (Móvil) */
@media screen and (max-width: 768px) {
  .timeline::after { left: 31px; }
  .timeline-container { width: 100%; padding-left: 70px; padding-right: 25px; }
  .timeline-container::before { left: 60px; border-width: 10px 10px 10px 0; border-color: transparent white transparent transparent; }
  .timeline-left::after, .timeline-right::after { left: 19px; }
  .timeline-right { left: 0%; }
}

/* 9. TARJETAS DE DONACIÓN */
.don-card {
  cursor: pointer;
  border: 2px solid transparent; 
  transition: all 0.3s;
}
.don-card:hover {
  transform: translateY(-5px);
  background-color: #f0fdf4; /* green-50 */
}
.don-card.selected {
  border-color: var(--primary);
  background-color: #dcfce7; /* green-100 */
  transform: scale(1.02);
  box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
}

/* 10. LIGHTBOX (Visualizador de imágenes) */
#lightbox {
  position: fixed; inset: 0; background-color: rgba(0, 0, 0, 0.95);
  display: flex; align-items: center; justify-content: center;
  z-index: 100; opacity: 0; pointer-events: none; transition: opacity 0.3s ease;
}
#lightbox.active { opacity: 1; pointer-events: auto; }
#lightbox img { 
  max-width: 90%; 
  max-height: 90vh; 
  border-radius: 4px; 
  box-shadow: 0 0 20px rgba(0,0,0,0.5); 
  cursor: pointer; 
}