
/* =========================================================
   MANY-COURSES.NET — популярные школы / авторы v1.9
   ========================================================= */

.mc-home-entities {
    width: 100%;
    max-width: 1200px;
    margin: 26px auto 24px;
}

.mc-home-entity-block {
    background: #fff;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 18px;
    box-shadow: 0 8px 28px rgba(30, 45, 60, .055);
}

.mc-home-entity-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 18px;
}

.mc-home-entity-head h2 {
    margin: 0 0 5px;
    font-size: 24px;
    line-height: 1.2;
    color: #161616;
}

.mc-home-entity-head p {
    margin: 0;
    color: #7a7f85;
    font-size: 14px;
}

.mc-home-entity-more {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    white-space: nowrap;
    text-decoration: none !important;
    color: #383d42 !important;
    font-size: 13px;
    font-weight: 600;
}

.mc-home-entity-more span {
    color: #8bc900;
    transition: transform .15s ease;
}

.mc-home-entity-more:hover span {
    transform: translateX(3px);
}

.mc-home-entity-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 12px;
}

.mc-home-entity-card {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
    padding: 13px 14px;
    border: 1px solid #e9edf0;
    border-radius: 12px;
    background: #fff;
    color: #202428 !important;
    text-decoration: none !important;
    transition:
        transform .15s ease,
        box-shadow .15s ease,
        border-color .15s ease;
}

.mc-home-entity-card:hover {
    color: #202428 !important;
    border-color: #d8dde1;
    transform: translateY(-2px);
    box-shadow: 0 7px 22px rgba(35, 50, 65, .08);
}

.mc-home-entity-icon {
    flex: 0 0 44px;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    background: #f3f6f8;
    color: #6d757d;
    font-size: 15px;
    font-weight: 700;
}

.mc-home-entity-icon-school {
    font-size: 18px;
    color: #7faf10;
}

.mc-home-entity-icon-author {
    border-radius: 50%;
}

.mc-home-entity-icon-image {
    padding: 5px;
    background: #fff;
    border: 1px solid #edf0f2;
}

.mc-home-entity-icon-image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
    border-radius: 8px;
}

.mc-home-entity-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.mc-home-entity-text strong {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #202428 !important;
    font-size: 14px;
    font-weight: 600;
}

.mc-home-entity-text small {
    color: #90969c;
    font-size: 12px;
}

.mc-home-entity-card:hover .mc-home-entity-text strong {
    color: #689d00 !important;
}

@media (max-width: 1100px) {
    .mc-home-entity-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .mc-home-entities {
        margin: 20px auto;
    }

    .mc-home-entity-block {
        padding: 18px;
        border-radius: 12px;
    }

    .mc-home-entity-head {
        align-items: flex-start;
        flex-direction: column;
        gap: 8px;
    }

    .mc-home-entity-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 9px;
    }
}

@media (max-width: 430px) {
    .mc-home-entity-grid {
        grid-template-columns: 1fr;
    }
}


/* =========================================================
   v2.0 — популярные рубрики
   ========================================================= */

.mc-home-rubrics-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
}

.mc-home-rubric-card {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 12px 13px;
    border: 1px solid #e9edf0;
    border-radius: 12px;
    background: #fff;
    color: #202428 !important;
    text-decoration: none !important;
    transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.mc-home-rubric-card:hover {
    color: #202428 !important;
    border-color: #d8dde1;
    transform: translateY(-2px);
    box-shadow: 0 7px 22px rgba(35, 50, 65, .07);
}

.mc-home-rubric-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #f3f6f8;
    color: #6f777e;
    font-size: 15px;
}

.mc-home-rubric-card:hover .mc-home-rubric-icon {
    color: #79ad08;
}

.mc-home-rubric-name {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.25;
    font-size: 13px;
    font-weight: 600;
}

.mc-home-rubric-card.is-extra {
    display: none;
}

.mc-home-rubrics-grid.is-open .mc-home-rubric-card.is-extra {
    display: flex;
}

.mc-home-rubrics-actions {
    text-align: center;
    margin-top: 14px;
}

.mc-home-rubrics-toggle {
    border: 0;
    background: #f3f6f8;
    color: #42484d;
    border-radius: 9px;
    padding: 9px 15px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
}

.mc-home-rubrics-toggle:hover {
    background: #e9eef1;
}

@media (max-width: 1100px) {
    .mc-home-rubrics-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media (max-width: 700px) {
    .mc-home-rubrics-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 430px) {
    .mc-home-rubrics-grid {
        grid-template-columns: 1fr;
    }
}


/* v2.1 — align all home entity sections with the FAQ card */
.mc-home-entities{box-sizing:border-box;width:100%;max-width:1200px;margin-left:auto;margin-right:auto}
.mc-home-entity-block{box-sizing:border-box;width:100%}
