/* GENERAL------------------------------------------ */

body {
  font-family: Arial, sans-serif;
  background: #ce8989;
  margin: 0;
  padding: 0;
  /* 2em */
}

#contenedor {
  background: #fcfcfc;
  width: 90%;
  max-width: 1440px;
  min-width: 700px;
  padding: 2em;
  margin: 0 auto;
  display: grid;
  grid-template-areas:
    "header"
    "main"
    "footer";
  grid-template-rows: auto 1fr auto;
  min-height: 100vh;
}

/* HEADER Y NAV---------------------------- */
header {
  background-image: url(../img/fondo.png);
  text-align: center;
  padding: 0.2em;
  margin: 1em;
  grid-area: header;
}

.header-top {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 3em 1em;
}
nav {
  background-color: #ce8989;
  margin: 1em;
  display: flex;
  justify-content: space-evenly;
  flex-wrap: wrap;
}

nav ul {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
}

nav li {
  display: inline-block;
  line-height: 30px;
  background-color: #ce8989;
  padding: 1em;
}

nav ul li a {
  padding: 7px 22px;
  color: #ffffff;
  /* Color del texto */
  text-decoration: none;
}

nav ul li:hover {
  background-color: rgba(255, 255, 255, 0.1);
}

/* subrayado de la página seleccionada */
nav ul li a.pagina-actual {
  text-decoration: underline;
  text-decoration-color: #f3dfdf;
  text-decoration-thickness: 0.7px;
  text-underline-offset: 9px;
}

.derecha {
  cursor: pointer;
  margin-left: auto;
}

.abrir-menu,
.cerrar-menu {
  display: none;
}

/* MAIN------------------------------------- */

main {
  grid-area: main;
}

.subtitulo {
  text-align: left;
  margin-left: 3em;
  margin-right: 3em;
  margin-top: 2em;
}

.sub2 {
  margin-top: 1em;
  margin-bottom: 2em;
}

h6 {
  color: #5a5a5a;
}

#cards-container {
  /* tocar esto */
  width: 1000px;
  display: flex;
  flex-wrap: wrap;
  gap: 3em;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  overflow: hidden;
  padding-bottom: 3em;
}

#cards-container2 {
  width: 1000px;
  display: flex;
  flex-wrap: wrap;
  gap: 3em;
  justify-content: center;
  align-items: center;
  margin: 0 auto;
  overflow: hidden;
  padding-top: 2em;
  padding-bottom: 3em;
}

.card {
  background: white;
  border-radius: 6px;
  width: 300px;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease;
  height: 330px;
  align-items: center;
  color: #2e2e2e;
  text-align: center;
}

