/* Projects */ 


.avada-page-titlebar-wrapper {
  display: none;
}

section.title-section-project{
    position:relative;
}
main{
 padding: 0!important;
}

h1.educ-project__title{
    position:absolute;
        top: 71%;
}

.educ-project {
    font-family: inherit;
    color: #1b1b1b;
}

.educ-project__container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* Hero */
.educ-project__hero {
    background: #fff8d6;
    padding: 4rem 0 3rem;
    text-align: center;
}
.educ-project__hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.educ-project__hero-image img {
    max-width: 200px;
    border-radius: 9999px;
    display: block;
}
.educ-project__title {
    font-size: clamp(2rem, 3vw, 2.4rem);
    font-weight: 700;
    margin: 0;
    text-transform: uppercase;
}
.educ-project__subtitle {
    font-size: 1.1rem;
    color: #015C3B;
    font-weight: bold;
}

/* Sections */
.educ-project__section {
    padding: 2rem 0;
}
.educ-project__section--description {
    background: #fff;
}
.educ-project__section--territories {
    background: #f6f8fa;
}
.educ-project__section--resources {
    background: #fff;
}
.educ-project__section--logos {
    background: #fff;
}

/* Section headers */
.educ-project__section-header {
    margin-bottom: 2rem;
}
.educ-project__section-header--center {
    text-align: center;
}
.educ-project__eyebrow {
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .12em;
    color: #999;
    margin: 0 0 .5rem;
}
.educ-project__section-title {
    margin: 0 0 .75rem;
    font-size: clamp(1.5rem, 2.4vw, 2rem);
}
.educ-project__section-intro {
    margin: 0;
    color: #555;
    margin-left: auto;
    margin-right: auto;
}

/* Description body */
.educ-project__content {
    display: grid;
    gap: 1.5rem;
}
.educ-project__content p {
    margin-top: 0;
}

/* Territories */
.educ-project__territories-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1.5rem;
    margin-top: 2rem;
    text-align: center;
}
/* ~3 per row; an incomplete last row stays centered, so its items sit
   interleaved between the columns above, matching the design. */
.educ-project__territories-grid > article {
    flex: 0 0 calc(33.333% - 1rem);
    max-width: calc(33.333% - 1rem);
    box-sizing: border-box;
}
@media (max-width: 768px) {
    .educ-project__territories-grid > article {
        flex-basis: calc(50% - .75rem);
        max-width: calc(50% - .75rem);
    }
}
@media (max-width: 480px) {
    .educ-project__territories-grid > article {
        flex-basis: 100%;
        max-width: 100%;
    }
}
.educ-project__territory-card {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 5px 15px rgba(0,0,0,.04);
}
.educ-project__territory-body p {
    margin: .25rem 0;
}

/* Carousel base (full width) */
.educ-project__carousel {
 width: 100%;
  margin-left: 0;
  transform: none;
  padding-bottom: 3rem;
}
.educ-project__carousel-header {
    padding-bottom: 1rem;
}
.educ-project__carousel-title {
    font-weight:bold;
    margin: 0;
    font-size: 1.2rem;
}

/* Track / cards */
.educ-project__carousel-track-wrapper {
    position: relative;
}
.educ-project__carousel-inner {
     display: flex;
     gap: 1.5rem;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
     padding: 0 0 1rem;
     scrollbar-width: none;
    /* Always start on the first card. With `center`, an overflowing flex track
       spills over both edges and the left overflow is unreachable by scrolling,
       so the first (and last) card stayed clipped. */
    justify-content: flex-start;
}
.educ-project__video-thumb {
  display: block;
  width: 100%;
  cursor:pointer;
}

.educ-project__video-thumb img {
  width: 100%;
  height: 180px;     
  object-fit: cover;
  display: block;
}

.educ-project__carousel-inner::-webkit-scrollbar{
      display: none;
}


.educ-project__carousel-inner::-webkit-scrollbar {
    height: 6px;
}
.educ-project__carousel-inner::-webkit-scrollbar-thumb {
    background: rgba(0,0,0,.18);
    border-radius: 999px;
}
.educ-project__card {
    flex: 0 0 350px;

}

