/* --- Estructura General --- */
.cpm-container.cpm-general-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 40px;
    align-items: flex-start;
}

.cpm-main-content {
    flex: 1;
    min-width: 0;
    max-width: 100%;
}

.cpm-info-group {
    width: 320px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* --- Grupos de Mes (Contenido General) --- */
.cpm-month-group {
    margin-bottom: 20px;
    border-bottom: 1px solid #eee;
    padding-bottom: 20px;
}

.cpm-month-title {
    cursor: pointer;
    list-style: none;
    padding: 0 20px;
    border: 1px solid #E1E1E1;
    border-radius: 5px;
    font-size: 40px;
    font-weight: 700;
    font-family: "Open Sans", sans-serif;
    color: #0C738C;
    text-transform: capitalize;
}

.cpm-month-title::-webkit-details-marker {
    display: none;
}

.cpm-month-content {
    padding-top: 20px;
}

/* --- Ítem de Módulo y sus Recursos --- */
.cpm-module-item-container {
    padding: 40px 20px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background-color: #fff;
    margin-bottom: 15px;
}

.cpm-module-item-header {
    display: flex;
    align-items: center;
}

.cpm-module-item-details-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    flex-grow: 1;
}

/* --- Iconos de Visto/No Visto --- */
.cpm-item-icon {
    height: 24px;
    width: 42px;
    margin-right: 15px;
    flex-shrink: 0;
    cursor: pointer;
    transition: all 0.3s ease-in-out;
    border-radius: 12px;
    position: relative;
    border: 2px solid #0C738C;
}

.cpm-item-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    height: 16px;
    width: 16px;
    border-radius: 50%;
    transition: all 0.3s ease-in-out;
}

.cpm-item-icon.is-small {
    height: 20px;
    width: 36px;
    border-radius: 10px;
}

.cpm-item-icon.is-small::after {
    height: 12px;
    width: 12px;
}

.cpm-item-icon.is-unviewed {
    background-color: #FFFFFF;
}

.cpm-item-icon.is-unviewed::after {
    background-color: #0C738C;
    left: 2px;
}

.cpm-item-icon.is-viewed {
    background-color: #0C738C;
}

.cpm-item-icon.is-viewed::after {
    background-color: #ffffff;
    right: 2px;
}

.cpm-item-details {
    flex-grow: 1;
    font-size: 28px;
    font-weight: 700;
    font-family: "Open Sans", sans-serif;
    color: #757575;
}

/* --- Recursos (Archivos/Videos) --- */
.cpm-resource-list {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    flex-direction: column;
}

.cpm-resource-item {
    padding: 20px;
    border-bottom: 1px solid #e1e1e1;
}

.cpm-resource-item:last-child {
    border-bottom: none;
}

.cpm-resource-item-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.cpm-resource-details {
    flex-grow: 1;
}

.cpm-resource-details .titulo {
    font-size: 16px;
    font-weight: 700;
    font-family: "Open Sans", sans-serif;
    color: #757575;
}

.cpm-resource-details .descripcion {
    font-size: 10px;
    font-weight: 400;
    color: #757575;
}

.cpm-resource-action .resource-button {
    background: none;
    border: none;
    padding: 0;
    cursor: pointer;
}

.cpm-resource-action .resource-button svg {
    transition: transform 0.3s ease;
}

.cpm-resource-action .resource-button.is-active svg {
    transform: rotate(90deg);
}

