
:root{
    /*Video*/
    --maxVideo-width: 1000px;
    --right-video: 30px;
}


main{
    padding: 40px 30px;
    padding-top: 0px;
}

#course-container {
    display: flex;
    flex-direction: column;
    margin: 45px auto;
    width: 100%;
    gap: 20px; /* Espacio entre las secciones */
    justify-content: space-between;
}

.divisor{
    width: 20dvw;

}

#tittle-section{
    display: flex;
    flex-direction: column;
    justify-content: center; /* Centra el contenido horizontalmente */
    align-items: center;
    width: 100%; /* Asegura que el contenedor ocupe el ancho completo */
    color: var(--letras-claras);
    text-align: center; /* Centra el texto */
    margin: 0px;
    padding: 0px;
}

.tittle{
    margin-top: -40px;
}

#tittle-section h1 {
    font-family: "Merienda", cursive;;
    font-size: 2.5rem;
    margin-bottom: 0px;
    margin-top: 15px;
}
#tittle-section h3 {
    font-family: "Merienda", cursive;;
    margin: 5px;
    font-size: 1.3rem;
}



.preview{
    text-align: center;
    margin: 5px;
    margin-top: 15px;
    padding: 5px;
}




.preview a {
    position: relative;
    display: inline-block;
    font-size: 1.4rem;
    color: #fff;
    text-decoration: none;
    border: 1.5px solid #4f04ff;;
    background-image: url(/Assets/Img/backgrounds/Buttons/background1Comp159.webp);
    background-size: cover;
    background-position: center;
    padding: 10px 20px;
    margin: 10px;
    border-radius: 30px;
    overflow: hidden;
    z-index: 1;
}

.preview a::before {
    content: "";
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-image: url(/Assets/Img/backgrounds/Buttons/backgroundb3Comp157.webp);
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
    z-index: -1;
}

.preview a:hover::before {
    opacity: 1;
}

.preview a:hover {
    background-color: transparent;
    color: #fff;
}




#course-section {
    display: grid;
    grid-template-columns: 1fr 3fr; /* Dos columnas de igual tamaño */
    width: 100%;
    gap: 2dvw; /* Espacio entre Unidades y Video */
    margin-top: 20px;
}

#video-section {
    width: 100%; /* Asegúrate de que el ancho sea 100% del contenedor padre */
    display: flex;
    flex-direction: column;
    min-height: 500px;
    justify-content: flex-start;
}

.video-container {
    width: 100%;/* Ancho fijo de 1000px para el contenedor del video */
    margin: 0 auto; /* Centra el contenedor de video dentro de #video-section */
    position: relative;
    height: 0;
    padding-bottom: 56.25%; /* Relación de aspecto 16:9 */
    border-radius: 8px;
    overflow: hidden;
}

.video {
    position: absolute;
    top: 0;  /* Coloca el video a la mitad del contenedor */
    left: 50%;  /* Coloca el video a la mitad del contenedor */
    width: 60dvw;
    height: auto;  /* Mantén la relación de aspecto del video */
    border: 1px solid #ddd;
    border-radius: 20px;
    aspect-ratio: 16/9;
    
    /* Alinea el video exactamente en el centro */
    transform: translate(-50%, 0);  /* Desplaza el video hacia arriba y hacia la izquierda en un 50% de su tamaño */
}

#unidades-section{
    flex: 1 1 600px; /* Permite que la sección crezca y se encoja, con un tamaño mínimo de 300px */
    min-width: 200px; /* Tamaño mínimo horizontal */
    max-width: 600px; /* Tamaño máximo si deseas uno */
    width: 28dvw;
    border-radius: 8px;}

.unidad {
    background-color: #ffffffac;
    color: #333;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 10px;
    box-sizing: border-box;
    margin-bottom: 9px; /* Añadido para separar las unidades */
    display: flex;
    flex-direction: column;
}

.unidad .unidad-title {
    display: flex;
    align-items: center; /* Centrar verticalmente */
    /* cursor: default; */
    margin: 0;
    text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.9);
}

.video-tittle{
    margin-top: -60px;
}
.video-tittle h2{
    font-size: 1.7rem;
    margin: 10px;
    margin-bottom: 0px;
}

.unidad-title, .clase-title {
    margin: 0 0 10px;
    /*cursor: pointer*/;
    text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.9);
}

