@import url('https://fonts.googleapis.com/css2?family=Fira+Sans:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Fira Sans", sans-serif;
}

body {
  color: #2E4975;
  line-height: 1.6;
  background-color: #e6e6e6;
}

nav {
  display: block;
  unicode-bidi: isolate;
  margin-left: 8%;
  padding-top: 0;
}

nav ul {
  --gap: 2rem;
  list-style: none;
  display: flex;
  gap: var(--gap);
  justify-content: space-evenly;
  align-items: center;
}

nav li {
  position: relative;
  padding: 0 1rem;
}

nav>ul>li:not(:first-child)::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 100%;
  margin-right: calc(var(--gap) / 2);
  width: 1px;
  background-color: white;
}

nav a {
  text-decoration: none;
  color: white;
  font-weight: 500;
  transition: color 0.3s ease;
}

nav>ul>li:hover>a {
  color: #ffb74d;
}

nav ul .submenu {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: #e0e0e0;
  padding: 0;
  margin: 0;
  list-style: none;
  min-width: 180px;
  z-index: 1000;
}

nav ul .submenu li {
  position: relative;
  transition: background-color 0.3s ease;
}

nav ul .submenu li::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 85%;
  height: 1px;
  background-color: #000;
}

nav ul .submenu li:last-child::after {
  content: none;
}

nav ul .submenu a {
  color: #000000;
  font-weight: 500;
  padding: 0.75rem 1rem;
  display: block;
  transition: color 0.2s ease;
}

nav ul .submenu li:hover {
  background-color: #cacaca;
}

nav ul .submenu a:hover {
  color: #2E4975;
}

.active {
  color: red !important;
}

.submenu-link {
  text-align: center;
}

nav li:hover>.submenu,
nav li:has(.submenu:hover)>.submenu {
  display: block;
}

.sub {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.sub img {
  flex-shrink: 0;
}

#btn {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 50px;
  height: 50px;
  background: transparent;
  padding: 0;
  border: none;
}

#btn img {
  max-width: 70%;
  max-height: 70%;
}



/* SECCIONES RESPONSIVAS */
.top-section,
.middle-section {
  text-align: center;
  margin-bottom: 2rem;
}

.top-section {
  background-color: #d0d0d0;
}

.imagen {
  width: 500px;
  height: 300px;
  object-fit: cover;
  border-radius: 10px;
  box-shadow: 10px 10px 15px rgba(0, 0, 0, 0.5);
}

/* Estilos para el efecto de cinta que sobresale */
.info-section {
    width: 90%;
    max-width: 1000px;
    margin: 2rem auto;
    /* La sombra se mantiene en el contenedor principal */
    box-shadow: 10px 10px 15px rgba(0, 0, 0, 0.5);
    background-color: transparent; /* Fondo transparente para que solo se vean los divs internos */
    display: flex; /* Usamos Flexbox para ordenar los elementos */
    flex-direction: column; /* Apilamos los divs verticalmente */
    align-items: center; /* Centramos los divs horizontalmente */
}

.info-header {
    background-color: #b5b5b5;
    color: white;
    text-shadow: 3px 3px 5px gray;
    width: 110%; /* Lo hacemos más ancho para que sobresalga */
    padding: 1rem;
    text-align: center;
    border-radius: 10px 10px 0 0; /* Bordes redondeados solo arriba */
    /* Aquí eliminamos el 'position: absolute' y los 'z-index' */
    box-shadow: 10px 10px 15px rgba(0, 0, 0, 0.5);
}

.info-header h2 {
    color: #fff;
}

.info-body {
    background-color: #f0f0f0;
    color: #2E4975;
    width: 100%; /* El 100% de su contenedor padre (.info-section) */
    padding: 2rem 1rem;
    text-align: justify;
    border-radius: 0 0 10px 10px; /* Bordes redondeados solo abajo */
    /* Eliminamos las propiedades de posicionamiento que no necesitamos */
}

.contenedor-flex {
    display: flex;
    align-items: center;
    gap: 20px;
    width: 100%; /* Se adapta al 100% de .info-body */
    max-width: 900px;
    margin: 0 auto;
}

.contenedor-flex {
  display: flex;
  align-items: center;
  gap: 60px;
  width: 90%;
  max-width: 900px;
  margin: 0 auto;
}

.contenedor-flex img {
  width: 100%;
  max-width: 360px;
  height: auto;
  box-shadow: 10px 10px 15px rgba(0, 0, 0, 0.5);
  border-radius: 10px;
}

.contenedor-flex p {
  line-height: 1.5;
  text-align: justify;
  width: 100%;
}

.contenedor-flex.reverse {
  flex-direction: row-reverse;
}

.middle-text {
  font-size: 23px;
}

/* EFECTO DE IMAGEN HOVER */
.container-futuro {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  width: 90%;
  max-width: 1300px;
  margin: 0 auto;
  text-align: left;
}

.image-container {
  width: 100%;
  max-width: 500px;
  height: 300px;
  position: relative;
  overflow: hidden;
  transition: transform 0.5s, box-shadow 0.5s;
}

.image-container::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: url('imagenes/spam lleno.png');
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 0.5s;
}

.hover-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.5s;
}

.image-container:hover {
  transform: translateY(-10px);
}

.image-container:hover .hover-image {
  opacity: 0;
}

.image-container:hover::before {
  opacity: 1;
}