.card img {
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.card-text {
  font-size: 0.8em;
  text-align: center;
  color: #646464;
}

.card:hover {
  border: solid 2px #ce8989;
  transform: scale(1.005);
  box-shadow: 0 5px 10px rgba(153, 62, 62, 0.067);
  color: #af5858;
}

.carousel-item img {
  height: 400px;
  object-fit: cover;
}

.carousel-inner {
  padding: 0em 3em 3em 3em;
}

.carousel-caption {
  background-color: rgba(255, 255, 255, 0.85);
  padding: 20px;
  border-radius: 4px;
  color: #3a3a3a;
}

/* Botones/flechas carousel */
.carousel-control-prev-icon,
.carousel-control-next-icon {
  filter: brightness(0) drop-shadow(0px 0px 5px rgba(255, 255, 255, 1));
}

/* botón volver a las recetas */
.volver-recetas-contenedor {
  text-align: left;
  padding-left: 2.3em;
}

.boton-volver-recetas {
  display: inline-flex;
  align-items: center;
  background-color: #ce8989;
  color: #ffffff;
  padding: 0.3em 1.5em;
  text-decoration: none;
  border-radius: 4px;
  transition: background-color 0.3s ease;
  font-size: 1em;
}

.boton-volver-recetas i {
  margin-right: 0.5em;
  font-size: 1.2em;
}

.boton-volver-recetas:hover {
  background-color: rgba(206, 137, 137, 0.8);
}

.titulo-receta-individual {
  padding-left: 2.3em;
  margin: 3em 0em 3em 0em;
  text-align: center;
}

.receta-imagen {
  margin: 2em auto;
  max-width: 700px;
  max-height: 450px;
  overflow: hidden;
  border-radius: 4px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  display: flex;
  justify-content: center;
  align-items: center;
}

.receta-imagen img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.receta-ingredientes,
.receta-detalles,
.receta-preparacion {
  padding: 1em 2.3em;
}

.receta-preparacion {
  padding-bottom: 3em;
}

.tips {
  padding: 1em 12em 1em 12em;
}

/* Footer............................................................... */

footer {
  background: #ce8989;
  color: #000000;
  text-align: center;
  padding: 0.5em;
  margin: 1em;
  grid-area: footer;
}

/* MEDIA QUERIES----------------------- */

/* tamaño especial para que no se rompa la card */
@media (max-width: 1185px) {
  .header-top {
    padding: 3em 1em;
    height: 120px;
  }

  #contenedor {
    width: 96vw;
    padding: 1em;
  }

  .header-top {
    padding: 0 2em;
  }
  #cards-container {
    width: 700px;
    display: flex;
    flex-wrap: wrap;
    gap: 3em;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }

  #cards-container2 {
    width: 700px;
    display: flex;
    flex-wrap: wrap;
    gap: 3em;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }
}

/* DISPOSITIVOS GRANDES */
@media (max-width: 1024px) {
  .header-top {
    padding: 3em 1em;
    height: 120px;
  }

  #contenedor {
    width: 96vw;
    padding: 1em;
  }

  .header-top {
    padding: 0 2em;
  }
  #cards-container {
    width: 700px;
    display: flex;
    flex-wrap: wrap;
    gap: 3em;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }

  #cards-container2 {
    width: 700px;
    display: flex;
    flex-wrap: wrap;
    gap: 3em;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }
}

/* PARA EL MENÚ HAMBURGUESA */

@media (max-width: 945px) {
  .abrir-menu,
  .cerrar-menu {
    display: block;
  }

  .header-top {
    padding: 3em 1em;
    height: 120px;
  }

  .nav {
    margin-top: 55px;
    margin-right: 30px;
    opacity: 0;
    visibility: hidden;
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.6rem;
    top: 0;
    right: 0;
    bottom: 0;
    background-color: #ce8989;
    padding: 2rem 1.5rem 1.5rem;
    width: 220px;
    box-shadow: -4px 0 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    height: 400px;
    border-radius: 8px;
  }

  .nav.visible {
    opacity: 1;
    visibility: visible;
  }

  #nav-list {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    width: 100%;
  }

  #nav-list li {
    width: 100%;
    margin-bottom: 0.4rem;
    padding: 0;
  }

  #nav-list li a {
    font-size: 1rem;
    padding: 0.6rem 0rem;
    text-align: center; /* Alinea el texto a la izquierda */
    width: 100%; /* Ocupa todo el ancho del contenedor */
    display: block;
    border: none; /* Elimina cualquier borde previo */
    border-bottom: 1px solid rgba(255, 255, 255, 0.4); /* Línea inferior sutil */
    color: #fafafa;
    transition: all 0.2s ease;
  }
  #nav-list li a:hover {
    border-bottom: 1.5px solid white; /* Línea inferior más gruesa */
  }

  .cerrar-menu {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background-color: rgba(206, 137, 137, 0.95);
    color: #f5f5f5;
    border: none;
    font-size: 1rem;
    padding: 0.5rem;
    border-radius: 50%;
    cursor: pointer;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(255, 255, 255, 0.6);
  }

  .cerrar-menu:hover {
    background-color: rgba(255, 255, 255, 0);
    color: #ce8989;
    transform: scale(1.1);
    transition: all 0.3s ease;
  }

  .abrir-menu {
    background-color: rgba(206, 137, 137, 0.95);
    color: #eeeeee;
    border: 2px solid rgba(245, 245, 245, 0.95);
    font-size: 1.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease, transform 0.2s ease;
  }

  .abrir-menu:hover {
    background-color: rgba(255, 255, 255, 0.8);
    transform: scale(1.05);
  }
}

