* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html, body {
  touch-action: manipulation;
}
.hero {
  position: relative;
  width: 100%;
  height: 100vh;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  background: url('../assets/img_tipos_vacunas/tipos_vacunas1.png') 
              center/cover no-repeat;
  overflow: hidden;
}
.hero-content {
  max-width: 40%;
  padding: 0 2rem;
  margin-right: clamp(1rem, 10vw, 5rem);
}
.animated-text {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity .8s ease-out, transform .8s ease-out;
}
.animated-text.enter {
  opacity: 1;
  transform: translateX(0);
}
.animated-text .line {
  display: block;
  color: #fff;
  text-shadow: 2px 2px 8px rgba(0,0,0,0.7);
  font-size: clamp(2rem, 8vw, 7rem);
  line-height: 1.1;
}
.cards-section {
  position: relative;
  padding: 4rem 1rem;
  background: url('../assets/img_tipos_vacunas/tipos_vacunas2.png') 
              center/cover no-repeat;
}
.cards-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
  max-width: 1500px;
  margin: 0 auto;
}

.card {
  background: rgba(255, 255, 255, 0.9);
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 6px 12px rgba(0,0,0,0.1);
  transition: transform .3s ease, box-shadow .3s ease;
  display: flex;
  flex-direction: column;
}
.card-thumb {
  width: 100%;
  padding-top: 56.25%; /* 16:9 */
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}
.card h2 {
  font-size: 1.5rem;
  margin: 1rem;
  text-align: center;
}
.card p {
  flex-grow: 1;
  font-size: 1rem;
  line-height: 1.5;
  margin: 0 1.5rem 1rem;
  text-align: center;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: 0 12px 24px rgba(0,0,0,0.15);
}
.bg-img {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  z-index: -1;
  pointer-events: none;
}
@media (max-width: 1024px) {
  .hero {
    justify-content: center;
    text-align: center;
  }
  .hero-content {
    max-width: 60%;
    padding: 0 1.5rem;
    margin: 0 auto;
  }
  .animated-text .line {
    font-size: 4rem;
  }
}

@media (max-width: 768px) {
  .hero {
    justify-content: center;
    text-align: center;
    padding: 0 1rem;
  }
  .hero-content {
    max-width: 90%;
    padding: 0 1rem;
    margin: 0 auto;
  }
  .animated-text .line {
    font-size: 5vw;
  }
  .cards-container {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  }
}

@media (max-width: 480px) {
  .hero-content {
    max-width: 90%;
    padding: 0 1rem;
    margin: 0 auto;
  }
  .animated-text .line {
    font-size: 6vw;
  }
  .cards-container {
    grid-template-columns: 1fr;
  }
  .card h2 {
    font-size: 1.2rem;
  }
  .card p {
    font-size: 0.95rem;
  }
}