.nuestra-historia-hero {
    background-repeat: no-repeat;
    background-position: center center;
    background-size: cover;
    color: #ffffff;
    text-align: center;
    padding: 0;
    height: 40vh;
    min-height: 400px;
    display: flex;                  /* make hero a flexbox */
    justify-content: center;
    align-items: center;            /* vertically center */
}

.nuestra-historia-hero .container {
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.25);   /* dark overlay */
    display: flex;
    flex-direction: column;         /* stack title/text by default */
    justify-content: center;
    align-items: center;
    text-align: center;
    margin: 0 auto;
    max-width: 100vw;
}

/* Hero Title */
.nuestra-historia-hero .container .title-container {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    text-align: center;
    width: 50%;
    height: 100%;
    padding-left: 10%;

}


.nuestra-historia-hero .title-container h1 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: clamp(2rem, 6vw + 1rem, 4rem);
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 20px;
  letter-spacing: -1%;
}


.nuestra-historia-hero .title-container p{
  font-family: 'Lora';
  font-size: clamp(1rem, 2vw + 0.7rem, 1.3rem);
  font-weight: 500;
  line-height: 1.5;
  margin: 0;
}

/* Hero Text */
.nuestra-historia-hero .text-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}


.nuestra-historia-hero .text-container p {
  width: 70%;
  text-align: left;
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-weight: 500;
  font-size: clamp(1rem, 2vw + 0.7rem, 1.2rem);
  line-height: 1.63;
  letter-spacing: -1%;
}
@media (max-width: 600px) {
  .nuestra-historia-hero .container .title-container,
  .nuestra-historia-hero .container .text-container {
    width: 95%;
    height: auto;
    padding-left: 0;
  }
  .nuestra-historia-hero .title-container h1 {
    font-size: 3rem;
  }
  .nuestra-historia-hero .title-container p {
    font-size: 0.98rem;
  }
  .nuestra-historia-hero .text-container p {
    width: 100%;
    font-size: 0.98rem;
  }
}

/* Content sections */
.nuestra-historia-content,
.nuestra-historia-values {
    padding: 60px 20px;
    text-align: center;
}

.nuestra-historia-values ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.nuestra-historia-values li {
    font-size: 1.2em;
    margin: 10px 0;
}

/*--------------------------------------------------------------
# Founder Legacy Section
--------------------------------------------------------------*/

.founder-legacy {
  padding: 80px;
  background-color: #fff;
  color: #222;
}

.founder-legacy .container {
  display: flex;
  flex-direction: column;
  flex-wrap: wrap;
  gap: 40px;
  max-width: 1200px;
  margin: 0 auto;
  align-items: center;
}

.founder-legacy .container .left-content,
.founder-legacy .container .right-content {
  width: 50%;
}

.founder-legacy .text-content {
  flex: 1;
  text-align: left;
}

.founder-legacy .text-content h3 {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2.5rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 20px;
}

.founder-legacy .text-content p {
  font-size: 1.2rem;
  font-family: 'Lora', serif;
  font-weight: 400;
  line-height: 1.6;
  margin-bottom: 15px;
  color: #333;
}

.founder-legacy .values {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 30px;
}

.founder-legacy .value-item h3 {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 8px;
}

.founder-legacy .image-content{
  display: flex;
  justify-content: center;
  align-items: center;
}

.founder-legacy .image-content img {
  margin-top: 10%;
  width: 100%;
  max-width: 620px;
  border-radius: 8px;
  box-shadow: 0 4px 15px rgba(0,0,0,0.15);
}

/* Desktop */
@media (min-width: 992px) {
  .founder-legacy .container {
    flex-direction: row;
    align-items: flex-start;
  }

  .founder-legacy .values {
    flex-direction: row;
    gap: 40px;
  }

}

@media screen and (max-width: 767px) {
  .founder-legacy .text-content h3 {
    font-size: 2rem;
  }

  .founder-legacy .text-content p {
    font-size: 1rem;
  }
}

/*--------------------------------------------------------------
# Niveles Section
--------------------------------------------------------------*/

.niveles-section {
    position: relative;
    background-color: #F4F4F4; /* Ajusta el color al del diseño */
    color: #333;
    overflow: hidden; /* Asegura que las decoraciones no desborden */
}

.niveles-section h4 {
    font-family: Lora;
    font-size: clamp(1rem, 2vw + 0.5rem, 1.3rem);
    font-style: normal;
    font-weight: 600;
    line-height: 150%;
}

.niveles-section .container{
    padding: 50px 0;
    position: relative;
    z-index: 2; /* Asegura que el contenido esté encima de las decoraciones */
}

.niveles-section .section-subtitle {
    margin-bottom: 40px;
}

.niveles-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 5px;
    z-index: 1;
    padding: 0 20px;
}

.nivel-card {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
}

.nivel-card img {
    width: 100%;
    display: block;
    transition: transform 0.3s ease;
}

.nivel-card:hover img {
    transform: scale(1.1);
}

.nivel-card .nivel-card-title {
    position: absolute;
    bottom: 20px;
    left: 20px;
    color: #fff;
    font-size: 1.5em;
    font-weight: bold;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.7);
}

.custom-card{
    height: 798px !important;
}

.niveles-section .niveles-decorations{
    position: absolute;
    top: 0px;
    left: 0;
    width: 100%;
    pointer-events: none;
    z-index: -1; 
}

.niveles-section .niveles-decorations img{
    width: 50%;
    min-width: 800px;
    height: auto;
    object-fit: contain;
    display: block;
}