.educ-project__card.educ-project__card--link{
      flex: 0 0 220px;
      position:relative;
      margin-bottom: 60px;
    gap: .35rem;
}

.page_educ-project__card-media{
    width: 320px;
    height: 377px;
        background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

article.educ-project__card--video .educ-project__arrow{
    color:black;
}
.educ-project__arrow {
    width: 16px;
    height: 16px;
    color:white;
}
.educ-project__card.educ-project__card--link img{
      width: 100%;
    height: auto;
    /* Show the whole image instead of cropping it (design). */
    object-fit: contain;
    display: block;
}

.title-box-link{
      display: flex;
   justify-content: space-between;
   width:100%;
       align-items: center;
}
.title-box{
   display: flex;
   justify-content: space-between;
}

.educ-project__card.educ-project__card--link .educ-project__card-body, .custom-body{
    position: absolute;
    bottom: -19px;
    padding-left: 20px;
    background-color: rgba(0, 0, 0, 0.4);
    width: 100%;
    backdrop-filter: blur(1px);
    -webkit-backdrop-filter: blur(1px);
}
.title-section-project{
    background-size: cover;
    background-position: center 58%;
}

/* Hero image: flush to the top of the header, full width, no padding/strips.
   line-height/font-size 0 kills the inline-image baseline gap (the grey strip). */
.title-section-project{
    margin: 0;
    padding: 0;
    line-height: 0;
    font-size: 0;
}
.title-section-project img{
    display: block;
    width: 100%;
    height: auto;
    margin: 0;
}
/* This single-project template sits inside one Avada .fusion-row; let it and its
   sections span full width (each section has its own inner container). */
.single-educ_proyecto #main{
    padding: 0 !important;
}
.single-educ_proyecto #main .fusion-row{
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}
/* Remove Avada's header drop-shadow on this template: it fell over the top edge
   of the hero image, showing as a grey strip between the menu and the image.
   Avada tags the header wrapper with its layout version (fusion-header-v1 ..
   fusion-header-v5) and that setting differs per environment, so match any
   version instead of hard-coding v1. */
.single-educ_proyecto .fusion-header-wrapper,
.single-educ_proyecto [class*="fusion-header-v"],
.single-educ_proyecto .fusion-header{
    box-shadow: none !important;
}

@media(max-width: 480px){
    .title-section-project{
        height: 269px;
        background-size: 227%;
        background-repeat: no-repeat;
        background-position: 25% 62%;
    }
    h1.educ-project__title {
        top: 53%;
    }
    .educ-project__section-intro {
        width: 100%;
    }
    .page_educ-project__card-media {
        width: 100%;
    }
    .educ-project__carousel-inner {
        display: block;
    }
    .educ-project__section-intro {
        width: 100%!important;
    }
}

.custom-body{
    bottom:0;
    padding:20px;
}

.educ-project__card.educ-project__card--link .educ-project__card-body h4, .custom-body h4{
    color:white;
}

.educ-project__card.educ-project__card--link .educ-project__card-body .educ-project__card-text {
        color: white;
    line-height: 0px;
}

/* Card titles need a real line-height: with line-height:0 a title that wraps
   onto a second line paints both lines at the same vertical position, so they
   overlap. Visible on narrow cards (e.g. 1280px-wide viewports). */
.custom-body h4 {
    color: white;
    line-height: 1.3;
}

.custom-body .educ-project__card-text{
    color:white;
}

.educ-project__card--link .educ-project__card-media{
    height:auto;
}
  

.educ-project {
  overflow-x: hidden;
}

.educ-project__card-media{
    height:183px;
}

.educ-project__card-media img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}
.educ-project__video-placeholder {
 background: none;
  padding: 0;
}
.educ-project__video-play-icon {
    font-size: 2.5rem;
    background: rgba(255,255,255,.9);
    border-radius: 999px;
    padding: .4rem 1rem;
    box-shadow: 0 4px 10px rgba(0,0,0,.15);
}
.educ-project__card-body {
    padding: 1.25rem 1.25rem 1.4rem 0;
    display: flex;
    flex-direction: column;
    gap: .75rem;
    margin-bottom: 20px;
}
.educ-project__card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    cursor:pointer;
}
.educ-project__card-subtitle {
    margin: 2px 0 0;
    font-size: .85rem;
    font-weight: 500;
    color: #015C3B;
    opacity: .85;
}
.educ-project__card-text {
    font-size: .9rem;
    color: #015C3B;
}

