/* CSS Responsive modificado para el orden correcto de los elementos */

/* Base Styles - Mantenemos los estilos originales */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:ital,wght@0,100..900;1,100..900&display=swap');

.titulo_curso {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 10vh;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    position: relative;
    margin-top: 80px;   
    margin-bottom: 30px;
}

.titulo_curso h2 {
    color: #ffffff;
    text-align: center;
    padding: 0 15px;
    font-size: 1.8rem;
}

.curso-info {
  background: #995df1;
  height: auto;
  min-height: auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  box-sizing: border-box;
  padding: 0 0 50px 0;
}

.cuadro1 {
    background-color: #100028;
    border: 1px solid #ccc;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1); 
    color: rgb(255, 255, 255);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.cuadro2 {
  background-color: #100028;
  border: 1px solid #ffffff;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
  margin: 0;
  width: 100%;
  max-width: none;
  position: relative; 
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
  font-weight: 5;
  box-sizing: border-box;
  margin-top: 15px;
  max-height: 1500px;
  overflow-y: auto;
}

.texto-con-margen {
    margin-left: 30px;
    line-height: 1.6;
    margin-top: 30px;
    margin-bottom: 30px;
}

.cuadro2 li {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.5;
    color: #ccc;
    margin-top: 8px;
}

.cuadro2 strong {
    color: #ffffff;
}

/* Contenedor principal del curso - Rediseñado para el nuevo orden */
.contenedor-curso {
  width: 100%;
  max-width: 1500px;
  display: flex;
  flex-direction: column;
  gap: 30px;
  padding: 15px;
  box-sizing: border-box;
  align-items: center;
}

.imgcurso {
  width: 100%;
  max-width: 550px;
  position: relative;
  top: 0;
  align-self: center;
  display: flex;
  flex-direction: column;
  margin: 0 auto;
  order: 1; /* La imagen va primero */
}

.imgcurso > div {
  width: 100%;
  display: flex;
  flex-direction: column;
}

.boton2 {
  order: 1; /* El botón de compra siempre va primero dentro de imgcurso */
  width: 100%;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 20px 0 0 0;
}

.descripcion {
  flex: 1;
  overflow-y: auto;
  width: 100%;
  max-width: 100%;
  height: auto;
  min-height: auto;
  display: flex;
  flex-direction: column;
  order: 2; /* La descripción va después de la imagen y botón */
}

.boton3 {
  order: 3; /* Los cursos más populares van al final */
  width: 100%;
}

.imgcurso img {
    width: 100%;
    border-radius: 8px;
    margin-bottom: 15px;
}

.descripcion ul {
    list-style-type: none;
    padding: 0;
    margin-bottom: 0px;
}

.descripcion li {
    margin-bottom: 10px;
}

/* Estilos para el botón y precio */
.boton2 h4.precio {
    color: #ffffff;
    font-size: 2.5rem;
    text-align: center;
    margin: 15px 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.btn {
    --border-color: linear-gradient(-45deg, #ffae00, #7e03aa, #00fffb);
    --border-width: 0.125em;
    --curve-size: 0.5em;
    --blur: 30px;
    --bg: #080312;
    --color: #ffffff;
    color: var(--color);
    cursor: pointer;
    /* use position: relative; so that BG is only for .btn */
    position: relative;
    isolation: isolate;
    display: inline-grid;
    place-content: center;
    padding: 0.5em 1.5em;
    font-size: 17px;
    border: 0;
    text-transform: uppercase;
    box-shadow: 10px 10px 20px rgba(0, 0, 0, 0.6);
    clip-path: polygon(
    /* Top-left */ 0% var(--curve-size),
    var(--curve-size) 0,
    /* top-right */ 100% 0,
    100% calc(100% - var(--curve-size)),
    /* bottom-right 1 */ calc(100% - var(--curve-size)) 100%,
    /* bottom-right 2 */ 0 100%
    );
    transition: color 250ms;
    }
    
    .btn::after,
    .btn::before {
    content: "";
    position: absolute;
    inset: 0;
    }
    
    .btn::before {
    background: var(--border-color);
    background-size: 300% 300%;
    animation: move-bg7234 5s ease infinite;
    z-index: -2;
    }
    
    @keyframes move-bg7234 {
    0% {
    background-position: 31% 0%;
    }
    
    50% {
    background-position: 70% 100%;
    }
    
    100% {
    background-position: 31% 0%;
    }
    }
    
    .btn::after {
    background: var(--bg);
    z-index: -1;
    clip-path: polygon(
    /* Top-left */ var(--border-width)
    calc(var(--curve-size) + var(--border-width) * 0.5),
    calc(var(--curve-size) + var(--border-width) * 0.5) var(--border-width),
    /* top-right */ calc(100% - var(--border-width)) var(--border-width),
    calc(100% - var(--border-width))
    calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5)),
    /* bottom-right 1 */
    calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5))
    calc(100% - var(--border-width)),
    /* bottom-right 2 */ var(--border-width) calc(100% - var(--border-width))
    );
    transition: clip-path 500ms;
    }
    
    .btn:where(:hover, :focus)::after {
    clip-path: polygon(
    /* Top-left */ calc(100% - var(--border-width))
    calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5)),
    calc(100% - var(--border-width)) var(--border-width),
    /* top-right */ calc(100% - var(--border-width)) var(--border-width),
    calc(100% - var(--border-width))
    calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5)),
    /* bottom-right 1 */
    calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5))
    calc(100% - var(--border-width)),
    /* bottom-right 2 */
    calc(100% - calc(var(--curve-size) + var(--border-width) * 0.5))
    calc(100% - var(--border-width))
    );
    transition: 200ms;
    }
    
    .btn:where(:hover, :focus) {
    color: #fff;
    }

