@font-face {
  font-family: 'BlackFlag';
  src: url('assets/fonts/BlackFlag.ttf') format('truetype');
  font-weight: normal;
  font-style: normal;
}

body {
  margin: 0;
  font-family: 'BlackFlag', Arial, sans-serif;
  background: url('assets/table.jpg') center/cover no-repeat fixed;
  overflow-x: hidden;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Hacemos que las secciones crezcan pero no tapen el footer */
.section {
  flex: 1; /* ocupa el espacio disponible */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: relative; /* quitar absolute */
  transition: transform 1s ease, opacity 1s ease;
}

/* Footer fijo al final de la página */
footer {
  position: fixed; /* fija al fondo de la ventana */
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  padding: 0.3em 2em 0.3em 0.3em; /* arriba, derecha, abajo, izquierda */
  background: rgba(60, 49, 99, 0.473); /* morado translúcido */
  color: rgb(141, 118, 161);
  text-align: right;
  z-index: 1000;
  box-sizing: border-box; /* asegura que el padding no cause scroll */
}


button{
  font-family: 'BlackFlag', Arial, sans-serif;
}

.section {
  width: 100%;
  height: calc(100vh - 5em); /* resta el alto del footer */
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  position: absolute;
  top: 0;
  left: 0;
  transition: transform 1s ease, opacity 1s ease;
}

.hidden {
  opacity: 0;
  pointer-events: none;
}

/* ===== SECTION 1 - FLIP CARD ===== */
.flip-card {
  perspective: 1000px;
  width: 300px;
  height: 550px;
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card:hover .flip-card-inner {
  transform: rotateY(180deg);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4);
}

.flip-card-front, .flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 10px 25px rgba(0,0,0,0.2);
}

.flip-card-front img,
.flip-card-back img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  border-radius: 15px;
}

.flip-card-front {
  background: #ccc;
}

.flip-card-back {
  background: #333;
  color: white;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotateY(180deg);
  position: relative;
}

.flip-card-back button {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  padding: 1em 2em;
  font-size: 1em;
  border: none;
  background: #61161A;
  color: white;
  border-radius: 10px;
  cursor: pointer;
}

.slide-out {
  transform: translateY(100vh);
  opacity: 0;
}

/* ===== SECTION 2 - CARDS ===== */
#section2 {
  flex-direction: column;
  padding: 2em;
}

.cards-container {
  display: flex;
  gap: 1.5em;
  flex-wrap: wrap;
  justify-content: center;
}

.card {
  width: 300px;
  height: 550px;
  perspective: 1000px;
  transform: translateY(100px);
  opacity: 0;
  animation: slideIn 0.8s forwards;
}

@keyframes slideIn {
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  transition: transform 0.8s;
  transform-style: preserve-3d;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3); /* Sombra para dar dimensión */
}
.flip-card-front, .flip-card-back {
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  border-radius: 15px;
}

.card:hover .card-inner {
  transform: rotateY(180deg);
}

.card-front, .card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  border-radius: 15px;
  overflow: hidden;
}

.card-front img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.card-back {
  transform: rotateY(180deg);
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0.7);
  color: white;
  flex-direction: column;
  position: relative;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
}

.card-back img {
  position: absolute;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(5px);
  z-index: 0;
}

.card-back .overlay {
  position: relative;
  z-index: 1;
  text-align: center;
}

.card-back h3 {
  margin-bottom: 1em;
}

.card-back button {
  padding: 0.5em 1em;
  border: none;
  background: #61161A;
  color: white;
  border-radius: 8px;
  cursor: pointer;
}

.pagination {
  margin-top: 2em;
  display: flex;
  gap: 1em;
}

.pagination button {
  padding: 0.5em 1em;
  border: none;
  background: #3c3163;
  color: white;
  border-radius: 5px;
  cursor: pointer;
}

.section2-title {
  display: block;
  font-size: 2em;
  margin-bottom: 5rem;
  color: #b5aed1;
}