/*
 * Hoja de estilos para el Foro Agroforestal de Darién
 *
 * Este archivo define un conjunto de estilos minimalistas y modernos. Se
 * emplean variables CSS para facilitar el ajuste de la paleta de colores
 * y las tipografías. Los diseños son responsivos y se adaptan a distintos
 * anchos de pantalla.
 */

/* Variables de color y tipografía */
:root {
  --color-background: #f5f9f6;
  --color-primary: #2f855a;   /* Verde oscuro para elementos destacados */
  --color-secondary: #4c956c; /* Verde medio para botones y enlaces */
  --color-accent: #8ab17d;    /* Verde claro para resaltados */
  --color-text: #333333;      /* Texto principal en gris oscuro */
  --color-light-text: #666666;/* Texto secundario */
  --color-white: #ffffff;
  --font-family: 'Poppins', sans-serif;
}

/* Configuración global */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font-family);
  color: var(--color-text);
  background-color: var(--color-background);
  line-height: 1.6;
}

a {
  color: var(--color-primary);
  text-decoration: none;
}

a:hover {
  color: var(--color-secondary);
}

/* Contenedor general */
.container {
  width: 90%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 0;
}

/* Barra de navegación */
.navbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background-color: rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(8px);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.navbar .logo {
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--color-primary);
}

/* Navegación de escritorio */
.nav-links {
  list-style: none;
  display: flex;
  gap: 1.5rem;
}

.nav-links li a {
  font-weight: 500;
  color: var(--color-text);
  transition: color 0.3s ease;
}

.nav-links li a:hover {
  color: var(--color-primary);
}

/* Menú hamburguesa para móviles */
.menu-toggle {
  display: none;
}

.menu-icon {
  display: none;
  flex-direction: column;
  justify-content: space-between;
  width: 24px;
  height: 18px;
  cursor: pointer;
}

.menu-icon span {
  display: block;
  height: 3px;
  background-color: var(--color-primary);
  border-radius: 2px;
  transition: transform 0.3s ease, opacity 0.3s ease;
}

/* Estilos para la cabecera hero */
.hero {
  height: 80vh;
  background-image: url('hero.jpg');
  background-size: cover;
  background-position: center;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding-top: 4rem; /* espacio para la barra de navegación fija */
}

/* Capa de oscurecimiento sobre el hero para mejorar legibilidad del texto */
.hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.3);
  z-index: 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--color-white);
  max-width: 800px;
  padding: 0 1rem;
}

.hero-content h1 {
  font-size: 2.5rem;
  margin-bottom: 0.75rem;
  font-weight: 700;
}

.hero-content p {
  font-size: 1.2rem;
  margin-bottom: 1.5rem;
  color: #e6f2e6;
}

.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: var(--color-primary);
  color: var(--color-white);
  border-radius: 9999px;
  font-weight: 600;
  transition: background-color 0.3s ease;
}

.btn:hover {
  background-color: var(--color-secondary);
}

/* Secciones generales */
.section {
  padding: 4rem 0;
}

.section h2 {
  margin-bottom: 1rem;
  font-size: 2rem;
  color: var(--color-primary);
  text-align: center;
}

.section p {
  margin-bottom: 1rem;
  color: var(--color-light-text);
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
  line-height: 1.8;
  text-align: center;
}

/* Agenda */
.agenda-list {
  list-style: none;
  padding-left: 0;
  margin-top: 1rem;
  max-width: 800px;
  margin-left: auto;
  margin-right: auto;
}

.agenda-list li {
  margin-bottom: 0.75rem;
  color: var(--color-text);
  font-weight: 500;
  position: relative;
  padding-left: 1.5rem;
}

.agenda-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0;
  color: var(--color-primary);
  font-weight: bold;
}

/* Grid de ponentes */
.speaker-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.speaker-card {
  background-color: var(--color-white);
  border: 1px solid #e2e8e4;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  text-align: center;
}

.speaker-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.speaker-card h3 {
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
  color: var(--color-primary);
}

.speaker-card p {
  margin: 0;
  color: var(--color-light-text);
  font-size: 0.95rem;
}

/* Contacto */
.contact-info {
  list-style: none;
  padding: 0;
  margin: 1rem auto;
  max-width: 600px;
  color: var(--color-text);
  text-align: center;
}

.contact-info li {
  margin-bottom: 0.5rem;
  font-weight: 500;
}

/* Pie de página */
.footer {
  background-color: var(--color-primary);
  color: var(--color-white);
  padding: 1.5rem 0;
  text-align: center;
}

.footer p {
  margin: 0;
  font-size: 0.9rem;
}

/* Responsividad */
@media (max-width: 768px) {
  .hero-content h1 {
    font-size: 2rem;
  }
  .hero-content p {
    font-size: 1rem;
  }
  .navbar {
    padding: 0.75rem 1rem;
  }
  /* Mostrar menú hamburguesa y ocultar enlaces en móviles */
  .menu-icon {
    display: flex;
  }
  .nav-links {
    position: absolute;
    top: 100%;
    right: 0;
    background-color: var(--color-white);
    flex-direction: column;
    width: 200px;
    margin: 0;
    padding: 1rem;
    border: 1px solid #e2e8e4;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
    transform: translateY(-20px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease, transform 0.3s ease;
  }
  .nav-links li {
    margin-bottom: 1rem;
  }
  .nav-links li:last-child {
    margin-bottom: 0;
  }
  /* Mostrar el menú cuando el checkbox esté marcado */
  .menu-toggle:checked ~ .nav-links {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
  }
  /* Animación del ícono hamburger */
  .menu-toggle:checked + .menu-icon span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
  }
  .menu-toggle:checked + .menu-icon span:nth-child(2) {
    opacity: 0;
  }
  .menu-toggle:checked + .menu-icon span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
  }
}