@font-face {
  font-family: "Ubuntu";
  src: url("../fuentes/ubunturegular.ttf") format("truetype");
  font-weight: normal;
  font-style: normal;
}

@font-face {
  font-family: "Ubuntu";
  src: url("../fuentes/ubuntubold.ttf") format("truetype");
  font-weight: bold;
  font-style: normal;
}

@font-face {
  font-family: "Ubuntu";
  src: url("../fuentes/ubuntuitalic.ttf") format("truetype");
  font-weight: normal;
  font-style: italic;
}

@font-face {
  font-family: "Ubuntu";
  src: url("../fuentes/ubuntubolditalic.ttf") format("truetype");
  font-weight: bold;
  font-style: italic;
}

@font-face {
  font-family: "Ubuntu";
  src: url("../fuentes/ubuntulight.ttf") format("truetype");
  font-weight: 300;
  font-style: normal;
}

@font-face {
  font-family: "Ubuntu";
  src: url("../fuentes/ubuntulightitalic.ttf") format("truetype");
  font-weight: 300;
  font-style: italic;
}

@font-face {
  font-family: "Ubuntu";
  src: url("../fuentes/ubuntumedium.ttf") format("truetype");
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: "Ubuntu";
  src: url("../fuentes/ubuntumediumitalic.ttf") format("truetype");
  font-weight: 500;
  font-style: italic;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Override background from style.css for home page */
body {
  background-color: white;
  background-image: none;
  margin: 0;
  padding: 0;
}

/* Video section styles */
.video-section {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  background-color: black;
  margin: 0;
  padding: 0;
  position: relative;
  z-index: 1;
  margin-top: -20px; /* Para que se posicione detrás del header */
}

.video-container {
  width: 100%;
  max-width: 100%;
  position: relative;
  overflow: hidden;
  margin: 0;
  aspect-ratio: 16/9;
}

.video-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Por defecto, mostrar video de PC y ocultar móvil */
.mobile-video {
  display: none;
}

.desktop-video {
  display: block;
}

/* En móvil, mostrar video móvil y ocultar PC */
@media (max-width: 600px) {
  .video-container {
    aspect-ratio: 1/1;
  }
  
  .mobile-video {
    display: block;
  }
  
  .desktop-video {
    display: none;
  }
}

/* Play button container */
.play-button-container {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  transition: background 0.3s ease;
}

.video-container:hover .play-button-container {
  background: rgba(0, 0, 0, 0.4);
}

/* Play button */
.play-button {
  width: 80px;
  height: 80px;
  filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.3));
  transition: transform 0.3s ease;
}

.play-button:hover {
  transform: scale(1.1);
}

/* Aseguramos que main no tenga espacios */
main {
  margin: 0;
  padding: 0;
}

/* Sección de contenido con grid de 6 columnas */
.content-section {
  margin: 40px 30px;
  padding: 0;
  width: calc(100% - 60px);
}

.content-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-template-rows: auto auto auto auto;
  gap: 5px;
  max-width: 1200px;
  margin: 0 auto;
  width: 100%;
}

/* Enlaces que contienen los contenedores de imagen */
.image-link {
  text-decoration: none;
  display: block;
  width: 100%;
  height: 100%;
}

/* Contenedor de imagen con texto */
.image-container {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  width: 100%;
  min-height: 120px;
}

.image-container:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.image-container img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* Texto superpuesto */
.image-text {
  position: absolute;
  bottom: 15px;
  left: 15px;
  color: white;
  font-family: "Ubuntu", sans-serif;
  font-weight: bold;
  font-size: 16px;
  line-height: 1.2;
  z-index: 10;
}

.row-1 {
  grid-column: span 6;
  height: 120px;
}

/* Fila 2 - cada imagen ocupa 2 columnas */
.row-2-1,
.row-2-2,
.row-2-3 {
  grid-column: span 2;
  height: 120px;
}

/* Fila 3 - cada imagen ocupa 3 columnas */
.row-3-1,
.row-3-2 {
  grid-column: span 3;
  height: 120px;
}

/* Fila 4 - ocupa 6 columnas */
.row-4 {
  grid-column: span 6;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #eee;
}

/* Media queries para pantallas más grandes */
@media (min-width: 768px) {
  /* Aumentamos la altura de los contenedores de imagen en tablets y pantallas más grandes */
  .row-1 {
    height: 180px;
  }

  .row-2-1,
  .row-2-2,
  .row-2-3 {
    height: 180px;
  }

  .row-3-1,
  .row-3-2 {
    height: 180px;
  }

  .row-4 {
    height: 180px;
  }
}

/* Para pantallas aún más grandes como desktops */
@media (min-width: 1024px) {
  .row-1 {
    height: 220px;
  }

  .row-2-1,
  .row-2-2,
  .row-2-3 {
    height: 220px;
  }

  .row-3-1,
  .row-3-2 {
    height: 220px;
  }

  .row-4 {
    height: 220px;
  }
}

/* Fallback para navegadores que no soportan aspect-ratio */
@supports not (aspect-ratio: 16 / 9) {
  .video-container {
    height: 450px;
  }

  @media (max-width: 768px) {
    .video-container {
      height: 300px;
    }
  }

  @media (max-width: 480px) {
    .video-container {
      height: 200px;
    }
  }
}
