/* EFGAVIOTA · BlogArise */

/* 1. Imágenes destacadas de las entradas: formato 16:9 */

.bs-blog-post .bs-blog-thumb.lg.back-img {
  width: 100% !important;
  height: 0 !important;
  padding-top: 56.25% !important;
  min-height: 0 !important;

  background-size: contain !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-color: #fff !important;
}

/* 2. Accesos destacados con imágenes completas */

.promoss .container > .row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
}

.promoss .container > .row > div {
  width: auto;
  max-width: none;
  min-width: 0;
  padding: 0;
}

.promoss .container > .row > div:not(:has(a[href])) {
  display: none;
}

.promoss .bs-widget.promo {
  position: relative;
  width: auto;
  height: auto !important;
  min-height: 0;
  max-height: none;
  aspect-ratio: 16 / 9;
  box-sizing: content-box;
  padding: 0 0 44px;
  margin: 0;

  background-color: #fff !important;
  background-size: contain !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-origin: content-box;
  background-clip: content-box;

  border: 2px solid #111;
  border-bottom: 4px solid #fc0;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: none;
}

.promoss .promo .inner-content {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 0;
}

.promoss .promo .text,
.promoss .promo h5 {
  width: 100%;
  height: 100%;
  padding: 0;
  margin: 0;
  border: 0;
  background: transparent !important;
}

.promoss .promo .text::before,
.promoss .promo .text::after {
  display: none;
}

.promoss .promo h5 a {
  display: flex;
  align-items: flex-end;
  justify-content: center;
  width: 100%;
  height: 100%;
  box-sizing: border-box;
  padding: 6px 8px;

  color: #111 !important;
  background: transparent !important;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  overflow-wrap: anywhere;
}

.promoss .promo h5 a:hover {
  text-decoration: underline;
}

.promoss .promo h5 a:focus-visible {
  outline: 3px solid #0069b4;
  outline-offset: -5px;
}

/* 3. Portada: ancho adaptable y márgenes razonables */

body.home #custom-background-css:has(> .mainfeatured .homemain):has(> .promoss a[href]) {
  --ef-ancho: 1440px;
  --ef-margen: clamp(12px, 2.5vw, 40px);
  --ef-alto: clamp(320px, 30vw, 440px);

  display: grid;
  grid-template-columns:
    minmax(var(--ef-margen), 1fr)
    minmax(0, var(--ef-ancho))
    minmax(var(--ef-margen), 1fr);
}

body.home #custom-background-css > * {
  min-width: 0;
  grid-column: 1 / -1;
}

body.home #custom-background-css > .promoss,
body.home #custom-background-css > .mainfeatured {
  grid-column: 2;
  min-width: 0;
  margin: 20px 0 !important;
}

body.home .promoss > .container,
body.home .mainfeatured > .container {
  width: 100%;
  max-width: none;
  padding: 0;
}

body.home .mainfeatured > .container > .row {
  margin: 0;
}

body.home .mainfeatured .cc {
  padding: 0;
  min-width: 0;
}

/* 4. Carrusel: imagen completa y título debajo */

body.home .mainfeatured .homemain {
  width: 100%;
  min-width: 0;
  margin: 0;
}

body.home .mainfeatured .bs-slide {
  height: var(--ef-alto, 380px) !important;
  min-height: 0;
  box-sizing: border-box;
  padding: 0 0 82px;

  background-color: #fff;
  background-size: contain !important;
  background-position: center center !important;
  background-repeat: no-repeat !important;
  background-origin: content-box;
  background-clip: content-box;

  border: 2px solid #111;
  border-radius: 12px;
}

body.home .mainfeatured::before,
body.home .mainfeatured .bs-slide.overlay::before,
body.home .mainfeatured .bs-slide .inner::after {
  display: none !important;
}

body.home .mainfeatured .bs-slide .inner {
  position: absolute;
  inset: auto 0 0;
  width: 100%;
  height: 82px;
  box-sizing: border-box;
  padding: 5px 12px;
  margin: 0;

  background: #fff;
  border: 0;
  border-top: 2px solid #fc0;
  border-radius: 0;
  box-shadow: none;
  pointer-events: none;
}

body.home .mainfeatured .bs-slide .inner::before {
  content: "AHORA EN CLASE";
  color: #111;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 3px;
}

body.home .mainfeatured .bs-blog-category,
body.home .mainfeatured .bs-blog-meta {
  display: none;
}

body.home .mainfeatured .inner .title {
  margin: 0;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
  font-size: clamp(18px, 1.8vw, 24px);
  line-height: 1.15;
}

body.home .mainfeatured .inner .title a {
  color: #111 !important;
  pointer-events: auto;
}

body.home .mainfeatured .swiper-button-prev,
body.home .mainfeatured .swiper-button-next {
  top: calc((100% - 82px) / 2);
  width: 34px;
  height: 34px;
  margin-top: -17px;

  color: #111;
  background: #fc0;
  border: 1px solid #111;
  border-radius: 50%;
}

body.home .mainfeatured .swiper-button-prev::after,
body.home .mainfeatured .swiper-button-next::after {
  font-size: 16px;
}

/* 5. Ordenador y tablet ancha: dos columnas */

@media (min-width: 900px) {
  body.home #custom-background-css > .promoss {
    grid-row: 2;
    justify-self: start;
    width: calc(30% - 10px);
    height: var(--ef-alto);
  }

  body.home #custom-background-css > .mainfeatured {
    grid-row: 2;
    justify-self: end;
    width: calc(70% - 10px);
  }

  body.home .promoss > .container,
  body.home .promoss .container > .row {
    height: 100%;
  }

  body.home .promoss .container > .row {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: 1fr;
    gap: 10px;
  }

  body.home .promoss .bs-widget.promo {
    height: 100% !important;
    box-sizing: border-box;
    aspect-ratio: auto;
    padding: 0;

    background-origin: padding-box;
    background-clip: padding-box;
    background-size: 50% auto !important;
    background-position: 8px center !important;
  }

  body.home .promoss .promo h5 a {
    align-items: center;
    justify-content: flex-start;
    text-align: left;
    padding: 10px 10px 10px 54%;
    font-size: clamp(13px, 1.1vw, 16px);
  }
}

/* 6. Móvil y tablet estrecha: accesos y carrusel debajo */

@media (max-width: 899px) {
  body.home #custom-background-css > .promoss {
    grid-row: 2;
    width: 100%;
    margin: 12px 0 10px !important;
  }

  body.home #custom-background-css > .mainfeatured {
    grid-row: 3;
    width: 100%;
    margin: 0 0 18px !important;
  }

  body.home .promoss .container > .row {
    gap: 8px;
  }

  body.home .promoss .promo h5 a {
    font-size: clamp(10px, 2.6vw, 14px);
    padding: 5px;
  }

  body.home .mainfeatured .bs-slide {
    height: auto !important;
    aspect-ratio: 16 / 9;
    box-sizing: content-box;
    padding-bottom: 82px;
  }

  body.home .mainfeatured .inner .title {
    font-size: clamp(16px, 4vw, 23px);
  }
}
/* 7. Corregir el borde de las esquinas del carrusel */

body.home .mainfeatured .homemain {
  border-radius: 0 !important;
}

body.home .mainfeatured .bs-slide {
  border: 2px solid #111 !important;
  border-radius: 12px !important;
  overflow: hidden;
}