/* ==========================================================================
   FOOTER STYLES
   ========================================================================== */
.footer {
    background-color: var(--c-background);
    padding-top: 20px;
    color: var(--c-dark);
    position: relative;
}

/* ==========================================================================
   ВЕРХНИЙ БЛОК (Карточка и Карта)
   ========================================================================== */
.footer__top-row {
    margin-bottom: 60px;
}

/* Темная карточка */
.footer__card {
    background-color: #212121;
    border-radius: 32px;
    padding: 50px 40px;
    position: relative;
    height: 100%;
    color: var(--c-white);
    display: flex;
    flex-direction: column;
    z-index: 10;
}

/* Выглядывающий маскот */
.footer__mascot {
    position: absolute;
    top: 40px;
    right: -12px;
    width: 140px;
    z-index: 5;
    pointer-events: none;
}

.footer__card-title {
    font-size: 42px;
    font-weight: 700;
    margin-top: 0;
    margin-bottom: 40px;
    color: var(--c-white);
}

.footer__card-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 40px;
    flex-grow: 1;
}

.footer__card-item {
    display: flex;
    flex-direction: column;
}

.footer__card-label {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.5);
    margin-bottom: 8px;
}

.footer__card-value {
    font-size: 16px;
    font-weight: 500;
    line-height: 1.5;
}

.footer__card-phone {
    font-size: 20px;
    font-weight: 700;
    color: var(--c-white);
    text-decoration: none;
    transition: var(--transition);
}

.footer__card-phone:hover {
    color: var(--c-primary);
}

/* Форма в карточке */
.footer__form {
    margin-top: auto;
}

.footer__form-row {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
}

.footer__input {
    flex: 1;
    padding: 16px 20px;
    border-radius: 12px;
    border: none;
    background: var(--c-white);
    font-size: 15px;
    color: var(--c-dark);
    font-family: var(--font-main);
    outline: none;
}

.footer__submit {
    padding: 16px 32px;
    border-radius: 12px;
    border: none;
    background-color: #B265F0;
    color: var(--c-white);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.footer__submit:hover {
    background-color: #9A50D8;
}

.footer__policy {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    cursor: pointer;
}

.footer__policy input[type="checkbox"] {
    margin-top: 4px;
    accent-color: #B265F0;
}

.footer__policy span {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.3);
    line-height: 1.4;
}

/* Карта */
.footer__map {
    border-radius: 32px;
    overflow: hidden;
    height: 100%;
    min-height: 480px;
}

.footer__map iframe {
    width: 100%;
    height: 100%;
    display: block;
}

/* ==========================================================================
   СРЕДНИЙ БЛОК (Инфо и Меню)
   ========================================================================== */
.footer__middle-row {
    margin-bottom: 60px;
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    margin-bottom: 24px;
}

.footer__logo img {
    height: 40px;
}

.footer__logo-text {
    font-size: 14px;
    font-weight: 600;
    color: var(--c-dark);
    line-height: 1.2;
}

.footer__disclaimer {
    font-size: 13px;
    color: #6C6C6C;
    line-height: 1.6;
    text-decoration: underline;
    text-decoration-color: rgba(108, 108, 108, 0.3);
}

.footer__nav-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--c-dark);
    margin-top: 0;
    margin-bottom: 24px;
}

.footer__nav {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer__nav li {
    margin-bottom: 16px;
}

.footer__nav a {
    font-size: 16px;
    color: var(--c-dark);
    text-decoration: none;
    transition: var(--transition);
}

.footer__nav a:hover {
    color: var(--c-primary);
}
/* ==========================================================================
   НИЖНИЙ БЛОК (Копирайт и Разнесение текстов)
   ========================================================================== */
.footer__bottom {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    /* ВАЖНО: заставляет внутренние блоки тянуться на 100% ширины */
    padding: 0px 0 0px 0;
    /* border-top: 1px solid rgba(0, 0, 0, 0.08); */
    width: 100%;
}

.footer__bottom-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    /* Растягиваем на всю ширину */
    /* border-bottom: 1px solid rgba(0, 0, 0, 0.05); */
    padding-bottom: 24px;
}