.main-title {
  font-size: 30px;
}

.futuro-text {
  font-size: 23px;
}

/* ESTILOS DE CARTAS (FLIP CARD) */
.cards-wrapper {
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
  padding: 2rem 0;
}

.flip-card {
  background-color: transparent;
  width: 300px;
  height: 500px;
  perspective: 1000px;
  cursor: pointer;
  transition: transform 0.8s;
  margin: 50px 0;
}

.flip-card.flipped {
  transform: translateY(-20px);
}

.flip-card-inner {
  position: relative;
  width: 100%;
  height: 100%;
  text-align: center;
  transition: transform 0.8s;
  transform-style: preserve-3d;
}

.flip-card.flipped .flip-card-inner {
  transform: rotateY(180deg);
}

.flip-card-front,
.flip-card-back {
  position: absolute;
  width: 100%;
  height: 100%;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
}

.flip-card-back {
  transform: rotateY(180deg);
}

.card-image {
  width: 100%;
  height: 100%;
  object-fit: contain;
  position: absolute;
  top: 0;
  left: 0;
}

.card-content {
  position: relative;
  z-index: 2;
  padding: 20px;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.6);
}

/* MEDIA QUERIES PARA ADAPTAR EL DISEÑO */
/* SMALL PHONES (up to 480px) */
@media (max-width: 480px) {
  .imagen {
    width: 100%;
    max-width: 280px;
    height: 200px;
  }
  
  .info-section {
    width: 98%;
    margin: 1rem auto;
  }
  
  .info-header {
    width: 100%;
    padding: 0.75rem;
  }
  
  .info-body {
    padding: 1rem 0.75rem;
  }
  
  .contenedor-flex,
  .contenedor-flex.reverse {
    flex-direction: column;
    text-align: center;
    width: 98%;
    gap: 15px;
  }
  
  .contenedor-flex img {
    width: 90%;
    max-width: 260px;
  }
  
  .container-futuro {
    flex-direction: column;
    text-align: center;
    width: 98%;
    gap: 15px;
  }
  
  .image-container {
    max-width: 90%;
    height: 90%;
  }
  
  .main-title {
    font-size: 20px;
  }
  
  .futuro-text {
    font-size: 16px;
  }
  
  .middle-text {
    font-size: 16px;
  }
  
  .flip-card {
    width: 200px;
    height: 320px;
    margin: 0.5rem 0;
  }
  
  .cards-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 1rem;
  }
  
  .card-content {
    padding: 15px;
  }
}

/* PHONES (481px to 768px) */
@media (min-width: 481px) and (max-width: 768px) {
  .imagen {
    width: 400px;
    height: 250px;
  }
  
  .info-section {
    width: 95%;
  }
  
  .info-header {
    width: 108%;
  }
  
  .contenedor-flex,
  .contenedor-flex.reverse {
    flex-direction: column;
    text-align: center;
    width: 92%;
    gap: 18px;
  }
  
  .contenedor-flex img {
    width: 85%;
    max-width: 320px;
  }
  
  .container-futuro {
    flex-direction: column;
    text-align: center;
    width: 92%;
    gap: 18px;
  }
  
  .image-container {
    width: 100%;
    max-width: 90%;
    height: 90%;
  }
  
  .main-title {
    font-size: 26px;
  }
  
  .futuro-text {
    font-size: 20px;
  }
  
  .middle-text {
    font-size: 20px;
  }
  
  .flip-card {
    width: 280px;
    height: 450px;
  }
  
  .cards-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
  }
}

/* TABLETS (769px to 1024px) */
@media (min-width: 769px) and (max-width: 1024px) {
  .imagen {
    width: 450px;
    height: 280px;
  }
  
  .info-section {
    width: 92%;
  }
  
  .info-header {
    width: 108%;
  }
  
  .contenedor-flex,
  .contenedor-flex.reverse {
    width: 88%;
    gap: 18px;
  }
  
  .contenedor-flex img {
    max-width: 320px;
  }
  
  .container-futuro {
    width: 88%;
    gap: 18px;
  }
  
  .image-container {
    max-width: 80%;
    height: 80%;
  }
  
  .main-title {
    font-size: 28px;
  }
  
  .futuro-text {
    font-size: 21px;
  }
  
  .middle-text {
    font-size: 21px;
  }
  
  .flip-card {
    width: 260px;
    height: 420px;
  }
  
  .cards-wrapper {
    gap: 2rem;
  }
}

/* LAPTOPS (1025px to 1199px) */
@media (min-width: 1025px) and (max-width: 1199px) {
  .container-futuro {
    width: 85%;
    max-width: 1200px;
  }
  
  .image-container {
    max-width: 450px;
    height: 290px;
  }
  
  .info-section {
    width: 88%;
    max-width: 1000px;
  }
  
  .flip-card {
    width: 280px;
    height: 480px;
  }
  
  .cards-wrapper {
    gap: 2.5rem;
  }
  
  .contenedor-flex {
    width: 88%;
    max-width: 850px;
  }
}

/* LARGE SCREENS (1200px+) */
@media (min-width: 1200px) {
  .container-futuro {
    max-width: 1400px;
  }
  
  .info-section {
    max-width: 1100px;
  }
  
  .contenedor-flex {
    max-width: 950px;
  }
  
  .cards-wrapper {
    gap: 4rem;
  }
  
  .flip-card {
    width: 320px;
    height: 520px;
  }
}