@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: 1/1; /* Square ratio for mobile layout */
  background-color: black;
}

.video-container iframe {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 177.78%;
  height: 135%;
  border: 0;
  transform: translate(-50%, -50%);
  z-index: 5;
}

.video-cover {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.play-button-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  background-color: rgba(0, 0, 0, 0.1);
  cursor: pointer;
  z-index: 10;
  transition: background-color 0.2s ease;
}

.play-button-overlay:hover {
  background-color: rgba(0, 0, 0, 0.2);
}

.play-button-overlay img {
  width: 72px;
  height: 72px;
  transition: transform 0.2s ease;
}

.play-button-overlay:hover img {
  transform: scale(1.1);
}

/* 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;
}

.home-promo-widget {
  position: fixed;
  right: calc(max((100vw - min(480px, 100vw)) / 2 + 14px, 14px));
  bottom: 18px;
  z-index: 60;
  display: flex;
  align-items: flex-end;
  justify-content: flex-end;
  transition: opacity 0.24s ease, transform 0.24s ease, visibility 0.24s ease;
}

.home-promo-widget.is-shortcut-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(12px);
}

.home-promo-card {
  position: relative;
  width: min(calc(min(480px, 100vw) - 28px), 360px);
  padding: 20px 18px 18px;
  border-radius: 22px;
  background-image:
    linear-gradient(180deg, rgba(25, 18, 14, 0.24) 0%, rgba(25, 18, 14, 0.52) 100%),
    url("../assets/maqueta.jpeg");
  background-size: cover;
  background-position: center;
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.2);
  backdrop-filter: blur(10px);
  cursor: pointer;
  transition: opacity 0.26s ease, transform 0.26s ease, visibility 0.26s ease, box-shadow 0.26s ease;
  overflow: hidden;
}

.home-promo-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.18);
}

.home-promo-card:focus-visible {
  outline: 2px solid #e6643c;
  outline-offset: 4px;
}

.home-promo-close {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.home-promo-close:hover {
  background: rgba(255, 255, 255, 0.3);
  color: #fff;
  transform: scale(1.04);
}

.home-promo-pill {
  display: block;
  margin-bottom: 6px;
  padding-right: 28px;
  color: #fff;
  font-family: "Ubuntu", sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.05;
  text-align: left;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

.home-promo-text {
  max-width: none;
  margin: 0;
  padding-right: 18px;
  color: rgba(255, 255, 255, 0.9);
  font-family: "Ubuntu", sans-serif;
  font-size: 13px;
  font-weight: 300;
  line-height: 1.35;
  text-align: left;
  text-shadow: 0 1px 8px rgba(0, 0, 0, 0.26);
}

.home-promo-bubble {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px;
  height: 58px;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #e6643c 0%, #f08a42 100%);
  color: #fff;
  font-family: "Ubuntu", sans-serif;
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.02em;
  box-shadow: 0 16px 34px rgba(230, 100, 60, 0.32);
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: scale(0.86);
  transition: opacity 0.26s ease, transform 0.26s ease, box-shadow 0.26s ease;
  position: relative;
  z-index: 1;
}

/* Anillo de pulso que respira */
.home-promo-bubble::before {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(230, 100, 60, 0.35);
  animation: promo-pulse 2.4s ease-in-out infinite;
  pointer-events: none;
}

@keyframes promo-pulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.6;
  }
  50% {
    transform: scale(1.18);
    opacity: 0;
  }
}

.home-promo-bubble:hover {
  transform: scale(1.08);
  box-shadow: 0 20px 44px rgba(230, 100, 60, 0.42);
}

.home-promo-bubble:focus-visible {
  outline: 2px solid #e6643c;
  outline-offset: 4px;
}

.home-promo-widget.is-collapsed .home-promo-card {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(10px) scale(0.9);
  position: absolute;
  right: 0;
  bottom: 0;
}

.home-promo-widget.is-collapsed .home-promo-bubble {
  opacity: 1;
  pointer-events: auto;
  transform: scale(0.9);
}

/* 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;
}

.content-grid.is-animating .image-container {
  opacity: 0;
  transform: translateY(18px) scale(0.985);
}

.content-grid.is-animating .image-container.is-visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition: opacity 0.92s ease, transform 0.92s ease, box-shadow 0.3s ease;
}

.image-container::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0.03) 8%, rgba(0, 0, 0, 0.14) 34%, rgba(0, 0, 0, 0.34) 62%, rgba(0, 0, 0, 0.62) 100%);
  pointer-events: none;
}

.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;
  text-shadow: 0 2px 8px rgba(0, 0, 0, 0.36), 0 1px 2px rgba(0, 0, 0, 0.28);
}

.image-subtext {
  display: block;
  margin-top: 6px;
  max-width: 280px;
  font-size: 12px;
  line-height: 1.25;
  font-weight: 400;
}

.row-1 {
  grid-column: span 6;
  height: 120px;
}

/* Fila 2 - Actividades & Recetario */
.row-2-1,
.row-2-2 {
  grid-column: span 3;
  height: 120px;
}

/* Fila 3 - Turismo & Produccion */
.row-3-1,
.row-3-2 {
  grid-column: span 3;
  height: 120px;
}

/* Fila 4 - Reuniones & Nuestros Productores */
.row-4-1,
.row-4-2 {
  grid-column: span 3;
  height: 120px;
}

/* Fila 5 - Comparti San Juan */
.row-5 {
  grid-column: span 6;
  height: 120px;
}

.row-5 .image-text {
  left: 50%;
  width: calc(100% - 30px);
  transform: translateX(-53%);
  text-align: center;
}

.row-5 .image-subtext {
  margin-left: auto;
  margin-right: auto;
  text-align: center;
}

@media (max-width: 520px) {
  .home-promo-widget {
    right: 14px;
    bottom: 14px;
  }

  .home-promo-card {
    width: calc(100vw - 28px);
    padding: 16px 16px 14px;
    border-radius: 20px;
  }

  .home-promo-pill {
    font-size: 18px;
  }

  .home-promo-text {
    max-width: none;
    font-size: 13px;
  }

  .home-promo-bubble {
    width: 54px;
    height: 54px;
    font-size: 18px;
  }
}

/* ── Barra de utilidades sutil entre grid y footer ── */
.home-utility-bar {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 16px;
  padding: 14px 30px;
  margin: 0 30px;
  border-top: 1px solid #eee;
  flex-wrap: wrap;
}

.utility-address-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.utility-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: #999;
  font-family: "Ubuntu", sans-serif;
  font-size: 12px;
  font-weight: 400;
  text-decoration: none;
  transition: color 0.2s ease;
  white-space: nowrap;
}

.utility-link:hover {
  color: #e6643c;
}

.utility-link:focus-visible {
  outline: 2px solid #e6643c;
  outline-offset: 3px;
  border-radius: 4px;
}

.utility-icon-svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

.utility-sub {
  display: block;
  color: #bbb;
  font-family: "Ubuntu", sans-serif;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.04em;
  text-align: center;
}

.utility-sep {
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: #ccc;
  flex-shrink: 0;
}

@media (max-width: 400px) {
  .utility-sep {
    display: none;
  }
  .home-utility-bar {
    gap: 10px;
    padding: 12px 20px;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  .utility-link {
    transition: none;
  }
}
@supports not (aspect-ratio: 16 / 9) {
  .video-container {
    height: 450px;
  }

  @container (max-width: 768px) {
    .video-container {
      height: 300px;
    }
  }

  @container (max-width: 480px) {
    .video-container {
      height: 200px;
    }
  }
}