/* Video cards: title green, subtitle black (design). */
.educ-project__card--video .educ-project__card-title {
    color: #015C3B;
}
.educ-project__card--video .educ-project__card-subtitle {
    color: #1b1b1b;
    opacity: 1;
}

/* Classroom-resource cards: subtitle white over the image overlay (design). */
.educ-project__card--link .educ-project__card-subtitle {
    color: #ffffff;
    opacity: 1;
}
.educ-project__card-link {
    margin-top: auto;
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    color: #007b6c;
}
.educ-project__card-link:hover {
    text-decoration: underline;
}

/* Carousel nav */

.educ-project__carousel-nav--prev {
    left: 0;
    bottom: 0;
}
.educ-project__carousel-nav--next {
    bottom: 0;
    left: 38px;
}

/* Logos */
.educ-project__section--logos {
    text-align: center;
}
.educ-project__logos-label {
    margin: 0 0 1.5rem;
    font-size: 1rem;
    letter-spacing: .15em;
    color: black;
}
.educ-project__logos-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    align-items: center;
}
.educ-project__logo-item img {
    max-height: 110px;
    width: auto;
}

/* Flechas */ 

.educ-project__carousel-nav {
    position:absolute;
    width: 31px;
    height: 31px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #d1d5db;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08); /* sombra suave */
    transition: background .2s, border-color .2s, box-shadow .2s;
}

.educ-project__carousel-nav:hover {
    background: #f9fafb;
    border-color: #9ca3af;
    box-shadow: 0 2px 12px rgba(0,0,0,0.12);
}

.educ-project__carousel-nav svg {
    color: #4b5563; /* gris neutro */
}


/* Responsive */
@media (min-width: 768px) {
    .educ-project__hero-inner {
        flex-direction: column;
    }
}

/* News */ 

.single.single-educ_noticia h1{
        margin-top: 45px!important;
    margin-bottom: 0px!important;
}

.educ-noticias-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}

.educ-noticia-card {
    padding:20px;
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
}

.educ-noticia-thumb img {
    width: 100%;
    height: auto;
    display: block;
}

.educ-noticia-cats {
    margin-bottom: 10px;
}

.educ-cat {
    display: inline-block;
    background: #f5b400;
    color:white;
    font-size: 12px;
    padding: 4px 8px;
    margin-right: 6px;
    border-radius: 4px;
}
.educ-cat:hover{
    color:white;
}

.educ-project__section-intro{
    width: 50%;
    margin-left: 0px;
}

.educ-project__section--news{
    background-color: #fff8d6;
}

.fila-intro{
    padding-top:0!important;
}

.educ-project__section-video{
    display: flex;
    justify-content: center;
}

.educ-project__section.educ-project__section--resources{
    padding-bottom:0;
}
.educ-noticias-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.educ-noticia-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    display: flex;
    flex-direction: column;
    height: 100%;
    transition: all .2s ease;
}

.educ-noticia-thumb {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    overflow: hidden;
}

.educ-noticia-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.educ-noticia-content {
    padding-top: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.educ-noticia-cats {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 10px;
}


.educ-noticia-title {
    font-size: 18px;
    line-height: 1.3;
    margin: 0 0 10px;
    font-weight: bold;
}

.educ-noticia-title a {
    color: inherit;
    text-decoration: none;
}
.educ-noticia-excerpt {
    font-size: 16px;
    line-height: 1.6;
    color: #555;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.educ-noticia-excerpt p{
    margin-top:0;
}
.educ-noticia-date {
    margin-top: auto;
    font-size: 13px;
    color: #888;
}
@media (max-width: 1024px) {
    .educ-noticias-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .educ-noticias-grid {
        grid-template-columns: 1fr;
    }
}

/* ---- Education landing: strategic lines grid ---- */
.educ-lineas-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-bottom: 40px;
}
.educ-linea-card {
    position: relative;
    overflow: hidden;
    /* Slightly-portrait cards (~0.9), matching the design proportions. */
    aspect-ratio: 9 / 10;
}
.educ-linea-card > a {
    display: block;
    height: 100%;
}
/* Fill the whole card (100%) with the image, anchored left so the illustration
   side shows and the wide banner's text side is cropped out. Slight overscan
   (height >100%) crops the thin white border baked into the source images. */