.unidad h2{
    font-family: "Merienda", cursive;;
    font-size: 1.4rem;
}

.clases h3 {
    font-family: "Merienda", cursive;;
    font-size: 1.2rem;
}


/*-- Wrap---*/
.unidad .clases {
    max-height: 0; /* Comienza con una altura máxima de 0 */
    overflow: hidden;
    transition: 1s ease-out; 
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.unidad.expandido .clases {
    max-height: 50dvh;
    transition: max-height 1s ease-in;
    margin: 5px 0;
}
  
/* Activar scroll solo cuando se necesita */
.unidad.expandido .clases.con-scroll {
    overflow-y: scroll;
    scrollbar-gutter: stable;
}

.unidad.expandido .clases::-webkit-scrollbar {
    width: 8px;
  }

  .unidad.expandido .clases::-webkit-scrollbar-track {
    background: transparent;
  }

  .unidad.expandido .clases::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.4);
    border-radius: 10px;
    border: 2px solid transparent;
    background-clip: content-box;
  }

  .unidad.expandido .clases::-webkit-scrollbar-thumb:hover {
    background-color: rgba(255, 255, 255, 0.6);
  }

/* .expandido {
    transition: all 1s ease;
  } */



/* ---- Caja con las Clases */

.clase {
    color: #333;
    height: auto;
    border-radius: 10px;
    padding: 0px 0px;
    box-sizing: border-box;
}

.clase-title {
    /* cursor: default; */
    padding: 4px;
    background-color: #ffffffac;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 0px;
}

.clase-bloqueada{
    opacity: 0.5;
}


#coments-section{
    flex: 1;
    display: none;
}



/*--------------Comentarios---------------------*/
.comentarios {
    background-color: #fff;
    color: #333;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    padding: 20px;
    box-sizing: border-box;
}

.comentarios {
    width: 100%;
    margin-top: 20px;
}

.comentario-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.comentario-form textarea {
    width: 100%;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ddd;
    resize: vertical;
}

.comentario-form button {
    align-self: flex-end;
    padding: 10px 20px;
    border: none;
    background-color: #007bff;
    color: white;
    border-radius: 5px;
    /*cursor: pointer*/;
}

.comentarios-list {
    margin-top: 20px;
    padding: 0;
    list-style: none;
}

.comentarios-list li {
    background-color: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    margin-bottom: 10px;
}

#buy-button{
    display: flex;
}

/* matebook x pro alfa */
@media (min-width:1450px) and (max-height:920px) {

    .preview a {
        font-size: 1.3rem;
    }
    #course-container {
        margin: 35px auto;
    }
    #course-section{
        margin-top: 11px;
    }
    .unidad h2 {
        font-size: 1.25rem;
    }
    .unidad{
        padding: 7px 10px;
        margin-bottom: 8px;
    }
    .clases h3{
        font-size: 1.1rem;
    }

    .video{
        width: 58dvw;
    }

}

@media (min-width:1900px) and (max-height:1100px) {
    .video {
        width: 52dvw;
    }
    #unidades-section {
        padding: 30px 70px;
    }
    .unidad{
        padding: 9px;
    }
}

@media (min-width:2000px) and (min-height:1100px){
    main{
        padding: 40px  80px;
    }

    #tittle-section h1 {
        font-size: 3.5rem;
    }#tittle-section h3 {font-size: 2rem;}

    .preview a{font-size: 1.8rem;}

    .video-tittle h2 {font-size: 2.3rem;}

    .unidad h2{
        font-size: 1.5rem;
    }
    .clases h3 {
        font-size: 1.3rem;
    }
}

/* Dell xps 2 */
@media (max-width:1600px) and (min-width: 1100px) and (max-height:800px){
    main{
        padding: 0px 60px;
    }
    #tittle-section h3{
        margin: 0px;
    }

    .preview a {
        font-size: 1.3rem;
    }

    .unidad{
        margin-bottom: 8px;
        padding: 5px 10px;
    }
    .unidad h2 {
        font-size: 1.2rem;
    }
    .clases h3{
        font-size: 1.05rem;
    }
    .clase-title {
        padding: 5px 10px;
    }
    .clase-title {
        padding: 2px 4px;
    }
    .unidad.expandido .clases {
        margin: 2px 0px;
        padding: 8px 0px;
    }
    .video {
        width: 52dvw;
    }
    #course-section {
        gap: 6dvw;
    }

    
}




