/* -------------- GENERAL -------------- */
html, body {
  height: 100%;
  display: flex;
  flex-direction: column;
  font-family: 'Quicksand', sans-serif;
}

main {
  flex: 1;
  background-color: #f8f7f3;
}

/* menu y plantilla base inicia aqui*/
#principal{
  background-color: #b42822;
  color: #f8f7f3;
  margin: 0px;
  padding: 0px;
  }
#menu-principal{
  position: sticky;
  top: 0;
  z-index: 1000;
  background-color: #f8f7f3;
}    
  #logo{
      width: 50px;
      height: auto;
      margin-right: 30px;
  }
  
  
  #boton_inicio{
  color: #b42822;
  border: 1px solid #b42822;
  margin-right: 10PX;
  margin-left: 20PX;
  transition: 0.3s ease-in-out;
  }
  
  #boton_inicio:hover{
      background-color: #b42822;
      color: rgb(250, 250, 250);
  }
  
  a.nav-link:hover{
      color: #b42822;
      text-decoration: underline;
      font-weight: bold;
      display: flex;
  }
  
  a.nav-link{
      margin: 0 20px;
  }
  
  #FAQ, #contacto, #tienda, #nosotros{
      display: none;
  }
  
  
  #menu-faq, #menu-tienda, #menu-nosotros, #menu-contacto{
      display: flex;
  }
  
  #menu-faq:hover #FAQ{
      display: flex;
      width: 40px;
      height: auto;
  }
  
  #menu-contacto:hover #contacto{
      display: flex;
      width: 40px;
      height: auto;
  }
  
  
  #menu-nosotros:hover #nosotros{
      display: flex;
      width: 40px;
      height: auto;
  }
  
  #menu-tienda:hover #tienda{
      display: flex;
      width: 40px;
      height: auto;
  }
  
  .d-block{
      width: 100%;
      height: 100%;
      max-height: 500px;
      object-fit: cover;
  }

  footer {
      background-color: #222;
      color: white;
      text-align: center;
      padding: 15px;
      width: 100%;
      font-size: small;
  }

  #text-footer{
      margin-bottom: 0px;
  }
  

/* -------------- TARJETAS - ESTILO BASE -------------- */
#cajas {
  margin-top: 40px;
}

.tarjeta {
  width: 100%;
  position: relative;
  overflow: hidden;
  margin-bottom: 30px;
  border: 1px solid #b42822;
  border-radius: 10px;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
  background-color: #fff;
}

/* Contenedor que gira en escritorio */
.tarjeta-contenedor {
  height: auto;
  width: 100%;
  position: static;
}

/* Estilo para ambas caras en móviles/tablets */
.tarjeta-frente,
.tarjeta-dorso {
  position: static;
  padding: 0;
  border: none;
  box-shadow: none;
  background-color: transparent;
  color: inherit;
  text-align: center;
}

.tarjeta-frente {
  padding: 20px 20px 10px 20px;
}

.tarjeta-dorso {
  padding: 0 20px 20px 20px;
  font-size: 15px;
  color: #333;
  line-height: 1.6;
  background-color:#fff;
}

/* Imagen */
.tarjeta-frente img {
  max-height: 180px;
  border-radius: 10px;
  margin-bottom: 10px;
  width: auto;
  object-fit: cover;
}

.card-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
  color: #b42822;
}

.tarjeta-dorso p,
.tarjeta-dorso h5 {
  margin: 10px 0;
}

/* -------------- ANIMACIÓN FADE IN -------------- */
.fade-in {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 1s ease-out forwards;
}

@keyframes fadeInUp {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* -------------- ESTILO EXCLUSIVO PARA ESCRITORIO -------------- */
@media (min-width: 1200px) {
  .tarjeta {
    height: 300px; /* Ajustable según tu contenido */
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    background-color: #f8f7f3;
  }

  

  .tarjeta-contenedor {
    height: 100%;
    transform-style: preserve-3d;
    transition: transform 1s;
    position: relative;
  }

  .tarjeta:hover .tarjeta-contenedor {
    transform: rotateY(180deg);
  }

  .tarjeta-frente,
  .tarjeta-dorso {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 20px;
    backface-visibility: hidden;
    border-radius: 10px;
    background-color: #f8f7f3;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .tarjeta-frente {
    background-color: #f8f7f3;
    color: #b42822;
    transform: rotateY(0deg);
    justify-content: flex-start;
    
  }

  .tarjeta-dorso {
    transform: rotateY(180deg);
    overflow-y: auto;
    justify-content: center;
    background-color: #f8f7f3;

  }

  .tarjeta-frente img {
    max-height: 200px;
  }
}

.tarjeta:hover{

  transform: scale(1.3);
  border: #b42822 2px solid;
}