/* --- Barra Lateral --- */
.cpm-info-block {
    border: 1px solid #e0e0e0;
    border-radius: 12px;
    padding: 30px 25px;
    text-align: center;
    background-color: #fff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.cpm-info-icon {
    margin: 0 auto 20px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cpm-info-icon img {
    max-width: 115px;
    height: auto;
}

.cpm-info-block h3 {
    font-size: 18px;
    color: #333;
    margin: 0 0 8px 0;
    font-weight: bold;
}

.cpm-info-block p {
    font-size: 15px;
    color: #757575;
    margin: 0 0 25px 0;
    line-height: 1.5;
}

.cpm-info-block .cpm-button {
    background-color: #f5a623;
    color: #fff !important;
    padding: 12px 25px;
    border-radius: 25px;
    text-decoration: none;
    font-weight: bold;
    display: inline-block;
    transition: background-color 0.2s;
}

.cpm-info-block .cpm-button:hover {
    background-color: #e0930f;
}

/* --- Contenido Específico y Recursos Relacionados --- */
.cpm-specific-container h1 {
    font-size: 32px;
    margin-bottom: 10px;
}

.cpm-specific-container h2 {
    font-size: 20px;
    color: #757575;
    margin-bottom: 20px;
    font-weight: normal;
}

.cpm-media-display {
    margin-bottom: 40px;
}

.cpm-related-files h3 {
    font-size: 22px;
    margin-bottom: 20px;
}

/* --- Responsividad --- */
.cpm-restricted-content {
    width: 100%;
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-align: center;
    background-color: #fff;
}

@media (max-width: 960px) {
    .cpm-general-container {
        flex-direction: column;
    }

    .cpm-main-content {
        order: 2;
    }

    .cpm-info-group {
        order: 1;
        width: 100%;
        flex-direction: row;
    }

    .cpm-info-block {
        flex: 1;
    }
}

@media (max-width: 600px) {
    .cpm-info-group {
        flex-direction: column;
    }
}

/* --- Video Embeds Responsivos --- */
.cpm-video-embed-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    /* Proporción 16:9 */
    height: 0;
    overflow: hidden;
    width: 100%;
    max-width: 100%;
    border-radius: 8px;
}

.cpm-video-embed-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.cpm-resource-item .cpm-video-embed-wrapper {
    display: none;
    /* Se mantiene oculto para el toggle */
    margin-top: 15px;
}

.cpm-specific-header {
    background: #F0F0F0;
    padding: 65px 20px;
}

.cpm-specific-header .content {
    max-width: 1300px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
}

.cpm-specific-header .content .name {
    font-size: 40px;
    font-weight: 700;
    font-family: "Open Sans", sans-serif;
    color: #0C738C;
    width: 100%;
}

.cpm-specific-header .content .cpm-specific-description{
    font-size: 28px;
    font-weight: 700;
    font-family: "Open Sans", sans-serif;
    color: #757575;
    width: 100%;
}

.cpm-specific-container .cpm-media-display{
    width: 100%;
    max-width: 1200px;
    margin: 70px auto;
    border-radius: 60px;
    overflow: hidden;
}

.cpm-specific-container .cpm-media-display > img{
    width: 100%;
    height: 100%;
}

.cpm-specific-container .cpm-related-files{
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 20px 20px;
}
.cpm-specific-container .cpm-resource-title{
    width: 100%;
    text-align: left;
    font-size: 28px;
    font-weight: 700;
    font-family: "Open Sans", sans-serif;
    color: #757575;
}

.cpm-specific-container .cpm-navigation {
    display: flex;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
}
.cpm-specific-container .cpm-navigation .cpm-nav-button{
    background-color: #73BBC2;
    border: 1px solid #73BBC2;
    color: #fff;
    padding: 17px 20px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    transition: background-color 0.3s ease;
    position: relative;
}
.cpm-specific-container .cpm-navigation .cpm-nav-button:hover {
    background-color: #fff;
    color: #73BBC2;
}

.cpm-specific-container .cpm-navigation .cpm-nav-button:hover::before,.cpm-specific-container .cpm-navigation .cpm-nav-button:hover::after {
    border-color: #73BBC2;
}
.cpm-specific-container .cpm-navigation .cpm-nav-button.prev { padding-left: 85px; }
.cpm-specific-container .cpm-navigation .cpm-nav-button.next { padding-right: 85px; }
.cpm-specific-container .cpm-navigation .cpm-nav-button::before, .cpm-specific-container .cpm-navigation .cpm-nav-button::after {
    content: '›'; position: absolute; top: 50%; transform: translateY(-50%); font-size: 40px; line-height: 31px;
    display: flex;
  justify-content: center;
  border: 4px solid #fff;
  border-radius: 50%;
  font-weight: 700;
  width: 40px;
  height: 40px;
}
.cpm-specific-container .cpm-navigation .cpm-nav-button.prev::before { content: '‹'; left: 20px; }
.cpm-specific-container .cpm-navigation .cpm-nav-button.prev::after { display: none; }
.cpm-specific-container .cpm-navigation .cpm-nav-button.next::after { right: 20px; }
.cpm-specific-container .cpm-navigation .cpm-nav-button.next::before { display: none; }
.cpm-specific-container .cpm-navigation .cpm-nav-button.disabled { background-color: #E0E0E0; border-color: #E0E0E0; color: #BDBDBD; pointer-events: none; cursor: not-allowed; }