* {
    box-sizing: border-box;
  }
  
  body {
    font-family: 'Segoe UI', sans-serif;
    margin: 0;
    background: #F4F8F5;
    color: #333;
  }
  
 /* ===== HEADER MODERNO ===== */
.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 40px;
  background: #ffffff;
  border-bottom: 1px solid #e5e5e5;
  position: sticky;
  top: 0;
  z-index: 1000;
}

/* Logo */
.logo img {
  height: 55px;
  width: auto;
  display: block;
}

/* Navegación escritorio */
.nav {
  display: flex;
  align-items: center;
}

.nav a {
  color: #1d6d32;
  margin-left: 25px;
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: color 0.2s ease;
}

.nav a:hover {
  color: #91e310;
}

/* ===== BOTÓN HAMBURGUESA ===== */
.menu-toggle {
  display: none;
  font-size: 28px;
  background: none;
  border: none;
  color: #2E7D32;
  cursor: pointer;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {

  .menu-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    top: 80px;
    right: 0;
    background: #f1f1f1;
    width: 100%;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    border-bottom: 1px solid #e5e5e5;

    /* oculto por defecto */
    display: none;
  }

  .nav a {
    margin: 0;
    font-size: 16px;
  }

  /* cuando está activo */
  .nav.active {
    display: flex;
  }
}

  
  /* HERO */
  .hero {
    padding: 80px 20px;
    text-align: center;
    background: linear-gradient(#A5D6A7, #E8F5E9);
  }
  
  .hero h1 {
    font-size: 2.5rem;
    margin-bottom: 15px;
  }
  
  .hero p {
    font-size: 1.1rem;
    max-width: 600px;
    margin: auto;
  }
  
  .btn {
    display: inline-block;
    margin-top: 25px;
    padding: 12px 25px;
    background: #2E7D32;
    color: white;
    text-decoration: none;
    border-radius: 6px;
  }
  
  /* RESPONSIVE */
  @media (max-width: 768px) {
    .header {
      flex-direction: column;
    }
  
    .nav {
      margin-top: 10px;
    }
  
    .hero h1 {
      font-size: 2rem;
    }
  }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}

.card {
  background: white;
  padding: 15px;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0,0,0,.1);
}

.card img {
  width: 100%;
  border-radius: 8px;
}

.contenedor {
  max-width: 1100px;
  margin: auto;
  padding: 40px 20px;
  text-align: center;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 25px;
  margin-top: 30px;
}

.card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
  overflow: hidden;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 35px rgba(0,0,0,0.12);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.card h3 {
  font-size: 20px;
  margin: 15px;
  color: #2e7d32;
}

.card p {
  font-size: 15px;
  margin: 0 15px 20px;
  color: #555;
}