/* Layout para pantallas pequeñas (phone) */
@media (max-width: 1350px) {
    #course-section {
        display: flex;
        flex-direction: column;
    }

    .video{
        width: 80dvw;
    }
    .video-container{
        padding-bottom: auto;
    }
    /* Con flexbox puedes controlar el orden de los elementos */
    #video-section {
        order: 1;
        min-height: auto;
        padding-bottom: 0px;
    }
    #unidades-section {
        order: 2;
        width: 70%;         /* O el ancho que prefieras para pantallas pequeñas */
        max-width: 600px;   /* Se mantiene el máximo */
        margin: 0 auto;     /* Centra el contenedor */
        padding-top: 0px;
        margin-top: -20px;
        flex: 1 1 200px;
    }
    /* .unidad{
        padding: 10px;
        margin-bottom: 10px;
    }
    .unidad h2{
        font-size: 1.1rem;
    }
    .clase-title{
        padding: 10px;
        margin-bottom: 10px;
    }
    .clases h3{
        font-size: 1.1rem;
    }
    .unidad.expandido .clases{
        gap: 5px;
    } */
}

@media(min-width:820px) and (max-width: 1350px){
    .video-container{
        padding-bottom: 52%;
    }

}

/* Ipad Pro */
@media (max-width:1100px) and (max-height: 1400px) and (min-width:900px) and (min-height:1200px){

    #tittle-section h1{
        font-size: 3.5rem;
    }
    #tittle-section h3{
        font-size: 2rem;
    }

    .preview a{
        font-size: 1.8rem; 
    }
    .video-tittle h2{
        font-size: 2.2rem;
    }

    .unidad h2{
        font-size: 1.6rem;
    }

    .clases h3{
        font-size: 1.4rem;
    }
    .unidad.expandido .clases {
        gap: 20px;
    }
}

/* Ipad Air */
@media (max-width:850px) and (max-height:1200px) and (min-width:600px) and (min-height:1000px){

    #tittle-section h1{
        font-size: 3rem;
    }
    #tittle-section h3{
        font-size: 1.5rem;
    }

    .preview a{
        font-size: 1.4rem; 
    }
    .video-tittle h2{
        font-size: 2rem;
    }

    .unidad h2{
        font-size: 1.4rem;
    }

    .clases h3{
        font-size: 1.3rem;
    }
    .unidad.expandido .clases {
        gap: 10px;
    }
}

/* Ipad mini */
@media (max-width:800px) and (max-height: 1100px) and (min-width:600px) and (min-height:950px){

    #tittle-section h1{
        font-size: 2.7rem;
    }
    #tittle-section h3{
        font-size: 1.4rem;
    }

    .preview a{
        font-size: 1.4rem; 
    }
    .video-tittle h2{
        font-size: 1.9rem;
    }

    .unidad h2{
        font-size: 1.3rem;
    }

    .clases h3{
        font-size: 1.2rem;
    }
    .unidad.expandido .clases {
        gap: 10px;
    }

    
}

/* Ipad Pro Horizontal */
@media (min-width:1300px) and (max-width:1400px) and (min-height: 1000px) and (max-height:1300px){
    #course-section {
        display: flex;
        flex-direction: column;
    }
    #tittle-section h1{
        font-size: 3rem;
    }
    #tittle-section h3{
        font-size: 1.7rem;
    }
    .preview a{
        font-size: 1.8rem;
    }
    .video{
        width: 80dvw;
    }
    .video-tittle h2{
        font-size: 2.2rem;
    }
    .video-container{
        padding-bottom: 50%;
    }
    /* Con flexbox puedes controlar el orden de los elementos */
    #video-section {
        order: 1;
        min-height: auto;
        padding-bottom: 0px;
    }
    #unidades-section {
        order: 2;
        width: 70%;         /* O el ancho que prefieras para pantallas pequeñas */
        max-width: 600px;   /* Se mantiene el máximo */
        margin: 0 auto;     /* Centra el contenedor */
        padding-top: 0px;
        margin-top: -20px;
        flex: 1 1 200px;
    }
    .unidad{
        padding: 10px;
        margin-bottom: 10px;
    }
    .unidad h2{
        font-size: 1.5rem;
    }
    .clase-title{
        padding: 10px;
        margin-bottom: 10px;
    }
    .clases h3{
        font-size: 1.4rem;
    }
    .unidad.expandido .clases{
        gap: 15px;
        margin-bottom: 20px;
    }
}

