/* ===== footer.css - Современный стиль для футера (десктоп) ===== */
.site-footer {
    font-family: var(--font-primary);
    background: var(--footer-bg);
    color: var(--footer-text);
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 10;
}

/* Основной контейнер футера */
.site-primary-footer-wrap {
    padding: 4rem 2rem 3rem;
    max-width: 1400px;
    margin: 0 auto;
}

.ast-builder-footer-grid-columns {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
    align-items: start;
}

/* Общие стили для всех секций */
.site-footer-section {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* ===== СЕКЦИЯ 1: Контактная информация (исправленная версия) ===== */
.footer-widget-area address {
    font-style: normal;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.footer-widget-area address p {
    margin: 0;
    line-height: 1.6;
    color: var(--footer-text-light);
    font-size: 0.95rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

/* Специальные стили для параграфов с email - ЗАПРЕЩАЕМ ПЕРЕНОС */
.footer-widget-area address p:has(a[href^="mailto"]) {
    display: flex;
    flex-direction: row; /* В одну строку */
    flex-wrap: nowrap; /* Без переноса */
    align-items: center;
    gap: 0.25rem;
    white-space: nowrap; /* Запрещаем перенос текста */
    overflow: visible;
}

/* Для email ссылок */
.footer-widget-area address p a[href^="mailto"] {
    color: var(--footer-text);
    font-weight: 500;
    display: inline-block;
    white-space: nowrap;
    transition: all 0.2s ease;
    text-decoration: none;
}

.footer-widget-area address p a[href^="mailto"]:hover {
    color: var(--accent-color);
    transform: translateX(3px);
}

/* Текст после email (описание отдела) */
.footer-widget-area address p:has(a[href^="mailto"])::after {
    content: attr(data-description); /* Если используете data-атрибут */
}

/* Или если текст идет просто как текст после ссылки */
.footer-widget-area address p a[href^="mailto"] + text,
.footer-widget-area address p a[href^="mailto"] ~ :not(a) {
    white-space: nowrap;
    display: inline;
}

/* Первый параграф с названием компании */
.footer-widget-area address p:first-child {
    color: var(--footer-text);
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    letter-spacing: 0.02em;
    position: relative;
    display: inline-block;
    flex-direction: row; /* Для первого параграфа оставляем как есть */
    white-space: nowrap;
}

.footer-widget-area address p:first-child::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 40px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
}

/* ОГРН, ИНН, адрес - могут переноситься */
.footer-widget-area address p:not(:has(a)):not(:first-child) {
    display: block;
    white-space: normal;
}

/* Телефон */
.footer-widget-area address p:last-child {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
    white-space: nowrap;
    margin-top: 0.5rem;
}

.footer-widget-area address p:last-child a {
    color: var(--accent-color);
    font-weight: 600;
    font-size: 1.2rem;
    background: rgba(67, 97, 238, 0.08);
    padding: 0.5rem 1.2rem;
    border-radius: 50px;
    border: 1px solid transparent;
    transition: all 0.2s ease;
    display: inline-block;
    white-space: nowrap;
}

.footer-widget-area address p:last-child a:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(67, 97, 238, 0.3);
}

/* ===== СЕКЦИЯ 2: Пустая секция ===== */
.site-footer-primary-section-2 {
    /* Можно добавить декоративные элементы или оставить пустой */
    position: relative;
}

/* Декоративная линия для визуального разделения (опционально) */
.site-footer-primary-section-2::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 1px;
    background: linear-gradient(to bottom, transparent, var(--border-color), transparent);
}

.site-footer-primary-section-2::after {
    content: '';
    position: absolute;
    right: 0;
    top: 0;
    height: 100%;
    width: 1px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}

/* ===== СЕКЦИЯ 3: Режим работы и ссылки ===== */
footer .uagb-infobox__content-wrap {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

footer .uagb-ifb-content {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

footer .uagb-ifb-image-content {
    margin-bottom: 0.5rem;
}

footer .uagb-ifb-image-content img {
    width: 48px;
    height: 48px;
    opacity: 0.8;
    transition: opacity 0.2s ease, transform 0.2s ease;
    filter: brightness(0) invert(0.8); /* Адаптация под темный фон */
}

footer .uagb-ifb-image-content:hover img {
    opacity: 1;
    transform: scale(1.05);
}

footer .uagb-ifb-title {
    color: var(--footer-text);
    font-size: 1.2rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: 0.02em;
    position: relative;
    display: inline-block;
    padding-bottom: 0.5rem;
}

footer .uagb-ifb-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
    border-radius: 2px;
}

footer .uagb-ifb-desc {
    color: var(--footer-text-light);
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
}

/* Ссылка на согласие */
footer .widget_block > a[target="_blank"] {
    color: var(--footer-text-light);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0;
    border-bottom: 1px dashed transparent;
}

footer .widget_block > a[target="_blank"]:hover {
    color: var(--accent-color);
    border-bottom-color: var(--accent-color);
}

footer .widget_block > a[target="_blank"]::after {
    content: '↗';
    font-size: 1rem;
    opacity: 0;
    transform: translateX(-5px);
    transition: all 0.2s ease;
}

footer .widget_block > a[target="_blank"]:hover::after {
    opacity: 1;
    transform: translateX(0);
}

/* ===== НИЖНИЙ ФУТЕР (copyright) ===== */
footer .site-below-footer-wrap {
    background: rgba(0, 0, 0, 0.2);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
}

footer .ast-builder-grid-row-full {
    display: flex;
    justify-content: center;
    align-items: center;
}

footer .ast-footer-copyright {
    color: var(--footer-text-light);
    font-size: 0.9rem;
    text-align: center;
}

footer .ast-footer-copyright p {
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

footer .ast-footer-copyright p::before,
footer .ast-footer-copyright p::after {
    content: '';
    height: 1px;
    width: 30px;
    background: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary));
}