@import url("/static/css/variables.css");

/* === Современный футер === */

.modern-footer {
    background-color: var(--bg-main);
    border-top: 1px solid var(--border-color);
    padding: 24px 0 20px;
    font-family: var(--font-main, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif);
    color: #111827;
}

.modern-footer__container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 30px;
}

/* ВЕРХНЯЯ ЧАСТЬ */
.modern-footer__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border-color);
}

/* --- СОЦСЕТИ (SVG) --- */
.modern-footer__socials {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 16px; /* Отступ между иконками */
    align-items: center;
    flex-wrap: wrap;
    order: 1;
}
.modern-footer .socials__item { 
    list-style: none; 
    display: flex;
}

.modern-footer .socials__link {
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    background: none !important;
    padding: 4px !important;
    border-radius: 4px;
    box-shadow: none !important;
    color: #374151; /* Темно-серый цвет по умолчанию */
    transition: color 0.3s ease, transform 0.2s ease;
}

/* Настройки самой SVG иконки */
.social-icon {
    width: 24px;  /* Единый размер */
    height: 24px;
    
    display: block;
}

/* Эффект при наведении */
.modern-footer .socials__link:hover {
    color: #f0a733; /* Акцентный оранжевый */
    transform: translateY(-2px);
}


/* Бургер (ПК скрыт) */
.modern-footer__burger {
    display: none;
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 999px;
    padding: 6px 10px;
    cursor: pointer;
    flex-direction: column; 
    align-items: center;
    justify-content: center;
    gap: 4px;
    order: 2;
}
.modern-footer__burger-line {
    width: 16px;
    height: 2px;
    background-color: #111827;
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}
.modern-footer__burger--open .modern-footer__burger-line:nth-child(1) { transform: translateY(4px) rotate(45deg); }
.modern-footer__burger--open .modern-footer__burger-line:nth-child(2) { opacity: 0; }
.modern-footer__burger--open .modern-footer__burger-line:nth-child(3) { transform: translateY(-4px) rotate(-45deg); }

/* Навигация */
.modern-footer__nav-wrapper {
    display: flex;
    align-items: center;
    order: 3;
    margin-left: auto;
}
.modern-footer__nav {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}
.modern-footer__nav-item { margin: 0; position: relative; }

.modern-footer__nav-link,
.modern-footer__nav-link--dropdown {
    font-size: 14px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #111827;
    text-decoration: none;
    position: relative;
    padding-bottom: 2px;
    font-family: var(--font-main);
}
.modern-footer__nav-link::after,
.modern-footer__nav-link--dropdown::after {
    content: "";
    position: absolute; left: 0; bottom: -2px; width: 0; height: 2px;
    background-color: #f0a733; transition: width 0.2s ease;
}
.modern-footer__nav-link:hover, .modern-footer__nav-link--dropdown:hover { color: #000; }
.modern-footer__nav-link:hover::after, .modern-footer__nav-link--dropdown:hover::after { width: 100%; }

.modern-footer__nav-item--active > .modern-footer__nav-link,
.modern-footer__nav-item--active > .modern-footer__nav-link--dropdown { color: #000; }
.modern-footer__nav-item--active > .modern-footer__nav-link::after,
.modern-footer__nav-item--active > .modern-footer__nav-link--dropdown::after { width: 100%; }

.modern-footer__nav-link--dropdown { display: inline-flex; align-items: center; gap: 4px; }
.modern-footer__nav-arrow { display: inline-flex; align-items: center; justify-content: center; pointer-events: none; transition: transform 0.2s ease; }

/* Дропдауны */
.modern-footer__dropdown-list {
    position: absolute; bottom: calc(100% + 10px); left: 0;
    background-color: #ffffff; min-width: 220px;
    list-style: none; padding: 10px 0; margin: 0;
    border: 1px solid var(--border-color);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    border-radius: 6px;
    opacity: 0; visibility: hidden; transform: translateY(8px);
    transition: all 0.18s ease;
    z-index: 10;
}
.modern-footer__dropdown-link {
    display: block; padding: 10px 20px 10px 24px;
    font-size: 13px; color: #111827; text-decoration: none;
    white-space: nowrap; position: relative; overflow: hidden;
    transition: background-color 0.2s ease;
    font-family: var(--font-main);
}
.modern-footer__dropdown-link::before {
    content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
    background-color: #f0a733; transform: scaleY(0); transform-origin: center; transition: transform 0.2s ease;
}
.modern-footer__dropdown-link:hover { background-color: #f9fafb; }
.modern-footer__dropdown-link:hover::before { transform: scaleY(1); }

@media (min-width: 769px) {
    .modern-footer__nav-item--dropdown:hover .modern-footer__dropdown-list {
        opacity: 1; visibility: visible; transform: translateY(0);
    }
    .modern-footer__nav-item--dropdown:hover .modern-footer__nav-arrow { transform: rotate(180deg); }
}

/* --- НИЖНЯЯ ЧАСТЬ (ЮР. ИНФО) --- */

.modern-footer__bottom {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between; 
    margin-top: 12px;
    font-size: 12px;
    color: #6b7280;
    gap: 12px;
}

.modern-footer__bottom p {
    margin: 0;
}

.modern-footer__rights {
    text-align: left;
    flex: 1;
}

.modern-footer__reg-info {
    text-align: right;
    flex: 1;
}


/* --- АДАПТИВНОСТЬ --- */

@media (max-width: 1024px) {
    .modern-footer__container { padding: 0 20px; }
}

@media (max-width: 768px) {
    .modern-footer { padding: 24px 0 20px; }
    .modern-footer__container { padding: 0 16px; }

    .modern-footer__top {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
    }
    .modern-footer__socials { order: 1; justify-content: center; }
    .modern-footer__burger { display: inline-flex; order: 2; margin: 0 auto; }
    .modern-footer__nav-wrapper { order: 3; width: 100%; margin-left: 0; }

    .modern-footer__nav {
        display: none;
        flex-direction: column;
        align-items: center;
        gap: 10px;
        width: 100%;
        text-align: center;
    }
    .modern-footer__nav.modern-footer__nav--open { display: flex; }

    .modern-footer__dropdown-list {
        position: static; box-shadow: none; border: none;
        padding: 4px 0 0; margin: 0;
        opacity: 1; visibility: visible; transform: none; display: none;
    }
    .modern-footer__nav-item--dropdown.is-open > .modern-footer__dropdown-list { display: block; }
    .modern-footer__nav-item--dropdown.is-open .modern-footer__nav-arrow { transform: rotate(180deg); }
    .modern-footer__dropdown-link { padding-left: 0; }

    /* МОБИЛЬНЫЙ НИЗ: всё по центру */
    .modern-footer__bottom {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        align-items: center;
        gap: 8px;
        margin-top: 20px;
    }

    .modern-footer__rights,
    .modern-footer__reg-info {
        text-align: center;
        flex: none;
        width: 100%;
    }
}

@media (max-width: 480px) {
    .modern-footer__nav-link, .modern-footer__nav-link--dropdown { font-size: 13px; }
    .modern-footer__dropdown-link { font-size: 12px; }
}