/* Ipad Air horizontal */
@media (max-width:1200px) and (max-height: 850px) and (min-width:600px){

    #tittle-section h1{
        font-size: 3rem;
    }
    #tittle-section h3{
        font-size: 1.7rem;
    }
    .preview a{
        font-size: 1.5rem;
    }


    .unidad h2{
        font-size: 1.3rem;
    }
    .clases h3{
        font-size: 1.1rem;
    }
}

/* Ipad mini Horizontal */
@media (max-width:1100px) and (max-height: 800px) and (min-width:600px){

    #tittle-section h1{
        font-size: 2.9rem;
    }
    #tittle-section h3{
        font-size: 1.6rem;
    }
    .preview a{
        font-size: 1.4rem;
    }

    .unidad.expandido .clases{
        gap: 0px;
    }
    .unidad h2{
        font-size: 1.3rem;
    }
    .clases h3{
        font-size: 1.1rem;
    }
    .clase-title{
        padding: 5px;
    }
}

@media screen and (min-device-width: 320px) and (max-device-width: 1024px) and (-webkit-min-device-pixel-ratio: 2) and (orientation: portrait) {
    .header-content{
    background-image: none;
    background-attachment: scroll !important; 
    background-size: cover;
    overflow: auto;
    }
    #Header-container{
    background-image: none;
    background-attachment: scroll !important; 
    background-size: cover;
    overflow: auto;
    }

    #course-container{
    background-image: none;
    background-attachment: scroll !important; 
    background-size: cover;
    overflow: auto;  

    margin: 0px;
    padding: 45px auto;
    }

    #course-section{
    background-image: url(/Assets/Img/backgrounds/Movil/background20Comp178.jpg);
    background-attachment: scroll !important; 
    background-size: cover;
    overflow: auto;  

    padding-top: 0px;
    margin-top: 0px;
    }
    #tittle-section {
        padding: 60px 0px;
        padding-bottom: 20px;
    }
    .video-tittle{
        margin-top: 0px;
    }

}

/* Iphone 14 pro max */
@media (max-width: 500px){

    .divisor{
        width: 65dvw;
        padding-top: 2dvh;
    }

    main{
        padding: 0px;
    }
    .video{
        width: 90dvw;
    }
    #tittle-section h1{
        font-size: 2.2rem;
        margin-top: 5px;
    }
    #tittle-section h3{
        font-size: 1.2rem;
    }
    .video-tittle h2{
        font-size: 1.5rem;
    }

    #video-section{
        padding-bottom: 10px;
    }

    #unidades-section{
        width: 75%;
    }

    .unidad{
        padding: 8px;
        margin-bottom: 8px;
    }
    .unidad h2{
        font-size: 1rem;
    }
    .clase{
        height: auto;
    }
    .clase-title{
        padding: 5px;
        margin-bottom: 0px;
    }
    .clases h3{
        font-size: 0.9rem;
    }
    .unidad.expandido .clases{
        gap: 5px;
        max-height: 41dvh;
    }



    .preview a{
        font-size: 1.2rem;
        padding: 8px 15px;
    }
    
}

/* Ipgone XR */
@media (max-width: 415px) {

    .unidad h2{
        font-size: 0.9rem;
    }

    .clases h3{
        font-size: 0.8rem;
    }
}
/* Iphone 12 Pro */
@media (max-width: 390px) {

    .unidad h2{
        font-size: 0.85rem;
    }

    .clases h3{
        font-size: 0.7rem;
    }
}


/* Iphone SE */
@media (max-width: 375px) {
 
    #tittle-section h1{
        font-size: 1.9rem;
    }
    #tittle-section h3{
        font-size: 1.1rem;
    }
    .video-tittle h2{
        font-size: 1.3rem;
    }
    .preview a{
        font-size: 1.1rem;
    }


    .unidad{
        padding: 6px;
        margin-bottom: 6px;
    }
    .unidad h2{
        font-size: 0.8rem;
    }

    .clase-title{
        padding:       3px;
    }
    .clases h3{
        font-size: 0.7rem;
    }
}