/* Reset general */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Estilos generales */
body {
  font-family: Arial, sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f5f5f5;
  line-height: 1.6;
}

h2 {
  color: #030303;
}

/* Contenedor general */
.container4 {
  display: flex;
  flex-wrap: wrap;
  gap: 30px;
  justify-content: center;
  padding: 20px;
  max-width: 1200px;
  margin: 20px auto;
}

/* Sección genérica */
.container2 {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  padding: 20px;
}

.section {
  flex: 1 1 calc(50% - 20px);
  background-color: #f4f4f4;
  padding: 20px;
  border-radius: 10px;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.image-container,
.video-container {
  margin-top: 25px;
  background-color: #ddd;
  border-radius: 10px;
  overflow: hidden;
}

.image-container img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover; /* Mantiene la proporción */
  border-radius: 10px;
}

/* Estilos para el video */
video {
  width: 100%;
  height: auto;
  max-height: 300px;
}

/* Ajustes para video en pantallas grandes (como laptops) */
@media (min-width: 768px) {
  .video-container {
    width: 100%;
    padding: 0;
  }

  video {
    width: 100%; /* Asegura que ocupe todo el ancho disponible */
    height: auto;
    max-height: 500px; /* Limita la altura máxima en pantallas grandes */
    object-fit: cover; /* Mantiene la proporción del video */
  }

  .image-container img {
    max-height: 400px; /* Limita la altura de la imagen en pantallas grandes */
    object-fit: cover; /* Mantiene la proporción */
  }
}

/* Tarjetas */
.card {
  background-color: #fff;
  border-radius: 20px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  width: 500px;
  margin: 40px 0;
  padding: 30px;
  transition: transform 0.3s ease, box-shadow 0.3s ease, opacity 0.7s ease-out, transform 0.7s ease-out;
  opacity: 0;
  transform: translateY(40px);
}

.card:hover {
  transform: translateY(-10px);
  box-shadow: 0 8px 16px rgba(0, 0, 0, 0.2);
}

.card.show {
  opacity: 1;
  transform: translateY(0);
}

.card h2 {
  background-color: #444;
  color: #fff;
  padding: 15px;
  text-align: center;
  font-size: 1.5rem;
  font-weight: bold;
}

.card .content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px;
  padding: 20px;
  text-align: center;
}

.card img {
  width: 100%;
  height: auto;
  border-radius: 15px;
  margin-top: 15px;
  box-shadow: 0 6px 8px rgba(0, 0, 0, 0.15);
}

/* Estilo para las tablas */
.styled-table {
  width: 100%;
  border-collapse: collapse;
  margin: 20px 0;
  font-size: 1.1rem;
  text-align: left;
  background-color: #fff;
  border-radius: 15px;
  box-shadow: 0 6px 12px rgba(0, 0, 0, 0.2);
  overflow: hidden;
}

.styled-table thead tr {
  background-color: #444;
  color: #fff;
  text-align: center;
  font-weight: bold;
}

.styled-table th,
.styled-table td {
  padding: 15px 20px;
  border: 1px solid #ddd;
}

.styled-table tbody tr {
  border-bottom: 1px solid #ddd;
}

.styled-table tbody tr:nth-of-type(even) {
  background-color: #f9f9f9;
}

.styled-table tbody tr:last-of-type {
  border-bottom: 2px solid #444;
}

.styled-table tbody tr:hover {
  background-color: #f1f1f1;
  transform: scale(1.02);
  transition: all 0.3s ease-in-out;
}

/* Responsividad */
@media (max-width: 768px) {
  .section {
    flex: 1 1 100%;
  }

  .card {
    width: 100%; /* Ajusta el ancho al contenedor */
    padding: 20px;
  }

  .card h2 {
    font-size: 1.5rem;
  }

  .card p {
    font-size: 1rem;
  }

  .card img {
    width: 100%;
    height: auto;
  }

  .image-container img {
    max-height: 200px; /* Reduce la altura máxima */
    object-fit: cover; /* Mantiene la proporción */
  }

  .styled-table th,
  .styled-table td {
    padding: 10px;
    font-size: 1rem;
  }
}

@media (max-width: 480px) {
  .card {
    margin: 20px 0;
    padding: 15px;
  }

  .card h2 {
    font-size: 1.2rem;
  }

  .card img {
    width: 100%;
    height: auto;
  }

  .image-container img {
    max-height: 180px; /* Ajusta para pantallas más pequeñas */
    object-fit: cover; /* Mantiene la proporción */
  }

  .styled-table th,
  .styled-table td {
    font-size: 0.8rem;
  }
}

