/* ===== Футер сайта (виджет epil_footer) ===== */
.epil-footer {
    --ef-bg: #1b1323;
    --ef-text: #fff;
    --ef-muted: rgba(255, 255, 255, .64);
    --ef-faint: rgba(255, 255, 255, .42);
    --ef-line: rgba(255, 255, 255, .1);
    --ef-card: rgba(255, 255, 255, .05);
    --ef-card-hover: rgba(255, 255, 255, .09);
    --ef-accent: #d86eec;
    --ef-accent-dark: #b44fc9;
    --ef-star: #ffb800;

    position: relative;
    overflow: hidden;
    background:
        radial-gradient(900px 360px at 12% -12%, rgba(216, 110, 236, .24), transparent 62%),
        radial-gradient(700px 320px at 100% 0%, rgba(132, 92, 255, .14), transparent 60%),
        var(--ef-bg);
    color: var(--ef-text);
    font-size: 15px;
    line-height: 1.55;
}

.epil-footer *,
.epil-footer *::before,
.epil-footer *::after {
    box-sizing: border-box;
}

.epil-footer a {
    color: inherit;
    text-decoration: none;
}

.epil-footer ul,
.epil-footer ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

.epil-footer p {
    margin: 0;
}

.epil-footer svg {
    flex: none;
    width: 18px;
    height: 18px;
}

.epil-footer__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 72px 20px 0;
}

/* --- Сетка колонок --- */
.epil-footer__grid {
    display: grid;
    gap: 40px;
    grid-template-columns: 1.45fr .7fr 1.15fr 1.15fr;
}

.epil-footer__grid--3 {
    grid-template-columns: 1.3fr .8fr 1.3fr;
}

.epil-footer__grid--2 {
    grid-template-columns: 1.4fr 1fr;
}

.epil-footer__title {
    margin: 4px 0 20px;
    color: var(--ef-text);
    font-size: 17px;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: .01em;
}

/* --- О сайте и кнопки связи --- */
.epil-footer__logo {
    display: inline-flex;
    align-items: center;
}

.epil-footer__logo img {
    display: block;
    width: auto;
    max-width: 160px;
    height: 44px;
    object-fit: contain;
    object-position: left center;
}

.epil-footer__logo span {
    font-size: 40px;
    font-weight: 800;
    line-height: 1;
}

.epil-footer__about {
    max-width: 360px;
    margin-top: 20px !important;
    color: var(--ef-muted);
    font-size: 14px;
    line-height: 1.65;
}

.epil-footer__contacts {
    display: grid;
    gap: 10px;
    max-width: 360px;
    margin-top: 28px;
}

.epil-footer__contacts-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
}

.epil-footer__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 46px;
    padding: 10px 14px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: transparent;
    color: var(--ef-text) !important;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    white-space: nowrap;
    transition: background-color .2s, border-color .2s, transform .2s;
}

.epil-footer__btn:hover,
.epil-footer__btn:focus-visible {
    border-color: rgba(255, 255, 255, .45);
    background: var(--ef-card-hover);
}

.epil-footer__btn--primary {
    border-color: transparent;
    background: linear-gradient(135deg, var(--ef-accent), var(--ef-accent-dark));
    box-shadow: 0 10px 26px rgba(216, 110, 236, .28);
}

