/*
 * EcoEntradas 2.0.
 * Se carga solo cuando este servidor elige ese front.
 * Los cambios de front siguientes van aquí. El tema actual no se toca.
 * De momento: fichas de la portada, su centrado con Próximos,
 * la cabecera en esa misma caja, un banner activo más bajo,
 * el buscador sobre el verde si no hay banner, y el pie.
 */

/* Ancho de la portada: la ventana, con margen lateral.
   El buscador, sin banner, vive en la cabecera: estas reglas van por el
   título de la portada, no por #public-search-q, para no soltar las fichas
   ni ensanchar el logo hasta el borde. */
body.eco-front-2 .container:has(h1.next-events) {
  width: calc(100% - 4.5rem);
  max-width: none;
}

/* Un 20 % más pequeñas que la ficha de tres columnas del contenedor de 1170 px
   (390 px × 0,8 = 312 px). En esa portada ancha caben unas cinco por fila.
   Cinco fichas son 1560 px: esa fila se centra, y el buscador y Próximos
   eventos usan el mismo ancho para igualar el margen izquierdo y derecho. */
body.eco-front-2 .container:has(h1.next-events) .list-events li {
  width: 20%;
  max-width: 312px;
}

body.eco-front-2 .container:has(h1.next-events) > .row,
body.eco-front-2 .container:has(h1.next-events) > .list-events {
  width: min(100%, 1560px);
  max-width: 1560px;
  margin-left: auto;
  margin-right: auto;
}

/* Banner activo más bajo. El cartel de dentro, un poco más pequeño.
   No afecta a la búsqueda (la cabecera corta no lleva este carrusel).
   El verde de detrás del logo sigue anclado arriba. */
body.eco-front-2 .header-eco {
  background-position: center top;
}

body.eco-front-2 .header-eco.header-eco-compact > .header-eco-bg {
  background-position: center top;
}

@media (min-width: 769px) {
  /* El logo sigue en la caja de 1560. El bloque del banner recupera el
     ancho del contenedor anterior y se centra en la franja verde. */
  body.eco-front-2 .header-eco:not(.header-eco-compact) .slider-eco {
    float: none;
    width: min(1170px, 100%);
    max-width: 1170px;
    margin-top: 12px;
    margin-bottom: 8px;
    margin-left: auto;
    margin-right: auto;
  }

  body.eco-front-2 .header-eco:not(.header-eco-compact) .flexslider {
    margin-bottom: 40px;
  }

  /* Los puntos quedan en el margen inferior, centrados, con verde por debajo. */
  body.eco-front-2 .header-eco:not(.header-eco-compact) .flex-control-nav {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -24px;
    width: 100%;
    margin: 0;
    text-align: center;
  }

  body.eco-front-2 .header-eco:not(.header-eco-compact) .slider-photo {
    width: 100%;
    max-width: 220px;
    height: auto;
    aspect-ratio: 5 / 7;
    object-fit: contain;
  }

  /* El texto arranca a la altura del cartel de 220 px, a su derecha. */
  body.eco-front-2 .header-eco:not(.header-eco-compact) .slider-info {
    top: 0;
    bottom: auto;
    left: 244px;
    margin-left: 0;
  }

  body.eco-front-2 .header-eco:not(.header-eco-compact) .slider-info h2 {
    margin: 2px 0;
    font-size: 32px;
    line-height: 36px;
  }

  body.eco-front-2 .header-eco:not(.header-eco-compact) .slider-info h3 {
    margin: 2px 0;
    font-size: 22px;
    line-height: 26px;
  }

  body.eco-front-2 .header-eco:not(.header-eco-compact) .slider-info h4,
  body.eco-front-2 .header-eco:not(.header-eco-compact) .slider-info p {
    margin: 2px 0;
    font-size: 15px;
    line-height: 18px;
  }

  /* Etiqueta, precio y botón van en flujo. El 80 px con line-height 50 tapaba la palabra. */
  body.eco-front-2 .header-eco:not(.header-eco-compact) .slider-info .price-phase,
  body.eco-front-2 .header-eco:not(.header-eco-compact) .slider-info .price,
  body.eco-front-2 .header-eco:not(.header-eco-compact) .slider-info > .btn-eco,
  body.eco-front-2 .header-eco:not(.header-eco-compact) .slider-info > a.btn-eco {
    position: static;
    float: none;
  }

  body.eco-front-2 .header-eco:not(.header-eco-compact) .slider-info .price {
    display: block;
    width: auto;
    margin: 6px 0 0;
    font-size: 56px !important;
    line-height: 1;
  }

  body.eco-front-2 .header-eco:not(.header-eco-compact) .slider-info > .btn-eco,
  body.eco-front-2 .header-eco:not(.header-eco-compact) .slider-info > a.btn-eco {
    display: inline-block;
    margin-top: 10px;
    vertical-align: top;
  }
}

