:root {
  --color-principal: #5f4141;
  --color-secundario: #f1f1f1;
  --color-texto: #333;
  --color-acento: #7d5a3e;
}

body {
  margin: 0;
  font-family: 'Playfair Display', serif;
  color: var(--color-texto);
  background: url('images/fondo2.jpg') no-repeat center center fixed;
  background-size: cover;
}


header {
  background-color: #1a1919;
  color: white;
  display: flex;
  justify-content: space-between;
  padding: 20px;
  align-items: center;
  position: sticky;
  top: 0;
  z-index: 1000;
}

nav a {
  color: white;
  text-decoration: none;
  margin-left: 20px;
  font-weight: 500;
  padding: 10px 15px;
  border-radius: 12px;
  transition: all 0.3s ease;
  font-size: 30px;
}

nav a:hover {
  color: black;
  border-bottom: 2px black;
}

nav a.active {
  border-bottom: 2px solid var(--color-acento);
}

footer {
  background-color: #1a1919;
  color: white;
  padding: 30px 20px;
  text-align: center;
  font-size: 14px;
}

#carta1 {
  border: 2px solid black;
  background-color: rgba(2, 2, 2, 0.2);
}

.logo {
  font-size: 80px;
  font-weight: bold;
}

.hero {
  position: relative;
  height: 60vh;
  background-image: url('images/el-chiscon1.jpeg');
  background-size: cover;
  background-position: center 60%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  text-align: center;
  padding: 40px;
}

.hero-text {
  position: relative;
  z-index: 2;
}

.hero-text h1 {
  font-size: 48px;
  margin-bottom: 20px;
  transform: translateY(-30px);
}

.hero-text p {
  font-size: 20px;
  transform: translateY(-30px);
}

.franja-negra {
  height: 40px;
  background-color: black;
}

.section-title {
  text-align: center;
  font-size: 66px;
  margin: 50px 0 20px;
  color: white;
}

.carta {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px;
}

.categoria {
  background: linear-gradient(135deg, #e0d4b9, #c0a88d);
  margin-bottom: 30px;
  padding: 20px;
  border-radius: 15px;
  transition: transform 0.3s ease;
  width: 90%;
}

.categoria:hover {
  transform: scale(1.05);
}

.categoria h3 {
  font-size: 28px;
  margin-top: 40px;
  color: var(--color-acento);
  border-bottom: 2px dashed var(--color-principal);
  display: inline-block;
  margin-bottom: 20px;
}

.plato {
  display: flex;
  justify-content: space-between;
  padding: 10px 0;
  border-bottom: 1px dashed #ccc;
  font-size: 18px;
  opacity: 0;
  transform: translateX(0);
  transition: all 0.8s ease-in-out;
}

.plato:last-child {
  border-bottom: none;
}

.nombre {
  font-weight: 600;
}

.precio {
  font-style: italic;
  color: black;
}

@keyframes slideInLeft {
  from {
    transform: translateX(-100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes slideInRight {
  from {
    transform: translateX(100px);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}

.flip-card:hover .flip-card-back .plato:nth-child(even) {
  animation: slideInLeft 1.6s ease-in-out forwards;
}

.flip-card:hover .flip-card-back .plato:nth-child(odd) {
  animation: slideInRight 1.6s ease-in-out forwards;
}


#scrollTop {
  position: fixed;
  bottom: 20px;
  right: 20px;
  background-color: var(--color-principal);
  color: white;
  border: none;
  border-radius: 50%;
  width: 40px;
  height: 40px;
  cursor: pointer;
  display: none;
  font-size: 20px;
}
.flip-card-para-compartir {
  width: 100%;
  max-width: 1000px;
  height: 600px;
  perspective: 1000px;
  margin: 0 auto 30px;
}

.flip-card-ensaladas {
  width: 100%;
  max-width: 1000px;
  height: 850px;
  perspective: 1000px;
  margin: 0 auto 30px;
}

.flip-card-principales {
  width: 100%;
  max-width: 1000px;
  height: 800px;
  perspective: 1000px;
  margin: 0 auto 30px;
}

.flip-card-postres {
  width: 100%;
  max-width: 1000px;
  height: 450px;
  perspective: 1000px;
  margin: 0 auto 30px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transform-style: preserve-3d;
  transition: transform 0.8s;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front1, .flip-card-front2, .flip-card-front3,.flip-card-front4,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 15px;
  display: flex;
  align-items: center;
  justify-content: center;

  left: 0;
  top: 0;
  box-sizing: border-box;
}

.flip-card-front1 {
  background-image: url('images/paracompartir.jpg');
  background-size: cover;
  background-position: center;
  color: white;
  font-size: 32px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
  position: relative;
}

.flip-card-front2 {
  background-image: url('images/ensalada.jpg');
  background-size: cover;
  background-position: center;
  color: white;
  font-size: 32px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
  position: relative;
}

.flip-card-front3 {
  background-image: url('images/principales.jpg');
  background-size: cover;
  background-position: center;
  color: white;
  font-size: 32px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
  position: relative;
}

.flip-card-front4 {
  background-image: url('images/postres.jpg');
  background-size: cover;
  background-position: center;
  color: white;
  font-size: 32px;
  font-weight: bold;
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.6);
  position: relative;
}

.front-image h3 {
  text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.7);
  padding: 10px;
  border-radius: 5px;
  margin: 0;
  font-size: 50px;
}


.flip-card-back {
  background: linear-gradient(135deg, #e0d4b9, #c0a88d);
  transform: rotateY(180deg);
  padding: 20px;
  flex-direction: column;
  overflow: hidden !important;
}

@media (max-width: 1024px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 15px;
  }

  .logo {
    font-size: 60px;
    margin-bottom: 10px;
  }

  nav a {
    font-size: 24px;
    margin-left: 0;
    margin-right: 15px;
    padding: 8px 12px;
  }
}

@media (max-width: 600px) {
  header {
    flex-direction: column;
    align-items: flex-start;
    padding: 10px;
  }

  .logo {
    font-size: 48px;
    margin-bottom: 8px;
  }

  nav a {
    font-size: 20px;
    margin: 5px 10px 0 0;
    padding: 6px 10px;
  }
}

