.seccion-brochazo {
  position: relative;
  background: #3399cc;
  width: 100%;
  margin: auto;
  height: 80vh;
  overflow: hidden;
  max-width: 100vw; /* evitar overflow horizontal */
}

.banner {
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.5)),
    url("../../img/nuestrahistoria.webp");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.banner-content {
  position: absolute;
  top: 35%;
  left: 10%;
  display: flex;
  flex-direction: column;
  text-align: left;
  max-width: 80vw; /* evitar que el texto se salga */
}

.banner-content .banner-titulo {
  font-family: Poppins, sans-serif;
  font-weight: bold;
  margin: 10px 0;
  color: #ffffff;
  font-size: 3rem;
  opacity: 1;
}

.banner-content button {
  border: none;
  background-color: #67b8de;
  border-radius: 5px;
  color: #ffffff;
  width: 200px;
  height: 50px;
  margin: 20px 0;
  padding: 0;
  opacity: 1;
  cursor: pointer;
}

.bgtop {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 20vh;
  background-color: #3399cc;
  mask-image: url("../../img/grunge-style-top-border-texture-o3ekbeen1cd67vcm.webp");
  mask-position: 0 0;
  mask-repeat: no-repeat;
  mask-size: contain;
  animation: revealTop 1.5s ease-out forwards;
  z-index: 1;
}

@keyframes revealTop {
  from {
    mask-size: 100% 0%;
  }
  to {
    mask-size: 100% 100%;
  }
}

.bgbottom {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 200px;
  background: #ffffff;
  mask-image: url("../../img/bottom.webp");
  mask-repeat: no-repeat;
  mask-size: 100%;
  mask-position: bottom;
  pointer-events: none;
  z-index: 1;
}

/* SECCION HISTORIA */
.seccion-historia {
  position: relative;
  width: 100%;
  height: 60vh;
  background-color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: auto;
  /* para evitar borde pegado a la pantalla */
}

.content-historia {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  height: 500px;
  gap: 10px;
  max-width: 1200px;
  width: 100%;
}

