.comunidad-contenedor {
    max-width: 1250px;
    margin: 0 auto;
    padding: 40px 25px;
}

.comunidad-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
    flex-wrap: wrap;
    gap: 16px;
}

.comunidad-titulos h2 {
    margin: 0 0 6px 0;
    font-size: 38px;
    color: #002855;
    text-align: left;
}

.comunidad-titulos p {
    margin: 0;
    font-size: 15px;
    color: #4a6572;
}

.btn-publicar-comunidad {
    background-color: #002855;
    color: #00ffff;
    text-decoration: none;
    padding: 12px 22px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: bold;
}

.btn-publicar-comunidad:hover {
    color: orange;
}

.filtros-comunidad {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 30px;
}

.filtro-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.filtro-item label {
    font-size: 13px;
    font-weight: bold;
    color: #002855;
}

.filtro-item select {
    padding: 11px 14px;
    border: 1px solid #b8c9d9;
    border-radius: 10px;
    background-color: #ffffff;
    font-size: 14px;
    font-family: inherit;
    color: #1a1a1a;
}


.comunidad-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.comunidad-card {
    background-color: #ffffff;
    border: 1px solid #cbdbe5;
    border-radius: 14px;
    display: flex;
    flex-direction: column;
}

.comunidad-card:hover {
    border-color: #0077b6;
    box-shadow: 0 6px 16px rgba(0, 40, 85, 0.08);
}


.card-preview {
    height: 115px;
    background: repeating-linear-gradient(
        -45deg,
        #eef7fa,
        #eef7fa 10px,
        #dcecf2 10px,
        #dcecf2 20px
    );
    border-bottom: 1px solid #cbdbe5;
    border-radius: 14px 14px 0 0;
    padding: 12px;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.badge-formato {
    position: absolute;
    top: 10px;
    left: 10px;
    background-color: #ffffff;
    border: 1px solid #b8c9d9;
    color: #002855;
    font-size: 10px;
    font-weight: bold;
    padding: 3px 8px;
    border-radius: 6px;
}

.preview-texto {
    font-size: 11px;
    font-weight: bold;
    color: #4a6572;
}

.card-cuerpo {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-cuerpo h4 {
    margin: 0;
    font-size: 15px;
    color: #002855;
    line-height: 1.3;
    text-align: left;
}

.card-meta {
    margin: 0;
    font-size: 12px;
    color: #556b7d;
    line-height: 1.4;
}

.card-autor {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 4px;
}

.autor-iniciales {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background-color: #d8eff7;
    color: #002855;
    font-size: 11px;
    font-weight: bold;
    display: flex;
    align-items: center;
    justify-content: center;
}

.autor-nombre {
    font-size: 12px;
    color: #00509d;
}

.card-pie {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #e1ecf2;
    padding-top: 12px;
    margin-top: 4px;
}

.card-stats {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.estrellas {
    font-size: 12px;
    color: #d97706;
    font-weight: bold;
}

.descargas {
    font-size: 11px;
    color: #6c8294;
}

.btn-guardar-apunte {
    background-color: #002855;
    color: #00ffff;
    border: none;
    border-radius: 8px;
    padding: 8px 14px;
    font-size: 12px;
    font-weight: bold;
    font-family: inherit;
    cursor: pointer;
}

.btn-guardar-apunte:hover {
    color: orange;
}