.epil-footer__btn--primary:hover,
.epil-footer__btn--primary:focus-visible {
    border-color: transparent;
    background: linear-gradient(135deg, #e07ff2, var(--ef-accent-dark));
    transform: translateY(-1px);
}

/* --- Навигация --- */
.epil-footer__links {
    display: grid;
    gap: 12px;
}

.epil-footer__links a {
    color: var(--ef-muted);
    font-size: 15px;
    transition: color .2s;
}

.epil-footer__links a:hover,
.epil-footer__links a:focus-visible {
    color: var(--ef-text);
}

/* --- Популярные студии --- */
.epil-footer__studios {
    display: grid;
    gap: 8px;
}

.epil-footer-studio {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 8px 10px 8px 8px;
    border-radius: 14px;
    background: var(--ef-card);
    transition: background-color .2s;
}

.epil-footer-studio:hover,
.epil-footer-studio:focus-visible {
    background: var(--ef-card-hover);
}

.epil-footer-studio__img {
    position: relative;
    flex: none;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: rgba(255, 255, 255, .08);
}

.epil-footer-studio__img img {
    display: block;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    object-fit: cover;
}

.epil-footer-studio__place {
    position: absolute;
    top: -5px;
    left: -5px;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border: 2px solid var(--ef-bg);
    border-radius: 50%;
    background: var(--ef-accent);
    color: #fff;
    font-size: 11px;
    font-weight: 800;
    line-height: 1;
}

.epil-footer__studios li:first-child .epil-footer-studio__place {
    background: #f5b300;
}

.epil-footer-studio__body {
    display: grid;
    gap: 2px;
    min-width: 0;
}

.epil-footer-studio__name {
    overflow: hidden;
    color: var(--ef-text);
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.epil-footer-studio__rating {
    display: flex;
    align-items: center;
    gap: 4px;
    color: var(--ef-faint);
    font-size: 12.5px;
}

.epil-footer-studio__rating svg {
    width: 14px;
    height: 14px;
    fill: var(--ef-star);
}

.epil-footer-studio__rating b {
    color: var(--ef-text);
    font-weight: 700;
}

.epil-footer-studio__rating em {
    font-style: normal;
}

/* --- Полезное --- */
.epil-footer__articles {
    display: grid;
    gap: 16px;
}

.epil-footer__articles a {
    display: grid;
    gap: 4px;
}

.epil-footer__article-title {
    display: -webkit-box;
    overflow: hidden;
    color: var(--ef-text);
    font-size: 14.5px;
    font-weight: 600;
    line-height: 1.4;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    transition: color .2s;
}

.epil-footer__articles a:hover .epil-footer__article-title,
.epil-footer__articles a:focus-visible .epil-footer__article-title {
    color: var(--ef-accent);
}

.epil-footer__article-date {
    color: var(--ef-faint);
    font-size: 12.5px;
}

.epil-footer__more {
    display: inline-flex;
    gap: 6px;
    margin-top: 18px;
    color: var(--ef-accent) !important;
    font-size: 14px;
    font-weight: 600;
}

.epil-footer__more:hover span,
.epil-footer__more:focus-visible span {
    transform: translateX(3px);
}

.epil-footer__more span {
    transition: transform .2s;
}

/* --- Нижняя полоса --- */
.epil-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 24px;
    margin-top: 56px;
    padding: 22px 0 26px;
    border-top: 1px solid var(--ef-line);
    color: var(--ef-faint);
    font-size: 13px;
}

.epil-footer__privacy:hover,
.epil-footer__privacy:focus-visible {
    color: var(--ef-text);
}

.epil-footer__top {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-left: auto;
    padding: 8px 14px;
    border: 1px solid var(--ef-line);
    border-radius: 999px;
    background: transparent;
    color: var(--ef-muted);
    font: inherit;
    cursor: pointer;
    transition: color .2s, border-color .2s;
}

.epil-footer__top svg {
    width: 15px;
    height: 15px;
}

.epil-footer__top:hover,
.epil-footer__top:focus-visible {
    border-color: rgba(255, 255, 255, .35);
    background: transparent;
    color: var(--ef-text);
}

.epil-footer a:focus-visible,
.epil-footer button:focus-visible {
    outline: 2px solid var(--ef-accent);
    outline-offset: 3px;
}

/* --- Планшет: 2 × 2 --- */
@media (max-width: 1024px) {
    .epil-footer__inner {
        padding-top: 56px;
    }

    .epil-footer__grid,
    .epil-footer__grid--3,
    .epil-footer__grid--2 {
        grid-template-columns: 1fr 1fr;
        gap: 44px 40px;
    }
}

/* --- Телефон: одна колонка --- */
@media (max-width: 767px) {
    .epil-footer__inner {
        padding: 44px 16px 0;
    }

    .epil-footer__grid,
    .epil-footer__grid--3,
    .epil-footer__grid--2 {
        grid-template-columns: minmax(0, 1fr);
        gap: 36px;
    }

    .epil-footer__about,
    .epil-footer__contacts {
        max-width: none;
    }

    .epil-footer__btn {
        width: 100%;
    }

    .epil-footer__title {
        margin-bottom: 14px;
    }

    /* Навигация в 2 колонки - короче на телефоне */
    .epil-footer__links {
        grid-template-columns: 1fr 1fr;
        gap: 12px 16px;
    }

    .epil-footer__bottom {
        margin-top: 40px;
    }

    .epil-footer__top {
        margin-left: 0;
    }
}