/* Cursos más populares */
.boton3 {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    background-color: #12002a;
    border-radius: 8px;
    padding: 15px;
    box-sizing: border-box;
}

.boton3 h5 {
    color: #ffef00;
    font-size: 22px;
    margin-bottom: 15px;
    text-align: center;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: 600;
    background-color: #12002a;
    padding: 8px 15px;
    border-radius: 5px;
    display: inline-block;
    white-space: normal;
}

.cursos-vendidos {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
    max-width: 100%;
    padding: 15px;
    background-color: #12002a;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.3);
    margin: 0 auto;
    box-sizing: border-box;
}

.curso {
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: #1f0031;
    padding: 12px;
    border-radius: 8px;
    border: 1px solid #6b27c9;
    overflow: hidden;
    transition: transform 0.2s ease;
}

.curso img.mini-portada {
    width: 100%;
    max-width: 200px;
    height: auto;
    object-fit: cover;
    border-radius: 5px;
    margin-bottom: 10px;
}

.curso h5 {
    margin: 10px 0;
    font-size: 14px;
    color: #ffffff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    text-align: center;
    width: 100%;
}

/* Estilos para la sección de asesores */
.asesores-section {
    padding: 40px 15px;
    background-color: #995df1;
    text-align: center;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    width: 100%;
    box-sizing: border-box;
}

.asesores-section .container {
    max-width: 1200px;
    margin: 0 auto;
}

.asesores-title {
    font-size: 28px;
    margin-bottom: 10px;
    color: #f6ab40;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    font-weight: bold;
}

.asesores-subtitle {
    font-size: 16px;
    color: #ffffff;
    margin-bottom: 40px;
    margin-top: 20px;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.5;
    padding: 0 10px;
}

.asesores-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
    justify-content: center;
    align-items: center;
}

.asesor-item {
    background-color: #1f0031;
    border: 1px solid #6b27c9;
    border-radius: 10px;
    padding: 20px;
    width: 100%;
    max-width: 280px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.asesor-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
}

.asesor-whatsapp {
    text-decoration: none;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.asesor-img {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #25D366;
    transition: transform 0.2s ease;
}

.asesor-whatsapp:hover .asesor-img {
    transform: scale(1.05);
}

.asesor-whatsapp span {
    font-size: 16px;
    font-weight: 500;
    color: #f6ab40;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    text-align: center;
}

/* Media Queries para responsive */

/* Tablet (768px y superior) */
@media screen and (min-width: 768px) {
    .titulo_curso h2 {
        font-size: 2rem;
    }
    
    .contenedor-curso {
        padding: 20px;
    }
    
    .curso {
        flex-direction: row;
        align-items: center;
    }
    
    .curso img.mini-portada {
        width: 100px;
        height: 100px;
        margin-right: 15px;
        margin-bottom: 0;
    }
    
    .curso h5 {
        text-align: left;
    }
    
    .btn {
        width: auto;
    }
    
    .texto-con-margen {
        margin-left: 20px;
    }
    
    /* Asesores en tablet */
    .asesores-list {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .asesor-item {
        width: calc(50% - 20px);
        max-width: 250px;
        margin: 10px;
    }
    
    .asesores-title {
        font-size: 32px;
    }
    
    .asesores-subtitle {
        font-size: 18px;
    }
}

/* Desktop pequeño (992px y superior) */
@media screen and (min-width: 992px) {
    .contenedor-curso {
        display: grid;
        grid-template-columns: 55% 40%;
        grid-template-areas: 
            "descripcion imgcurso"
            "descripcion boton3";
        gap: 20px;
        justify-content: space-between;
    }
    
    .imgcurso {
        grid-area: imgcurso;
        width: 100%;
        max-width: 400px;
        position: sticky;
        top: 20px;
        order: 2;
        align-self: start;
    }
    
    .descripcion {
        grid-area: descripcion;
        width: 100%;
        order: 1;
    }
    
    .boton3 {
        grid-area: boton3;
        width: 100%;
        order: 3;
        margin-top: 0;
    }
    
    .titulo_curso h2 {
        font-size: 2.2rem;
    }
    
    /* Asesores en desktop pequeño */
    .asesores-list {
        flex-direction: row;
        justify-content: center;
        gap: 30px;
    }
    
    .asesor-item {
        width: calc(33.33% - 30px);
        max-width: 280px;
        margin: 0;
    }
}

/* Desktop grande (1200px y superior) */
@media screen and (min-width: 1200px) {
    .contenedor-curso {
        gap: 40px;
        grid-template-columns: 60% 35%;
    }
    
    .imgcurso {
        max-width: 550px;
    }
    
    .titulo_curso h2 {
        font-size: 2.5rem;
    }
    
    .cursos-vendidos {
        max-width: 100%;
    }
    
    .texto-con-margen {
        margin-left: 30px;
    }
    
    /* Asesores en desktop grande */
    .asesores-section {
        padding: 60px 20px;
    }
    
    .asesores-list {
        gap: 40px;
    }
    
    .asesor-item {
        max-width: 300px;
        padding: 25px;
    }
    
    .asesor-img {
        width: 100px;
        height: 100px;
    }
    
    .asesor-whatsapp span {
        font-size: 18px;
    }
}