/* Logo a la izquierda de los carteles; idioma y Panel a la derecha.
   La caja es la misma fila de 1560 px, con el hueco de 10 px de cada ficha. */
body.eco-front-2 .header-eco > .container {
  width: min(calc(100% - 4.5rem - 30px), 1560px);
  max-width: 1560px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 10px;
  padding-right: 10px;
}

body.eco-front-2 .container:has(h1.next-events) > .row > .col-md-5 {
  padding-left: 10px;
}

/* El buscador ya está dentro de la franja (la vista lo mueve si no hay banner).
   Se centra en esa misma caja. El fondo sigue anclado arriba y más alto que
   la franja, para que detrás del logo quede el verde claro y no las manos. */
body.eco-front-2 .header-eco .navbar-right {
  margin-right: 0;
}

body.eco-front-2 .header-eco form.search-event {
  clear: both;
  float: none;
  width: min(720px, 100%);
  margin: 6px auto 18px;
}

body.eco-front-2 .header-eco:not(:has(img.slider-photo)) {
  background-position: center top;
  background-size: max(100%, 1200px) auto;
}

/* El verde alto, con el buscador centrado, solo en la portada sin cartel.
   En compra, ficha y el resto la franja queda justa: el mismo aire arriba
   y abajo del logo, sin doblar la altura. */
body.eco-front-2 .header-eco:not(:has(img.slider-photo)):has(form.search-event) {
  min-height: 160px;
}

body.eco-front-2 .header-eco:not(:has(img.slider-photo)):not(:has(form.search-event)) {
  min-height: 0;
  padding-bottom: 0;
}

/* Franja corta: 14 px de verde sobre el logo de 40 px y otros 14 debajo.
   La fila mide 68 px. Idioma y «¿Organizas un evento?» van centrados en esa fila. */
@media (min-width: 769px) {
  body.eco-front-2 .header-eco:not(:has(img.slider-photo)) .eco-public-nav {
    display: flex;
    align-items: center;
    min-height: 0;
    margin-bottom: 0;
    padding-top: 14px;
    padding-bottom: 14px;
  }

  body.eco-front-2 .header-eco:not(:has(img.slider-photo)) .navbar-header,
  body.eco-front-2 .header-eco:not(:has(img.slider-photo)) .navbar-collapse,
  body.eco-front-2 .header-eco:not(:has(img.slider-photo)) .navbar-nav,
  body.eco-front-2 .header-eco:not(:has(img.slider-photo)) .navbar-nav > li {
    float: none;
  }

  body.eco-front-2 .header-eco:not(:has(img.slider-photo)) .navbar-collapse {
    display: flex !important;
    flex: 1 1 auto;
    align-items: center;
    justify-content: flex-end;
    height: auto !important;
    padding: 0;
    border: 0;
    box-shadow: none;
  }

  body.eco-front-2 .header-eco:not(:has(img.slider-photo)) .navbar-nav {
    display: flex;
    align-items: center;
    margin: 0;
  }

  body.eco-front-2 .header-eco:not(:has(img.slider-photo)) .navbar-brand {
    height: auto;
    padding: 0 !important;
  }

  body.eco-front-2 .header-eco:not(:has(img.slider-photo)) .logo-eco {
    display: block;
    height: 40px;
    margin: 0;
  }

  body.eco-front-2 .header-eco:not(:has(img.slider-photo)) .navbar-nav > li > a,
  body.eco-front-2 .header-eco:not(:has(img.slider-photo)) .navbar-right .dropdown {
    padding-top: 0 !important;
    padding-bottom: 0 !important;
  }
}

body.eco-front-2 .header-eco:not(:has(img.slider-photo)) .navbar {
  margin-bottom: 0;
}

body.eco-front-2 .header-eco:not(:has(img.slider-photo)) > .header-eco-bg {
  background-position: center top;
  background-size: max(100%, 1200px) auto;
}

