main {
  margin-top: 15rem;
  margin-bottom: 5rem;
}

/* ----- HERO SECTION ----- */

.hero-directorios-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  padding: 10px 5% 40px;
}

.hero-text h1 {
  font-size: 4rem;
  color: #527d37;
  margin-bottom: 15px;
}

.hero-text p {
  max-width: 80%;
  line-height: 1.6;
  font-size: 1rem;
  color: #777;
}

/* Imagen */
.hero-img-directorios img {
  width: 50em;
  max-width: 100%;
}


.banner-directorios {
  width: 100%;
  background-color: #527d37;
  padding: 25px 0;
  text-align: center;
  margin-bottom: 2rem;
}

.variante2 {
  background-color: #E58411;
}

.variante3 {
  background-color: #6E2D86;
}

.banner-directorios h2 {
  color: white;
  font-size: 2rem;
}


/* ----- CATEGORIAS ----- */

.categorias {
  padding: 3.5rem;
  display: flex;
  gap: 5rem;
  flex-direction: column;
  justify-content: center;
}

.cate2 .card h3 {
  color: #E58411;
}

.cate3 .card h3 {
  color: #6E2D86;
}

.cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 40px;
}

/* ---- TARJETAS ---- */

.card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 1rem;
  width: 19rem;
  background: #fff;
  border-radius: 15px;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
  text-align: center;
  padding: 20px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, background-color .5s ease;
  cursor: pointer;
}


.card.grande {
  width: 100%;
  max-width: 60%;
  /* limita en pantallas pequeñas */
  height: auto;
  margin: 0 auto;
}

.card.mediano {
  width: 35%;
}

.card.grande img {
  width: 15rem;
}

.card img {
  width: 12rem;
  height: auto;
}

.card h3 {
  color: #527d37;
  font-size: 1.2rem;
  text-align: center;
}

/* ---- EFECTO DE ROTACIÓN ---- */

.rotar-izq {
  transform: rotate(-6deg);
}

.rotar-der {
  transform: rotate(6deg);
}

.card:hover {
  box-shadow: 0px 10px 10px hsla(120, 100%, 12%, 0.323);
  transform: translateY(-20px) scale(1.05);
}

.cate2 .card:hover {
  box-shadow: 0px 10px 10px hsla(37, 100%, 17%, 0.323);
  transform: translateY(-20px) scale(1.05);
}

.cate3 .card:hover {
  box-shadow: 0px 10px 10px hsla(276, 100%, 17%, 0.323);
  transform: translateY(-20px) scale(1.05);
}


/* ===== POPUP ===== */


.popup {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(5px);
  /* <-- desenfoque del fondo */
  -webkit-backdrop-filter: blur(6px);
  /* compatibilidad Safari */
  justify-content: center;
  align-items: center;
  z-index: 1000;
  padding: 20px;
  transition: backdrop-filter 0.3s ease;
}

.pop2 .tienda i {
  color: #E58411;
}

.pop3 .tienda i {
  color: #6E2D86;
}

.popup-content {
  background: #fff;
  border-radius: 10px;
  width: 90%;
  max-width: 600px;
  padding: 30px;
  position: relative;
  animation: fadeIn 0.3s ease;
}

.popup-content li {
  margin-bottom: 10px;
  list-style: none;
  display: flex;
  padding: 0 2rem;
  justify-content: space-between;
  gap: 1rem;
}

.tienda {
  display: flex;
  align-items: center;
  gap: 15px;
  flex-direction: row;
}

.tienda i {
  color: #527d37;
}

.popup-content h2 {
  color: #000;
  margin-bottom: 20px;
  text-align: center;

}

.popup-content p {
  font-size: 0.95rem;
  line-height: 1.6;
}


.close {
  position: absolute;
  top: 10px;
  right: 15px;
  font-size: 25px;
  cursor: pointer;
  color: #333;
}

/* Animación */
@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }

  to {
    opacity: 1;
    transform: scale(1);
  }
}
/* ---- Monitores Pequeños ---- */

@media (max-width: 1440px) {
  .card{
    width: 18rem;
  }

  .card img{
    width: 10rem;
  }

  .hero-text h1{
    font-size: 3.5rem;
  }

  .hero-img-directorios img{
    width: 40em;
  }

}




/* ---- RESPONSIVE ---- */
@media (max-width: 600px) {

  main{
    margin-top: 10rem;
  }

  .hero-directorios-content {
    flex-direction: column;
    gap: 2rem;
  }

  .hero-img-directorios img {
    width: 20em;

  }

  .hero-text {
    text-align: center;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text p {
    max-width: 100%;
    padding: 0 1rem;

  }

  .cards {
    flex-direction: column;
    align-items: center;
    gap: 3.5rem;
  }

  .card {
    transform: none;
    width: 80%;
    max-width: 300px;
  }

  .card.mediano {
    transform: none;
    width: 80%;
    max-width: 300px;
  }

  .card.grande {
    transform: none;
    width: 80%;
    max-width: 300px;
  }

  .card img,
  .card.mediano img,
  .card.grande img {
    width: 70%;
  }


  .card h3 {
    font-size: 1rem;
  }

  .popup-content {
    width: 100%;
    padding: 20px;
  }

  .popup-content h2 {
    font-size: 1.3rem;
  }

  .popup-content p {
    font-size: 0.8rem;
  }

  .popup-content li {
    gap: 10px;
  }
}