.educ-linea-card .page_educ-project__card-media {
    width: 100%;
    height: 100%;
    background-size: auto 112%;
    background-position: 1.5% center;
    background-repeat: no-repeat;
}
@media (max-width: 900px) {
    .educ-lineas-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .educ-lineas-grid { grid-template-columns: 1fr; }
}

/* ---- Education landing: latest resources ---- */
.educ-recursos-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.educ-recurso-card { position: relative; }
.educ-recurso-card a { text-decoration: none; color: inherit; display: block; }
.educ-recurso-card__media {
    position: relative;
    aspect-ratio: 16 / 9;
    background-size: cover;
    background-position: center;
    background-color: #e9efe6;
}
/* Video cards paint their YouTube thumbnail as an <img> (so a missing HD still can
   fall back) instead of a background, so it has to fill the 16:9 box the same way. */
.educ-recurso-card__thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.educ-recurso-card__badge {
    position: absolute;
    top: 10px;
    left: 10px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    border-radius: 3px;
    background: #ffffff;
    color: #1c6b3c;
}
.educ-recurso-card__badge--video { background: #1c6b3c; color: #ffffff; }
.educ-recurso-card__title { margin: 10px 0 0; font-size: 16px; }
.educ-recurso-card__subtitle { margin: 4px 0 0; font-size: 14px; font-weight: 500; color: #015C3B; opacity: .85; }
@media (max-width: 900px) {
    .educ-recursos-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) {
    .educ-recursos-grid { grid-template-columns: 1fr; }
}

/* ===== Education landing (body.educ-landing) ===== */
/* Point 1: hero shows the featured image full-bleed with a visible height. */
.educ-landing #main .fusion-row{
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
}
.educ-landing .title-section-project--landing{
    min-height: 340px;
}
/* Point 4: latest resources sit on the same yellow background as the news block. */
.educ-project__section--latest-resources{
    background: #fff8d6;
    /* Extra spacing above the yellow block, as padding so it stays yellow
       (margin would show the white page background through). */
    padding-top: 4rem;
}
/* Matching yellow spacing below the news block on the landing. */
.educ-landing .educ-project__section--news{
    padding-bottom: 4rem;
}
/* Single project: related-news block is a standalone yellow section, so it needs
   the extra yellow spacing both above and below. */
.single-educ_proyecto .educ-project__section--news{
    padding-top: 4rem;
    padding-bottom: 4rem;
}
/* Point 4: classroom-resource thumbnail sits lower so its top is not cropped. */
.educ-recurso-card--recurso-aula .educ-recurso-card__media{
    background-position: center 22%;
}
/* Point 5: news + latest-resources section titles in brand green. */
.educ-project__section-title--news,
.educ-landing .educ-project__section--latest-resources .educ-project__section-title,
.single-educ_proyecto .educ-project__section--news .educ-project__section-title{
    color: #1c6b3c;
}

/* Education video: custom poster with a play button (click-to-play facade). */
.educ-video-facade{
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    cursor: pointer;
    /* Transparent: the poster PNG has transparent margins; a solid colour here
       would show through as bands. The section background shows instead. */
    background: transparent;
}
.educ-video-facade__img{
    width: 100%;
    height: 100%;
    /* contain so the full artwork shows without cropping (it is an illustration,
       not a photo); transparent margins blend with the section background. */
    object-fit: contain;
    display: block;
}
.educ-video-facade__play{
    position: absolute;
    inset: 0;
    margin: auto;
    width: 68px;
    height: 48px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
    opacity: .9;
    transition: opacity .2s, transform .2s;
}
.educ-video-facade:hover .educ-video-facade__play{
    opacity: 1;
    transform: scale(1.06);
}
.educ-video-facade__iframe{
    width: 100%;
    height: 100%;
    border: 0;
    display: block;
}

