/* Estilos para la página de cursos */

/* Hero section de cursos */
.courses-main {
    width: 100%;
    min-height: 100vh;
    background-color: #fdf8f2;
    padding-top: 111px;
    /* Altura del header */
}

.courses-hero {
    width: 100%;
    background-color: #fefaf6;
    padding: 96px 0 64px;
}

.courses-hero-content {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
    text-align: center;
}

.courses-title {
    color: #101828;
    font-family: "Fraunces";
    font-size: 72px;
    font-weight: 300;
    line-height: 82px;
    letter-spacing: -1.44px;
    margin-bottom: 24px;
}

.courses-intro-text {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 20px;
    align-items: center;
}

.courses-intro-text p {
    color: #667085;
    font-family: "Actor";
    font-size: 18px;
    line-height: 28px;
    margin: 0;
}

.skool-link {
    color: #6D584A;
    text-decoration: underline;
    word-break: break-all;
}

.skool-link:hover {
    color: #211f1f;
}

/* Grid de cursos */
.courses-grid-section {
    width: 100%;
    padding: 96px 0;
}

.courses-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 40px;
}

.courses-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 32px;
    width: 100%;
}

/* Carta de curso */
.course-card {
    background-color: #fff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    width: calc((100% - 64px) / 3);
}

.course-card:hover {
    transform: translateY(-8px);
    box-shadow: 0px 8px 24px rgba(0, 0, 0, 0.12);
}

.course-card-disabled {
    opacity: 0.6;
    cursor: not-allowed !important;
}

.course-card-disabled:hover {
    transform: none;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);
}

.course-card-image-container {
    position: relative;
    width: 100%;
    height: 240px;
    overflow: hidden;
    background-color: #f0f0f0;
    display: block;
}

.course-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
    display: block;
    opacity: 1;
    visibility: visible;
    background-color: #f0f0f0;
}

.course-card:hover .course-card-image {
    transform: scale(1.05);
}

.course-card-disabled:hover .course-card-image {
    transform: none;
}

.course-badge {
    position: absolute;
    top: 16px;
    right: 16px;
    background-color: #c4a484;
    color: #fff;
    padding: 8px 16px;
    border-radius: 200px;
    font-family: "Actor";
    font-size: 14px;
    font-weight: 600;
    z-index: 10;
}

.course-card-content {
    padding: 24px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.course-card-title {
    color: #101828;
    font-family: "Fraunces";
    font-size: 28px;
    font-weight: 300;
    line-height: 36px;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
}

.course-card-description {
    color: #667085;
    font-family: "Albert Sans";
    font-size: 16px;
    line-height: 24px;
    flex: 1;
    white-space: pre-line;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 16px;
}

.course-card-button {
    align-self: flex-start;
    color: #100d0b;
    font-family: "Actor";
    font-size: 16px;
    line-height: 24px;
    padding: 8px 20px;
    border-radius: 200px;
    border: 1px solid #6D584A;
    background: transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.course-card-button:hover {
    background-color: #6D584A;
    color: #fff;
}

/* Estilos para la página de detalle del módulo */
.module-detail-main {
    width: 100%;
    min-height: 100vh;
    background-color: #fdf8f2;
    padding-top: 111px;
    padding-bottom: 64px;
}

.module-detail-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #211f1f;
    font-family: "Actor";
    font-size: 18px;
    margin-bottom: 32px;
    text-decoration: none;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #6D584A;
}

.back-link i {
    font-size: 16px;
}

.module-header {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 48px;
    margin-bottom: 64px;
    align-items: start;
}

.module-image-container {
    width: 100%;
    height: 300px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0px 4px 12px rgba(0, 0, 0, 0.08);
    display: block;
    background-color: #f0f0f0;
}

.module-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    opacity: 1;
    visibility: visible;
    background-color: #f0f0f0;
}

.module-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.module-title {
    color: #101828;
    font-family: "Fraunces";
    font-size: 56px;
    font-weight: 300;
    line-height: 64px;
    letter-spacing: -1px;
    margin: 0;
}

.module-description {
    color: #667085;
    font-family: "Albert Sans";
    font-size: 20px;
    line-height: 30px;
    margin: 0;
}

.module-content {
    width: 100%;
}

.lessons-title {
    color: #101828;
    font-family: "Fraunces";
    font-size: 40px;
    font-weight: 300;
    line-height: 48px;
    margin-bottom: 32px;
    letter-spacing: -0.5px;
}

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

.lesson-card {
    background-color: #fff;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
    display: flex;
    gap: 20px;
    align-items: flex-start;
}

.lesson-card:hover {
    box-shadow: 0px 4px 16px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.lesson-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: #c4a484;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: "Fraunces";
    font-size: 24px;
    font-weight: 300;
    flex-shrink: 0;
}

.lesson-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.lesson-title {
    color: #101828;
    font-family: "Fraunces";
    font-size: 22px;
    font-weight: 300;
    line-height: 28px;
    margin: 0;
}

.lesson-link {
    color: #6D584A;
    font-family: "Actor";
    font-size: 16px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.lesson-link:hover {
    color: #211f1f;
}

.lesson-link i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.lesson-link:hover i {
    transform: translateX(4px);
}

.no-lessons {
    grid-column: 1 / -1;
    text-align: center;
    padding: 64px 24px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.06);
}

.no-lessons p {
    color: #667085;
    font-family: "Albert Sans";
    font-size: 18px;
    line-height: 28px;
    margin: 0;
}

.error-message {
    text-align: center;
    padding: 64px 24px;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0px 2px 8px rgba(0, 0, 0, 0.06);
}

.error-message h2 {
    color: #101828;
    font-family: "Fraunces";
    font-size: 32px;
    font-weight: 300;
    margin-bottom: 16px;
}

.error-message p {
    color: #667085;
    font-family: "Albert Sans";
    font-size: 18px;
    line-height: 28px;
    margin-bottom: 24px;
}

/* Responsive */
@media (max-width: 991px) {
    .courses-grid {
        gap: 24px;
    }

    .course-card {
        width: calc((100% - 24px) / 2);
    }

    .courses-title {
        font-size: 56px;
        line-height: 64px;
    }

    .module-header {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .module-image-container {
        height: 250px;
    }

    .module-title {
        font-size: 48px;
        line-height: 56px;
    }

    .lessons-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .courses-hero {
        padding: 64px 0 48px;
    }

    .courses-hero-content {
        padding: 0 20px;
    }

    .courses-title {
        font-size: 40px;
        line-height: 48px;
    }

    .courses-subtitle {
        font-size: 18px;
        line-height: 28px;
    }

    .courses-grid-section {
        padding: 64px 0;
    }

    .courses-container {
        padding: 0 20px;
    }

    .courses-grid {
        gap: 24px;
    }

    .course-card {
        width: 100%;
    }

    .module-detail-container {
        padding: 20px;
    }

    .module-header {
        margin-bottom: 48px;
    }

    .module-title {
        font-size: 36px;
        line-height: 44px;
    }

    .module-description {
        font-size: 18px;
        line-height: 28px;
    }

    .lessons-title {
        font-size: 32px;
        line-height: 40px;
    }
}

.lesson-unavailable {
    color: #98a2b3;
    font-family: "Actor";
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: default;
    font-style: italic;
}