@import url('https://fonts.googleapis.com/css2?family=Poppins&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Yusei+Magic&display=swap');

/* Reset básico */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins", sans-serif;
}

/* Barra de recaudación */
.barra-recaudacion {
  width: 100%;
  background-color: #e0e0e0;
  border-radius: 10px;
  overflow: hidden;
  height: 25px;
  margin-top: 10px;
}

.progreso {
  height: 100%;
  background-color: #7ec8a1;
  color: white;
  text-align: center;
  line-height: 25px;
  white-space: nowrap;
}

/* Título */
.titulo {
  background-color: #2b577d;
  padding: 1.5rem 2rem;
  color: white;
  text-align: center;
  border-bottom: 4px solid #1e40af;
  letter-spacing: 2px;
}

/* Contenedor principal */
#detalle-caso {
  display: flex;
  justify-content: center;
  margin-top: 2rem;
  padding: 0 0; /* Elimina padding lateral para aprovechar el ancho */
  width: 100vw;
  max-width: 100vw;
}

#detalle-info {
  background-color: #ffffff;
  border-radius: 20px;
  padding: 2.5rem 3.5rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
  width: 100%;
  max-width: 1400px; /* Más ancho */
  animation: fadeIn 0.5s ease-in-out;
  margin: 0 auto;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

#detalle-info h3 {
  font-family: 'Poppins';
  font-size: 2rem;
  color: #2b577d;
  margin-bottom: 1rem;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 0.5rem;
}

#detalle-info p {
  color: #555;
  margin-bottom: 0.75rem;
  line-height: 1.6;
}