/* HERO GRANDE */
.hero-grande {
  height: 90vh;
  background: linear-gradient(rgba(0,0,0,0.45), rgba(0,0,0,0.45)),
              url("/assets/img/hero.webp");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hero-overlay {
  text-align: center;
  color: white;
  max-width: 700px;
  padding: 20px;
}

.hero-overlay h1 {
  font-size: 3rem;
  margin-bottom: 15px;
}

.hero-overlay p {
  font-size: 1.2rem;
  margin-bottom: 25px;
}

/* BLOQUES */
.bloque {
  padding: 70px 20px;
  text-align: center;
}

.blanco { background: #ffffff; }
.gris { background: #f5f5f5; }

/* TARJETAS */
.cards {
  display: flex;
  gap: 25px;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 30px;
}

.card {
  background: white;
  padding: 25px;
  border-radius: 14px;
  width: 260px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}

/* IMPACTO */
.impacto {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 30px;
}

.impacto h3 {
  font-size: 2.5rem;
  color: #2E7D32;
}

/* CTA */
.cta {
  background: #2E7D32;
  color: white;
  text-align: center;
  padding: 70px 20px;
}

.footer {
  background: #1b5e20;
  color: white;
  text-align: center;
  padding: 25px;
}

/* GRID DE ACTIVIDADES */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 20px;
  margin-top: 20px;
}

/* TARJETA */
.card {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
  transition: transform 0.2s ease;
}

.card:hover {
  transform: translateY(-5px);
}

/* IMAGEN */
.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

/* TEXTO */
.card h3 {
  padding: 10px 15px 0;
  color: #2E7D32;
}

.card p {
  padding: 0 15px 15px;
  color: #555;
  font-size: 14px;
}


/* ===== GRID LIMPIO DEFINITIVO ===== */

.contenedor {
  max-width: 1100px;
  margin: auto;
  padding: 40px 20px;
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 20px;
}

.card {
  background: #fff;
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 6px 18px rgba(0,0,0,0.08);
  transition: transform .2s ease, box-shadow .2s ease;
}

.card:hover {
  transform: translateY(-5px);
  box-shadow: 0 12px 26px rgba(0,0,0,0.12);
}

.card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.hero-pequeno {
  height: 50vh;
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
              url("/assets/img/hero.webp");
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}


.impacto-numeros {
  display: flex;
  justify-content: center;
  gap: 50px;
  margin-top: 40px;
  flex-wrap: wrap;
  text-align: center;
}

.impacto-numeros h3 {
  font-size: 3rem;
  color: #2E7D32;
}


.timeline {
  margin-top: 0px;
  border-left: 4px solid #2E7D32;
  padding-left: 20px;
}

.timeline-item {
  margin-bottom: 25px;
}

.timeline-item span {
  font-weight: bold;
  color: #2E7D32;
}

.aliados {
  display: flex;
  justify-content: center;
  gap: 40px;
  margin-top: 30px;
  flex-wrap: wrap;
}

.aliados img {
  height: 60px;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.aliados img:hover {
  opacity: 1;
}

/* CONTACTO */
.contacto-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 50px;
  align-items: start;
}

.info-contacto p {
  margin-bottom: 10px;
}

.redes {
  margin-top: 20px;
}

.redes a {
  margin-right: 15px;
  text-decoration: none;
  color: #2E7D32;
  font-weight: 600;
}

.formulario-contacto form {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.formulario-contacto input,
.formulario-contacto textarea {
  padding: 12px;
  border-radius: 8px;
  border: 1px solid #ddd;
  font-size: 14px;
}

.mapa {
  margin-top: 30px;
}

/* RESPONSIVE */
@media (max-width: 768px) {
  .contacto-grid {
    grid-template-columns: 1fr;
  }
}



#contador-proyectos,
#contador-actividades,
#contador-mensajes {
  background: #2E7D32;
  color: white;
  padding: 5px 12px;
  border-radius: 20px;
  font-size: 14px;
}

canvas {
  margin-top: 30px;
  background: white;
  padding: 20px;
  border-radius: 16px;
  box-shadow: 0 8px 25px rgba(0,0,0,0.08);
}


.card {
  background: white;
  border-radius: 12px;
  padding: 15px;
  margin-bottom: 20px;
  box-shadow: 0 6px 15px rgba(0,0,0,0.08);
}

.galeria-admin {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(90px, 1fr));
  gap: 8px;
  margin: 10px 0;
}

.galeria-admin img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  transition: 0.3s;
  cursor: pointer;
}

.galeria-admin img:hover {
  transform: scale(1.05);
}

/* ===== CARD ===== */
.card {
  background: #ffffff;
  border-radius: 14px;
  padding: 18px;
  margin-bottom: 20px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

/* ===== GALERÍA ===== */
.galeria-admin {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-bottom: 12px;
}

.galeria-admin img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s ease;
}

.galeria-admin img:hover {
  transform: scale(1.05);
}

/* ===== MODAL ===== */
.modal-img {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.85);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal-img img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 12px;
}

.modal-img {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.9);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  animation: fadeIn 0.3s ease;
}

.modal-contenido {
  max-width: 85%;
  max-height: 85%;
  border-radius: 12px;
}

.cerrar-modal {
  position: absolute;
  top: 20px;
  right: 30px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

.flecha {
  position: absolute;
  top: 50%;
  font-size: 40px;
  color: white;
  cursor: pointer;
  user-select: none;
  transform: translateY(-50%);
}

.izquierda {
  left: 30px;
}

.derecha {
  right: 30px;
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* ===== GRID GENERAL ===== */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 25px;
}

/* ===== CARD PÚBLICA ===== */
.card {
  background: white;
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.06);
  transition: 0.3s ease;
}

.card:hover {
  transform: translateY(-5px);
}

/* ===== GALERÍA PÚBLICA ===== */
.galeria-publica {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(90px, 1fr));
  gap: 8px;
  margin-bottom: 15px;
}

.galeria-publica img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: 0.3s ease;
}

.galeria-publica img:hover {
  transform: scale(1.05);
}


.hero-donacion {
  height: 50vh;
  background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5)),
              url('../img/hero.webp') center/cover no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
  color: white;
  text-align: center;
}

.donacion-section {
  text-align: center;
  margin-top: 40px;
}

.donacion-box {
  background: white;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.08);
  max-width: 400px;
  margin: 30px auto;
}

.montos {
  display: flex;
  justify-content: space-between;
  margin-bottom: 15px;
}

.monto-btn {
  background: #e8f5e9;
  border: none;
  padding: 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: bold;
}

.monto-btn:hover {
  background: #c8e6c9;
}

#monto-personalizado {
  width: 100%;
  padding: 10px;
  margin-bottom: 15px;
  border-radius: 8px;
  border: 1px solid #ccc;
}

.btn-donar {
  width: 100%;
  padding: 12px;
  border: none;
  background: #2e7d32;
  color: white;
  font-size: 16px;
  border-radius: 8px;
  cursor: pointer;
}