/* DISPOSITIVOS MEDIANOS */
@media (max-width: 768px) {
  #contenedor {
    width: 100vw;
    padding: 0.7em;
  }
  .header-top {
    padding: 3em 1em;
    height: 120px;
  }
  .abrir-menu,
  .cerrar-menu {
    display: block;
  }
  .derecha {
    margin-left: auto;
  }

  #cards-container {
    width: 700px;
    display: flex;
    flex-wrap: wrap;
    gap: 3em;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }

  #cards-container2 {
    width: 700px;
    display: flex;
    flex-wrap: wrap;
    gap: 3em;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }

  .carousel-caption.d-none.d-md-block {
    display: block !important;
    position: static; /* Cambio la posición para que no se superponga */
    padding: 10px; /* Reduzco el padding para móviles */
    margin-top: 10px;
  }
  .carousel-caption h5,
  .carousel-caption p {
    font-size: 0.9em; /* Reduzco el tamaño de fuente para móviles */
  }

  .receta-imagen {
    margin: 1.5em 1em;
    border-radius: 0;
    max-width: 600px;
    display: contents;
  }
}

/* DISPOSITIVOS PEQUEÑOS */
@media (max-width: 480px) {
  body {
    width: 100vw;
    overflow: hidden;
  }
  #contenedor {
    padding: 0.5em;
    width: 100vw;
    min-width: 0;
    box-sizing: border-box;
  }
  header {
    margin: 0.5em 0;
    padding: 0;
  }

  .header-top {
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
    padding: 3em 1em;
  }

  #cards-container {
    width: 300px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }
  #cards-container2 {
    width: 300px;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    overflow: hidden;
  }
}
/* SECCION PRODUCTOS------USA LA CONFIG LOS PRODUCTOS DEL INDEX----------------------------- */
/* SECCION COMO COMPRAR------------------------------- */
.como_comprar {
  display: flex;
  justify-content: center;
  text-align: left;
  line-height: 1.2;
  padding: 60px 80px;
  background-color: #ce898970;
}

/* --------------------Sección Nosotros------------------------------ */

/* CONTACTO----------------- */
.contenedor_ubicacion {
    display: grid;
    grid-template-columns: 1fr 1fr;
    margin: 0px 20px;
}

.contenedor_ubicacion h2 {
    text-decoration: underline;
    text-align: center;
    margin-bottom: 40px;
}

.box_ubicacion {
    padding: 5px;
    margin-bottom: auto;
}

.box_formulario {
    padding: 5px;
    display: flex;
    flex-direction: column;
    margin-top: auto;
    margin-bottom: auto;
    gap: 10px;
}

.box_formulario label {
    margin-top: 10px;
    display: block;
    margin-bottom: 5px;
}

input {
    padding: 15px 10px;
    border-radius: 4px;
    background-color: rgba(250, 235, 215, 0.521);
    border: solid 1px #ce8989;
    outline: none;
    width: 100%;
    box-sizing: border-box;
}

.boton {
    background-color: #ca6e6e;
    color: aliceblue;
    height: 40px;
    width: 100%;
}

.boton_enviar {
    text-align: center;
    margin-top: 20px;
}

.paddin-contacto {
  padding-left: 3em;
  padding-right: 3em;
}


/* nosotros............................................................... */

.nosotros {
  padding-left: 3em;
  padding-right: 3em;
}