/* Responsive improvements */
@media screen and (max-width:960px) {
    .niveles-section .niveles-grid {
        grid-template-columns: 1fr 1fr;
        gap: 20px;
    }

    .niveles-section .custom-card{
        height: 450px !important;
    }

    .founder-legacy .container .left-content,
    .founder-legacy .container .right-content {
      width:100%;
    }
    
}

/* Responsive improvements */
@media screen and (max-width: 768px) {
    .niveles-section .niveles-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .niveles-section .custom-card{
        height: 450px !important;
    }

   
    
}

/* Responsive improvements */
@media (min-width: 768px) {
    .nuestra-historia-hero .container {
        flex-direction: row;         /* side by side on bigger screens */
        text-align: left;
        justify-content: space-around;
    }
    .nuestra-historia-hero .title-container,
    .nuestra-historia-hero .text-container {
        width:100%;
    }
    
}

@media screen and (max-width: 767px) {
    .nuestra-historia-hero .title-container,
    .nuestra-historia-hero .text-container {
        width: 80%;
    }

    .founder-legacy {
      padding: 10px;
    }

    .founder-legacy .container .left-content,
    .founder-legacy .container .right-content {
      width: 100%;
    }

    .niveles-grid {
    display: grid;
    grid-template-columns:1fr;
    gap: 5px;
    }
    .nivel-card .nivel-card-title {
        font-size: 1.2em;
    }

    .niveles-section .decoration{
        top: 220px;
        right: 0px;
    }

    .niveles-section .niveles-decorations img{
        opacity: 0.5;
        width: 300px;
        min-width: 250px;
    }
    

}

/*--------------------------------------------------------------
# Mision Section
--------------------------------------------------------------*/

.nuestra-mision-section{
  background-color: #3A846C;
  color: #fff;
  display: flex;
  flex-direction: column;
}

.nuestra-mision-section .content-container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-around;
  align-items: center;
  gap: 0.5rem;
}

.nuestra-mision-section .mision-container {
  width: 45%;
  max-width: 880px;
  min-width: 450px;
  height: 320px;
  padding: 1.5rem;
  text-align: left;
  background-color: #ffffff30;
  border-radius: 8px;
}




.nuestra-mision-section .mision-container h3 {
  font-family: 'Plus Jakarta Sans';
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: 15px;
}

.nuestra-mision-section .mision-container p {
  font-family: 'Lora';
  font-size: 1.1rem;
  font-weight: 400;
  line-height: 1.6;
  text-align: justify;
  color: #f0f0f0;
}

@media screen and (max-width: 1100px) {
  .nuestra-mision-section .mision-container {
    width: fit-content;
    height: auto;
  }
  
}

@media screen and (max-width: 768px) {
  .nuestra-mision-section .mision-container {
    width: 90%;
    height: auto;
  }
  
}

/*--------------------------------------------------------------
# Nuestra Institucion Section
--------------------------------------------------------------*/

.nuestra-institucion-section{
    padding: 80px 20px;
    background-color: #F7BC3A;
    color: #ffffff;
    text-align: center;
}

.nuestra-institucion-section h3{
    font-family: 'Plus Jakarta Sans';
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.nuestra-institucion-section .list-container {
    max-width: 1200px;
    padding: 2rem;
    margin: 0 auto;
    text-align: left;
    background-color: #ffffff27;
    border-radius: 1rem;
}

.nuestra-institucion-section .list-container li {
    font-size: 1.2rem;
    font-family: 'Lora';;
    margin: 10px 0;
    line-height: 1.5;
  }

/*--------------------------------------------------------------
# TimeLine Section
--------------------------------------------------------------*/

.nuestra-historia-timeline {
    padding: 80px 20px;
    background-color: #1F5C81;
    color: #ffffff;
}

.nuestra-historia-timeline .timeline-header {
    text-align: center;
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.timeline-header h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 700;
    line-height: 1.2;
}

.timeline-header h4 {
    font-family: 'Plus Jakarta Sans', serif;
    font-size: 1.5rem;
    font-weight: 400;
    line-height: 1.6;
    margin-top: 10px;
    margin-bottom: 16px;
}

.timeline-header h5 {
    font-family: 'Lora', serif;
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.6;
    margin-top: 10px;
    max-width: 768px;
}


@media screen and (max-width: 767px) {
  .nuestra-historia-timeline .container {
    padding: 0px;
  }
  
}
/*--------------------------------------------------------------
# Video Section
--------------------------------------------------------------*/

.nuestra-historia-video{
    padding: 80px 20px;
    background-color: #3A846C;
    color: #ffffff;
    text-align: center;
}

.nuestra-historia-video {
  display: flex;
  flex-direction: column;
  align-items: center;    /* center vertically */
  justify-content: center; /* center horizontally */
  gap: 40px;
}

.nuestra-historia-video-header{
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.nuestra-historia-video-header h2 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-size: 2.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 20px;
}

.nuestra-historia-video-header p {
    font-family: 'Lora', serif;
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1.6;
    max-width: 600px;
    margin: 0 auto 20px auto;
}

.nuestra-historia-video-header .btn-primary {
  background-color: #1F5C81;
  color: #fff;
  border: none;
  font-weight: 400;
}

.nuestra-historia-video .video-wrapper {
  position: relative; 
  width: 80vw;
  max-width: 1200px;        /* limit width */      /* optional max for large screens */
  aspect-ratio: 16 / 9;    /* modern replacement for padding hack */
  overflow: hidden;
  background-color: #000;  /* fallback background */
  border-radius: 5px;
  margin:50px auto;
  
}

.nuestra-historia-video .video-wrapper video {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover; /* ensures proper fill */
  border-radius: 5px;
}

@media screen and (max-width: 767px) {
  .nuestra-historia-video .video-wrapper {
    width: 85vw;
  }
}