.footer__bottom-text-left {
    font-size: 13px;
    color: #8C8C8C;
    text-align: left;
}

.footer__bottom-text-right {
    font-size: 13px;
    color: #8C8C8C;
    text-align: left;
    max-width: 65%;
}

.footer__dev-block {
    text-align: center;
    width: 100%;
    margin-top: 24px;
}

/* ==========================================================================
   ПРЕМИУМ-АНИМАЦИЯ АВТОРА
   ========================================================================== */
.footer__dev-link-premium {
    position: relative;
    display: inline-flex;
    align-items: center;
    padding: 6px 18px;
    color: #474747;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
    border-radius: 30px;
    overflow: hidden;
    z-index: 1;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.footer__dev-link-premium::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(120deg, #B265F0, #D89BFF, #B265F0, #D89BFF);
    background-size: 300% auto;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.footer__dev-link-premium:hover {
    color: #ffffff;
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 20px rgba(178, 101, 240, 0.3);
    letter-spacing: 0.5px;
}

.footer__dev-link-premium:hover::before {
    opacity: 1;
    animation: premiumShine 2.5s linear infinite;
}

@keyframes premiumShine {
    0% {
        background-position: 0% center;
    }

    100% {
        background-position: 300% center;
    }
}
/* ==========================================================================
   АДАПТИВ (Планшеты и Мобильные)
   ========================================================================== */
@media (max-width: 1199px) {
    .footer__form-row {
        flex-direction: column;
    }

    .footer__submit {
        width: 100%;
    }
}

@media (max-width: 991px) {
    .footer__card {
        padding: 40px 30px;
    }

    .footer__mascot {
        width: 100px;
        right: -9px;
        top: 20px;
    }

    .footer__map {
        min-height: 350px;
        margin-top: 20px;
    }

    .footer__bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }

    .footer__bottom-text-left,
    .footer__bottom-text-right {
        /* text-align: center !important; */
        max-width: 100%;
        width: 100%;
    }
}

@media (max-width: 767px) {
    .footer__card-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .footer__card-title {
        font-size: 32px;
    }
}

/* ==========================================================================
   ЯНДЕКС КАРТА (ЧБ Подложка + Стили Балуна)
   ========================================================================== */
/* 1. Делаем саму карту (дома, дороги) черно-белой. Метки не трогаем! */
[class$="-ground-pane"] {
    filter: grayscale(100%);
    opacity: 0.8;
    /* Чуть приглушаем контраст, чтобы карта смотрелась мягче */
}

/* 2. Стилизуем всплывающий балун под дизайн стоматологии */
[class$="-balloon__content"] {
    padding: 10px !important;
    font-family: var(--font-main) !important;
}

/* Заголовок в балуне (Фиолетовый) */
[class$="-balloon__content"] ymaps b {
    color: #B265F0;
    font-size: 16px;
    display: block;
    margin-bottom: 5px;
}

/* Текст в балуне */
[class$="-balloon__content"] ymaps {
    color: var(--c-dark);
    font-size: 14px;
    line-height: 1.4;
}

/* Убираем лишние тени у крестика закрытия балуна */
[class$="-balloon__close-button"] {
    opacity: 0.7;
    transition: opacity 0.3s;
}

[class$="-balloon__close-button"]:hover {
    opacity: 1;
}

/* --- НИЖНЯЯ ПАНЕЛЬ ПОДВАЛА (КОПИРАЙТ) --- */
.footer-bottom { 
    max-width: 1400px; 
    margin: 60px auto 0; 
    padding-top: 20px; 
   
    font-size: 13px; 
    color: rgba(0, 0, 0, 0.5); /* Цвет основного текста (полупрозрачный) */
    display: flex; 
    justify-content: space-between; 
    align-items: center;
}

/* Стили ссылки и плавная анимация */
.developer_lnk,
.developer_lnk a {
    color: #000000; /* Цвет ссылки (имени). Если подвал темный - поставьте #ffffff */
    text-decoration: none;
    transition: opacity 0.3s ease, color 0.3s ease; /* Плавная анимация наведения */
}

/* Эффект при наведении */
.developer_lnk a:hover {
    opacity: 0.6; /* Ссылка будет плавно тускнеть при наведении */
}

/* Адаптив для мобильных устройств */
@media (max-width: 600px) {
    .footer-bottom { 
        flex-direction: column; 
        gap: 10px; 
        text-align: center;
        margin-top: 40px;
    }
}
/* --- НИЖНЯЯ ПАНЕЛЬ ПОДВАЛА --- */
.footer-bottom {
    max-width: 1400px;
    margin: 0px auto 0;
    padding: 20px 0;
    /* Заменили padding-top на общий padding сверху и снизу, чтобы текст отлепился от края */
    /* border-top: 1px solid rgba(0, 0, 0, 0.1); */
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Контейнер для копирайта */
.footer__credits {
    text-align: center;
}
/* Ссылка с анимацией */
.footer__copyright-link {
    font-size: 13px;
    font-weight: 500;
    /* Сделали шрифт капельку толще, чтобы блику было где разгуляться */
    letter-spacing: 0.5px;
    text-decoration: none;
    display: inline-block;

    /* Сделали оранжевый цвет (#FFAC62) чуть светлее и ярче */
    background: linear-gradient(to right,
            var(--c-primary-light) 0%,
            var(--c-primary-light) 40%,
            #FFAC62 50%,
            var(--c-primary-light) 60%,
            var(--c-primary-light) 100%);
    background-size: 200% auto;

    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    animation: shine 4s linear infinite;
    transition: all 0.3s ease;
    opacity: 1;
    /* Вернули 100% непрозрачность, чтобы текст не был тусклым */
}

/* Эффект при наведении */
.footer__copyright-link:hover {
    opacity: 1;
    transform: translateY(-1px);
    /* При ховере можно сделать текст чуть ярче */
    text-shadow: 0 0 15px rgba(241, 158, 87, 0.2);
}

/* Сама анимация движения градиента */
@keyframes shine {
    to {
        background-position: 200% center;
    }
}

/* На мобилках делаем друг под другом */
@media (max-width: 767.98px) {
    .footer-bottom {
        flex-direction: column;
        text-align: center;
        justify-content: center;
    }
    .footer__credits {
        text-align: center;
        margin-top: 5px;
    }
}/* Ссылка с анимацией */
.footer__copyright-link {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 0.5px;
    text-decoration: none;
    display: inline-block;

    /* Заменили базовый цвет градиента на вашу переменную */
    background: linear-gradient(to right,
            var(--c-primary-light) 0%,
            var(--c-primary-light) 40%,
            #F19E57 50%,
            var(--c-primary-light) 60%,
            var(--c-primary-light) 100%);
    background-size: 200% auto;

    /* Маскируем градиент текстом */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;

    /* Запускаем бесконечную анимацию перелива */
    animation: shine 4s linear infinite;
    transition: all 0.3s ease;
    opacity: 0.8;
}

@media (max-width: 767px) {
    .footer__bottom-info {
        display: flex;
        flex-direction: column;
        /* Выстраиваем элементы в колонку */
        align-items: center;
        /* Центрируем по горизонтали (по желанию можно выровнять по левому краю: flex-start) */
        /* text-align: center; */
        /* Центрируем сам текст */
        gap: 12px;
        /* Добавляем небольшое расстояние между строками */
    }

    /* Делаем строчные элементы блочными, чтобы они занимали всю ширину */
    .footer__bottom-text-left,
    .footer__bottom-text-right {
        display: block;
        width: 100%;
    }
}

/* Кнопка наверх (как на макете) */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #AC7EEB;
    /* Фиолетовый цвет с макета */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-in-out;
    box-shadow: 0 4px 10px rgba(172, 126, 235, 0.3);
    text-decoration: none;
}

/* Класс, который добавляется скриптом при прокрутке */
.back-to-top.is-visible {
    opacity: 1;
    visibility: visible;
}

/* Эффект при наведении курсора */
.back-to-top:hover {
    background-color: #9865d6;
    /* Чуть темнее */
    transform: translateY(-3px);
    /* Легкое поднятие */
}

/* Адаптив для мобильных устройств (делаем кнопку чуть меньше) */
@media (max-width: 768px) {
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
    }
}