.historia {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.historia h1 {
  font-family: "Poppins", sans-serif;
  font-weight: bold;
  margin: 10px;
  color: #3399cc;
  font-size: 2rem;
  text-align: center;
}

.historia p {
  margin: 1px;
  text-align: center;
  font-weight: bold;
  color: #3d3c3c;
  font-size: 1rem;
  padding: 0 10px;
}

.char {
  letter-spacing: normal;
}

.img-container-historia {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.img-container-historia img {
  max-width: 100%;
  height: 300px;
  object-fit: cover;
  border-radius: 4px;
  box-shadow: 0px 1px 5px rgba(0, 0, 0, 0.1);
  max-width: 100%;
}

/* SECCION MISION */
.seccion-mision {
  position: relative;
  background: white;
  width: 100%;
  margin: auto;
  height: 80vh;
  overflow: hidden;
}

.bgtop-m {
  position: absolute;
  width: 100%;
  height: 200px;
  background: #ffffff;
  mask-image: url("../../img/grunge-style-top-border-texture-o3ekbeen1cd67vcm.webp");
  mask-repeat: no-repeat;
  mask-size: 100%;
  mask-position: top;
  pointer-events: none;
  z-index: 2;
}

.bgbottom-m {
  position: absolute;
  width: 100%;
  height: 200px;
  bottom: 0;
  left: 0;
  background: #ffffff;
  mask-image: url("../../img/bottom.webp");
  mask-repeat: no-repeat;
  mask-size: 100%;
  mask-position: bottom;
  pointer-events: none;
  z-index: 2;
}

.banner-mision {
  width: 100%;
  height: 100%;
  display: flex;
  position: relative;
  align-items: center;
  justify-content: center;
  background-image: url("../../img/p1.png");
  background-repeat: no-repeat;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.banner-mision::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.content-mision {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  height: 100vh;
  gap: 50px;
  max-width: 1200px;
  grid-template-areas: "img-mision text-mision";
  position: relative;
  z-index: 2;
}

.mision {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  grid-area: text-mision;
  width: 100%;
  padding: 0 10px;
}

.mision h1 {
  font-family: "Poppins", sans-serif;
  font-weight: bold;
  color: #67b8de;
  font-size: 3rem;
  text-align: center;
  padding: 5px 20px;
  border: 1px solid #67b8de;
}

.mision p {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  color: #ffffff;
  font-size: 1.1rem;
  text-align: center;
  margin: 10px;
}

.img-mision {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  grid-area: img-mision;
}

.img-mision img {
  width: 70%;
  max-width: 100%;
  height: 35vh;
  object-fit: cover;
  border-radius: 3px;
}

/* SECCION ENTREGAS */
.seccion-entregas {
  position: relative;
  width: 100%;
  height: 70vh;
  padding-top: 6rem;
  background-color: #ffffff;
  box-sizing: border-box;
}

.content-entregas {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  max-width: 1200px;
  margin: auto;
}

.title-entregas {
  font-family: "Poppins", sans-serif;
  font-weight: bold;
  color: #3399cc;
  font-size: 2.5rem;
  margin-bottom: 20px;
  padding: 0 50px;
  text-align: center;
  max-width: 100%;
  border: 1px solid #3399cc;
}

.cards-entregas {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  align-items: center;
  justify-items: center;
  justify-content: center;
  width: 100%;
  margin: auto;
  gap: 30px;
}

.card {
  width: 250px;
  height: 300px;
  perspective: 1000px;
  margin: 20px auto;
  border-radius: 10px;
}

.card-inner {
  width: 100%;
  height: 100%;
  position: relative;
  transform-style: preserve-3d;
  transition: transform 0.6s ease;
  border-radius: 10px;
}

.card-front,
.card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 10px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

.card-front {
  background-color: #67b8de;
  z-index: 2;
}

.card-back {
  background-color: #91c9e8;
  transform: rotateY(180deg);
  display: flex;
  align-items: start;
  color: #3b5ac0;
  z-index: 1;
  border-radius: 10px;
}
.card-back p {
  text-align: start;
  padding: 2px;
  margin: 0;
}
.card-back h2 {
  font-size: 1.5rem;
  padding: 0;
  margin: 0;
  text-align: start;
  padding: 2px;
}
.card img {
  width: 150px;
  height: 150px;
  object-fit: contain;
  border-radius: 10px;
  margin: auto;
}

.card p {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  color: #f8f8f8;
  font-size: 1.2rem;
}

.card h1 {
  font-family: "Poppins", sans-serif;
  font-weight: bold;
  color: #3b5ac0;
  font-size: 1.4rem;
}

/* SECCION ACTIVIDADES */
.seccion-actividades {
  position: relative;
  width: 100%;
  height: 70vh;
  margin: auto;
  background-color: #ffffff;
}

.bgtop-en {
  position: absolute;
  background-color: #ffffff;
  width: 100%;
  height: 200px;
  top: 0;
  left: 0;
  mask-image: url("../../img/grunge-style-top-border-texture-o3ekbeen1cd67vcm.webp");
  z-index: 2;
}

.banner-actividades {
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  background-image: url("../../img/p2.png");
  background-size: cover;
  background-position: center center;
  background-repeat: no-repeat;
  overflow: hidden;
  margin: auto;
}

.banner-actividades::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 1;
}

.content-actividades {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  height: 300px;
  align-items: center;
  justify-content: center;
  gap: 50px;
  margin: auto;
  max-width: 1200px;
  grid-template-areas: "text-actividades img-actividades";
  position: relative;
  z-index: 2;
}

.actividades {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  grid-area: text-actividades;
  padding: 0 10px;
}

.actividades h1 {
  font-family: "Poppins", sans-serif;
  font-weight: bold;
  color: #91c9e8;
  font-size: 2.5rem;
  margin: 10px;
  text-align: center;
  padding: 10px 20px;
  border: 1px solid #91c9e8;
}

.actividades p {
  font-family: "Poppins", sans-serif;
  font-weight: 500;
  color: #ffffff;
  font-size: 1.2rem;
  text-align: center;
  margin: 10px;
}

.img-actividades {
  grid-area: img-actividades;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 0 10px;
}

.img-actividades img {
  width: 30vw;
  max-width: 300px;
  height: 30vh;
  object-fit: cover;
  border-radius: 20px;
  border: 1px solid #0000004f;
}

/* FOOTER */
footer {
  width: 100%;
  height: 50vh;
  background-color: #242020;
  color: #cc0a0a;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  padding: 20px 10px;
  box-sizing: border-box;
  overflow-x: hidden;
}

.footer-container {
  width: 100%;
  max-width: 1200px;
  height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: row;
  gap: 50px;
  flex-wrap: wrap;
}

.footer-container ul {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
}

/* MEDIA QUERIES RESPONSIVOS */

/* Tablet - pantallas medianas */
@media (max-width: 1024px) {
  body {
    font-size: 12px;
  }
  header ul {
    gap: 20px;
    font-size: 1rem;
  }
  .banner-content {
    top: 30%;
    left: 5%;
    max-width: 100vw;
  }
  .banner-content .banner-titulo {
    font-size: 2.5rem;
  }
  .banner-content button {
    width: 180px;
    height: 45px;
  }
  .bgtop {
    height: 150px;
  }
  .seccion-brochazo {
    height: 400px;
  }
  .seccion-historia {
    height: 400px;
  }
  .seccion-mision {
    height: 500px;
  }
  .seccion-entregas {
    height: 500px;
  }
  .seccion-actividades {
    height: 500px;
  }
  .content-historia,
  .content-mision,
  .content-entregas,
  .content-actividades {
    max-width: 95vw;
    gap: 30px;
  }
  .mision h1,
  .actividades h1 {
    font-size: 2.5rem;
  }
  .cards-entregas {
    grid-template-columns: repeat(4, 1fr); /* 2 tarjetas por fila */
    gap: 20px;
  }
  .card {
    width: 200px;
    height: 200px;
    box-shadow: 0 20px 20px rgba(0, 0, 0, 0.1);
  }
  .card img {
    width: 100px;
    height: 100px;
  }
  .card p {
    font-size: 1.2rem;
  }
  .card h1 {
    font-size: 1.5rem;
  }
  .card-back h2 {
    font-size: 1.2rem;
  }
  .card-back p {
    font-size: 0.8rem;
  }

  footer {
    height: 500px;
  }
  .img-actividades img {
    width: 200px;
    height: 200px;
  }
}

/* Mobile - pantallas pequeñas */
@media (max-width: 768px) {
  body {
    font-size: 13px;
  }
  header ul {
    flex-wrap: wrap;
    gap: 15px;
    font-size: 0.9rem;
  }
  .banner-content {
    top: 25%;
    left: 5%;
    max-width: 100vw;
  }
  .banner-content .banner-titulo {
    font-size: 2rem;
    margin: 5px 0;
  }
  .banner-content button {
    width: 150px;
    height: 40px;
    font-size: 0.9rem;
  }

  .seccion-brochazo,
  .seccion-historia,
  .seccion-mision,
  .seccion-entregas,
  .seccion-actividades {
    height: auto; /* para que la altura no genere scroll si el contenido crece */
  }
  .seccion-brochazo {
    width: 100%;
    height: 300px;
  }
  .bgtop {
    height: 50px;
    mask-size: contain;
  }
  .seccion-historia {
    height: 600px;
  }
  .seccion-historia img {
    width: 90%;
    height: 200px;
  }
  .seccion-mision {
    height: 900px;
  }
  .seccion-mision img {
    width: 100%;
    height: 200px;
  }
  .content-mision {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 50px;
    margin: 0;
    gap: 30px;
  }
  .img-mision {
    grid-area: none;
    height: 300px;
  }
  .mision {
    grid-area: none;
  }
  .seccion-actividades {
    height: 600px;
  }
  .content-actividades {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
  }
  .seccion-entregas {
    padding-bottom: 7rem;
  }
  .content-historia,
  .content-entregas {
    grid-template-columns: 1fr;
    height: auto;
    gap: 20px;
  }
  .mision h1,
  .actividades h1,
  .historia h1,
  .title-entregas {
    font-size: 1.8rem;
  }
  .mision p,
  .actividades p,
  .historia p {
    font-size: 1rem;
    padding: 0 10px;
  }
  .cards-entregas {
    grid-template-columns: 1fr;
    gap: 15px;
  }
  .card {
    max-width: 100%;
    width: 70%;
    height: 170px;
  }
  .card img {
    width: 70px;
    height: 70px;
  }
  footer {
    height: auto;
    padding: 40px 10px;
  }
  .footer-container {
    flex-direction: column;
    height: auto;
    gap: 30px;
  }
}

/* --- Estilo del botón de WhatsApp --- */
.whatsapp-button {
  position: fixed;
  bottom: 25px;
  right: 25px;

  background-color: #25d366; /* Color verde de WhatsApp */
  width: 60px;
  height: 60px;
  border-radius: 50%;

  display: flex;
  justify-content: center;
  align-items: center;

  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  z-index: 1000;
  transition: transform 0.3s ease;
}

/* Efecto al pasar el mouse por encima */
.whatsapp-button:hover {
  transform: scale(1.1);
}

/* Estilo del ícono dentro del botón */
.whatsapp-button img {
  width: 35px;
  height: 35px;
}

/* --- Animación de "sacudida" --- */
@keyframes shake {
  0%,
  100% {
    transform: translateX(0);
  }
  10%,
  30%,
  50%,
  70%,
  90% {
    transform: translateX(-5px);
  }
  20%,
  40%,
  60%,
  80% {
    transform: translateX(5px);
  }
}

/* Clase que se agregará con JavaScript para activar la animación */
.whatsapp-button.animating {
  animation: shake 0.5s ease;
}