.btn-donar:hover {
  background: #1b5e20;
}

.transparencia {
  margin-top: 40px;
}

.lista-donacion {
  list-style: none;
  padding: 0;
  margin: 15px 0;
}

.lista-donacion li {
  margin: 5px 0;
  font-weight: 500;
}

.datos-donacion {
  background: #f1f8e9;
  padding: 15px;
  border-radius: 10px;
  margin-bottom: 20px;
}

/* ===== IMPACTO ===== */

.impacto {
  background: #f1f8e9;
  padding: 60px 20px;
  text-align: center;
  overflow-x: hidden; /* evita scroll lateral */
}

.impacto-sub {
  margin-bottom: 40px;
  color: #555;
}

.impacto-grid {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  max-width: 100%;
}

.impacto-card {
  background: white;
  padding: 25px;
  border-radius: 15px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  flex: 1 1 180px; /* crece pero no rompe */
  max-width: 220px;
  min-width: 160px;
  text-align: center;
}

.impacto-card:hover {
  transform: translateY(-5px);
}

.impacto-card h3 {
  font-size: 32px;
  color: #2e7d32;
  margin-bottom: 10px;
}

/* ===== DASHBOARD MENSAJES ===== */

.dashboard {
  padding: 40px 20px;
  max-width: 1100px;
  margin: auto;
}

.dashboard h1 {
  margin-bottom: 30px;
  text-align: left;
}

.grid-mensajes {
  display: grid;
  gap: 20px;
}

.mensaje-card {
  background: #ffffff;
  padding: 20px;
  border-radius: 12px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.05);
  text-align: left;
  border-left: 5px solid #2e7d32;
}

.mensaje-card h3 {
  margin-bottom: 10px;
  color: #2e7d32;
}

.mensaje-card p {
  margin: 8px 0;
}

.mensaje-card small {
  color: #777;
}

.btn-eliminar {
  margin-top: 12px;
  background: #c62828;
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 14px;
}

.btn-eliminar:hover {
  background: #8e0000;
}

#contador-mensajes {
  color: #2e7d32;
  font-weight: bold;
}

/* ===== BOTÓN WHATSAPP FLOTANTE ===== */

.whatsapp-float {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 60px;
  height: 60px;
  background-color: #ffffff;
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.2);
  z-index: 1000;
  transition: transform 0.3s ease;
}

.whatsapp-float img {
  width: 35px;
  height: 35px;
}

.whatsapp-float:hover {
  transform: scale(1.1);
}

.titulo-card {
  text-align: center;
  color: #2E7D32;
}

.descripcion-corta {
  font-size: 14px;
  color: #555;
  text-align: center;
}

/* GALERÍA PREVIEW */
.galeria-preview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.img-mini {
  width: 100%;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
}

/* BOTÓN */
.btn-leer {
  margin-top: 10px;
  padding: 8px;
  background: #2E7D32;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  width: 100%;
}

/* DETALLE */
.galeria-grande {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.img-grande {
  width: 100%;
  border-radius: 10px;
}

.texto-detalle {
  font-size: 16px;
  line-height: 1.6;
}

.titulo-card {
  text-align: center;
  font-size: 20px;
  margin: 10px 0;
}

.descripcion-card {
  text-align: justify;
  font-size: 14px;
  color: #555;
}

.btn-leer-mas {
  margin-top: 10px;
  padding: 8px 12px;
  border: none;
  background: #2e7d32;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

.btn-leer-mas:hover {
  background: #1b5e20;
}

/* Galería pública */
.galeria-publica {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
}

.galeria-publica img {
  width: 100%;
  height: 100px;
  object-fit: cover;
  border-radius: 8px;
}

/* Detalle */
.detalle-container {
  max-width: 800px;
  margin: auto;
  padding: 20px;
}

.galeria-detalle {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 10px;
  margin: 20px 0;
}

.galeria-detalle img {
  width: 100%;
  border-radius: 10px;
  cursor: pointer;
}

.galeria-inicio img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  border-radius: 12px 12px 0 0;
  cursor: pointer;
}

/* reutiliza lo que ya hiciste */
.titulo-card {
  text-align: center;
  margin: 10px 0;
}

.descripcion-card {
  text-align: justify;
  font-size: 14px;
  color: #555;
}

.btn-leer-mas {
  margin-top: 10px;
  padding: 8px 12px;
  border: none;
  background: #2e7d32;
  color: white;
  border-radius: 6px;
  cursor: pointer;
}

.editor {
  min-height: 120px;
  border: 1px solid #ccc;
  border-radius: 8px;
  padding: 10px;
  background: white;
  outline: none;
}

.editor-toolbar {
  margin-bottom: 8px;
}

.editor-toolbar button {
  padding: 6px 10px;
  margin-right: 5px;
  border: none;
  background: #2e7d32;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

.editor-toolbar button:hover {
  background: #1b5e20;
}