body.eco-front-2 .header-eco:not(:has(img.slider-photo)) .slider-eco {
  display: none;
}

/* Pie: Info en dos columnas, iconos más separados y dirección con horario
   en una línea, justo encima de la franja del Copyright. */
body.eco-front-2 .eco-front-footer > .container {
  width: min(calc(100% - 4.5rem), 1560px);
  max-width: 1560px;
}

body.eco-front-2 .eco-front-footer .eco-front-info {
  display: flex;
  justify-content: flex-start;
  gap: 28px;
}

body.eco-front-2 .eco-front-footer .eco-front-info ul {
  flex: 0 0 auto;
}

body.eco-front-2 .eco-front-footer .eco-front-social a {
  margin-right: 36px;
}

body.eco-front-2 .eco-front-footer .eco-front-social a:last-child {
  margin-right: 0;
}

body.eco-front-2 .eco-front-footer .eco-front-address {
  clear: both;
  text-align: center;
  margin: 12px 0 0;
  font-size: 13px;
  white-space: nowrap;
}

body.eco-front-2 .eco-front-footer .eco-front-hours {
  margin-left: 28px;
}

/* El velo de la ficha sigue enseñando «Más información».
   El cartel entero (imagen y zona que aparece al pasar) usa ese mismo destino.
   Comprar, el calendario y el lugar de debajo de la foto no entran en este enlace. */
body.eco-front-2 .list-events .previous-container:hover .previous {
  opacity: 1;
}

body.eco-front-2 .list-events .eco-poster-hit {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 3;
  cursor: pointer;
}

body.eco-front-2 .container:has(h1.next-events) .list-events .thumbnail {
  border-radius: 12px;
  overflow: hidden;
}

/* La preventa ocupa el sitio de «Desde» y no alarga la ficha. */
body.eco-front-2 .list-events .event-price {
  white-space: nowrap;
}

@media (min-width: 993px) {
  body.eco-front-2 .list-events .event-price {
    height: 30px;
    line-height: 30px;
    overflow: hidden;
  }

  body.eco-front-2 .list-events .event-price .event-price-phase {
    display: inline-block;
    max-width: calc(100% - 100px);
    margin: 0;
    overflow: hidden;
    line-height: 30px;
    text-overflow: ellipsis;
    vertical-align: middle;
    white-space: nowrap;
  }
}

body.eco-front-2 .container:has(h1.next-events) .list-events .event-photo,
body.eco-front-2 .container:has(h1.next-events) .list-events .previous {
  border-radius: 12px 12px 0 0;
}

@media (max-width: 1200px) {
  body.eco-front-2 .container:has(h1.next-events) .list-events li {
    width: 25%;
    max-width: none;
  }
}

@media (max-width: 992px) {
  body.eco-front-2 .container:has(h1.next-events) .list-events li {
    width: 33.333%;
    max-width: none;
  }
}

@media (max-width: 767px) {
  body.eco-front-2 .list-events .eco-poster-hit {
    display: none;
  }

  body.eco-front-2 .list-events .previous-container:hover .previous.visible-xs {
    opacity: 0;
    pointer-events: none;
  }

  body.eco-front-2 .list-events .previous-container.is-open .previous.visible-xs,
  body.eco-front-2 .list-events .previous-container.is-open:hover .previous.visible-xs {
    opacity: 1;
    pointer-events: auto;
  }
}

@media (max-width: 768px) {
  body.eco-front-2 .container:has(h1.next-events) .list-events li {
    width: 50%;
    max-width: none;
  }

  body.eco-front-2 .eco-front-footer .eco-front-address {
    white-space: normal;
    text-align: left;
  }

  body.eco-front-2 .eco-front-footer .eco-front-hours {
    display: block;
    margin-left: 0;
    margin-top: 4px;
  }
}

@media (max-width: 475px) {
  body.eco-front-2 .header-eco > .container {
    width: min(calc(100% - 1.5rem - 30px), 1560px);
  }

  body.eco-front-2 .container:has(h1.next-events) {
    width: calc(100% - 1.5rem);
  }

  body.eco-front-2 .eco-front-footer .eco-front-info {
    display: block;
  }

  body.eco-front-2 .container:has(h1.next-events) .list-events li {
    width: 100%;
    max-width: none;
  }
}