/* Imagen del caso */
.imagen-container {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

.imagen-container img {
  max-width: 100%;
  max-height: 350px;
  border-radius: 12px;
  object-fit: cover;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Botones */
.botones-detalle {
  margin-top: 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.botones-detalle button {
  background-color: #2b577d;
  color: white;
  border: none;
  padding: 10px 24px;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background-color 0.3s, transform 0.2s;
  font-weight: 500;
  letter-spacing: 1px;
}

.botones-detalle button:hover {
  background-color: #7ec8a1;
  color: #2b577d;
  transform: translateY(-2px) scale(1.04);
}

/* Detalles del caso */
.detalles-caso-wrapper {
  background: #fff;
  padding: 32px 28px;
  width: 100%;
  max-width: 850px;
  margin: 32px auto 0 auto;
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(43, 87, 125, 0.08);
}

.detalles-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
  border-bottom: 1.5px solid #e2e8f0;
  padding-bottom: 10px;
}

.detalles-header .margin {
  margin: 0;
  font-size: 1.2rem;
  color: #2b577d;
  font-weight: 600;
  letter-spacing: 1px;
}

.num-id {
  font-size: 0.98rem;
  color: #7ec8a1;
  font-weight: 500;
}

.detalles {
  background: #f9f9f9;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(60,60,60,0.08);
  padding: 28px 18px;
  margin: 18px 0 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
  justify-content: space-between;
}

.detalles-caso-fundacion {
  flex: 1 1 260px;
  min-width: 220px;
  max-width: 340px;
  padding-right: 10px;
  color: #2b577d;
  font-size: 1rem;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.detalles-caso-fundacion strong {
  color: #1e40af;
}

.detalles-caso-table {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 2px 8px rgba(60,60,60,0.08);
  padding: 22px 16px;
  min-width: 220px;
  max-width: 320px;
  flex: 1 1 220px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
  border: 1px solid #eee;
}

.celda, .celda-info {
  display: flex;
  align-items: center;
  padding: 8px 0;
  border: none;
  font-size: 1rem;
}

.celda {
  color: #444;
  font-weight: 500;
  justify-content: flex-start;
}

.celda-info {
  color: #222;
  font-weight: bold;
  justify-content: flex-end;
}

/* Nueva sección de información del caso */
.info-caso {
  display: flex;
  flex-direction: column;
  justify-content: center;
  flex: 1 1 50%;
  padding: 32px 32px 32px 0;
  gap: 18px;
}

.info-caso h3 {
  font-size: 2.4rem;
  color: #222;
  font-family: 'Yusei Magic', 'Poppins', sans-serif;
  font-weight: 700;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

.info-caso p {
  color: #5a5a5a;
  font-size: 1.08rem;
  margin-bottom: 8px;
  line-height: 1.7;
}

.monto-caso p {
  color: #7ec81a;
  font-size: 1.5rem;
  font-weight: 600;
  margin: 10px 0 0 0;
}

.porcentaje p {
  color: #2b577d;
  font-size: 1.1rem;
  font-weight: 500;
  margin: 8px 0 0 0;
}

/* Layout tipo card-producto */
.caso {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 40px;
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 4px 24px rgba(43, 87, 125, 0.08);
  padding: 32px 40px;
  margin-bottom: 32px;
  max-width: 1100px;
  margin-left: auto;
  margin-right: auto;
  padding: 40px 60px;
  gap: 60px;
}

.imagen-container {
  flex: 1 1 45%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0;
  min-width: 220px;
  min-height: 320px;
  /* Asegura el espacio reservado para la imagen */
}

.imagen-container img {
  width: 340px;
  height: 320px;
  max-width: 100%;
  max-height: 100%;
  border-radius: 16px;
  object-fit: cover;
  box-shadow: 0 2px 12px rgba(0,0,0,0.08);
  background: #f4f4f4;
  /* Elimina distorsión y rellena el espacio */
}

/* Modal Voluntariado */
.modal-voluntariado {
  position: fixed;
  z-index: 9999;
  left: 0; top: 0; width: 100vw; height: 100vh;
  background: rgba(0,0,0,0.45);
  display: flex;
  align-items: center;
  justify-content: center;
}
.modal-content-voluntariado {
  background: #fff;
  border-radius: 12px;
  max-width: 700px;
  width: 95vw;
  padding: 0;
  position: relative;
  box-shadow: 0 8px 32px rgba(0,0,0,0.18);
}
.close-modal-vol {
  position: absolute;
  right: 18px;
  top: 10px;
  font-size: 2rem;
  color: #2b577d;
  cursor: pointer;
  z-index: 2;
}
@media (max-width: 800px) {
  .modal-content-voluntariado { max-width: 99vw; }
  #iframe-voluntariado { height: 80vh; }
}

/* Responsive */
@media (max-width: 1500px) {
  #detalle-info {
    max-width: 98vw;
    padding-left: 2vw;
    padding-right: 2vw;
  }
}

@media (max-width: 1200px) {
  #detalle-info,
  .detalles-caso-wrapper,
  .caso {
    max-width: 1400px;
  }
}

@media (max-width: 900px) {
  #detalle-info {
    padding: 18px 4vw;
    max-width: 100vw;
  }
  .detalles {
    flex-direction: column;
    gap: 18px;
    padding: 18px 4vw;
  }
  .detalles-caso-fundacion,
  .detalles-caso-table {
    max-width: 100%;
    min-width: 0;
    padding: 0;
  }
  .detalles-caso-table {
    margin-top: 18px;
    padding: 16px 10px;
  }
  .caso {
    padding: 24px 4vw;
    gap: 24px;
  }
}

@media (max-width: 600px) {
  #detalle-info {
    padding: 10px 2vw;
    border-radius: 10px;
  }
  .detalles {
    padding: 10px 2vw;
  }
  .detalles-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    padding-bottom: 6px;
  }
  .detalles-header .margin {
    font-size: 1.1rem;
  }
  .detalles-caso-fundacion,
  .detalles-caso-table {
    font-size: 0.95rem;
  }
  .celda, .celda-info {
    font-size: 0.95rem;
  }
}

@media (max-width: 1000px) {
  .caso {
    flex-direction: column-reverse;
    align-items: stretch;
    padding: 24px 10vw;
    gap: 24px;
  }
  .info-caso {
    padding: 0;
  }
  .imagen-container {
    padding: 0;
    margin-bottom: 0;
  }
}

@media (max-width: 600px) {
  .caso {
    padding: 14px 2vw;
    gap: 16px;
    border-radius: 12px;
  }
  .info-caso h3 {
    font-size: 1.5rem;
  }
  .imagen-container img {
    max-width: 220px;
    max-height: 180px;
    border-radius: 10px;
  }
}

