/* ========================================
   FOOTER - ОПТИМІЗОВАНА ВЕРСІЯ
   ======================================== */

footer.site-footer {
    background: #171717;
    color: #ffffff;
    width: 100%;
    padding: 28px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

footer.site-footer * {
    box-sizing: border-box;
}

/* Використовує загальну систему ширини */
footer.site-footer .footer-container {
    width: 80%;
    max-width: 1400px;
    margin: auto;
    padding: 0 var(--spacing-xl);
}

/* === РЯДОК 1: ЛОГОТИП + CTA === */
footer.site-footer .footer-header {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 30px;
}

footer.site-footer .footer-logo-container {
    height: 60px;
    display: flex;
    align-items: flex-start;
    flex: 0 0 40%;
    align-self: flex-start;
}

footer.site-footer .footer-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    object-position: left center;
    filter: none;
    display: block;
}

footer.site-footer .footer-cta {
    font-size: 18px;
    font-family: 'Roboto', sans-serif;
    line-height: 1.3;
    color: #ffffff;
    margin: 0;
    text-align: left;
    flex: 0 0 50%;
    align-self: flex-start;
    white-space: nowrap;
}

/* === РЯДОК 2: СОЦІАЛЬНІ ЗЛІВА | КОНТАКТИ СПРАВА === */
footer.site-footer .footer-social-contacts {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 30px;
    margin-bottom: 15px;
}

/* Група соціальних мереж - 40% */
footer.site-footer .footer-social-group {
    display: flex;
    flex-direction: row;
    gap: 6px;
    flex: 0 0 40%;
    align-items: flex-start;
}

/* Соціальні кнопки */
footer.site-footer .social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px;
    flex: 0 0 auto;
    background: #171717;
    border: none;
    border-radius: 5px;
    color: #ffffff;
    text-decoration: none;
    font-size: 10px;
    font-family: 'Roboto', sans-serif;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

footer.site-footer .social-link:hover,
footer.site-footer .social-link:active {
    background: rgba(255, 255, 255, 0.1);
}

footer.site-footer .social-link:hover .social-icon,
footer.site-footer .social-link:active .social-icon {
    color: #ffffff;
}

/* Instagram hover/active - червоно-рожевий */
footer.site-footer .social-link[href*="instagram"]:hover .social-icon,
footer.site-footer .social-link[href*="instagram"]:active .social-icon {
    color: #E4405F;
}

/* Facebook hover/active - синій Facebook */
footer.site-footer .social-link[href*="facebook"]:hover .social-icon,
footer.site-footer .social-link[href*="facebook"]:active .social-icon {
    color: #1877F2;
}

/* Telegram hover/active - синій */
footer.site-footer .social-link[href*="t.me"]:hover .social-icon,
footer.site-footer .social-link[href*="t.me"]:active .social-icon {
    color: #0088cc;
}

footer.site-footer .social-icon {
    width: 22px;
    height: 22px;
    flex-shrink: 0;
    transition: color 0.3s ease;
}

/* Збільшуємо тільки іконку Telegram */
footer.site-footer .social-link[href*="t.me"] .social-icon {
    width: 26px;
    height: 26px;
}

/* Група контактів - 50% */
footer.site-footer .footer-contacts-group {
    display: flex;
    flex-direction: row;
    gap: 12px;
    flex-wrap: wrap;
    align-items: flex-start;
    padding-top: 15px;
}

/* Контакти */
footer.site-footer .contact-item {
    display: flex;
    align-items: baseline;
    gap: 4px;
    white-space: nowrap;
}

footer.site-footer .contact-label {
    font-size: 10px;
    font-family: 'Roboto', sans-serif;
    color: rgba(255, 255, 255, 0.6);
}

footer.site-footer .contact-link {
    font-size: 11.3px;
    font-family: 'Roboto', sans-serif;
    color: #ffffff;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer.site-footer .contact-link:hover {
    color: rgba(255, 255, 255, 0.8);
}

/* === РЯДОК 3: ФОРМА + COPYRIGHT === */
footer.site-footer .footer-bottom {
    display: flex;
    justify-content: flex-start;
    align-items: flex-start;
    gap: 30px;
    padding-top: 0;
    margin-bottom: 10px;
}

footer.site-footer .footer-newsletter {
    flex: 0 0 40%;
    align-self: flex-start;
}

footer.site-footer .newsletter-title {
    font-size: 15px;
    font-family: 'Roboto', sans-serif;
    color: rgba(255, 255, 255, 0.8);
    margin: 0 0 6px 0;
    font-weight: 400;
    text-align: left;
}

footer.site-footer .newsletter-form {
    display: flex;
    gap: 6px;
    position: relative;
}

footer.site-footer .newsletter-input {
    flex: 1;
    padding: 6px 10px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    color: #ffffff;
    font-size: 11px;
    font-family: 'Roboto', sans-serif;
    font-family: inherit;
    min-height: 32px;
    transition: border-color 0.3s ease, background 0.3s ease;
}

footer.site-footer .newsletter-input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

footer.site-footer .newsletter-input:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.1);
}

footer.site-footer .newsletter-button {
    padding: 6px 14px;
    background: #e9e9e9;
    color: #000000;
    border: none;
    border-radius: 5px;
    font-size: 11px;
    font-family: 'Roboto', sans-serif;
    font-weight: 500;
    text-transform: lowercase;
    cursor: pointer;
    transition: background 0.3s ease;
    white-space: nowrap;
    min-height: 32px;
    font-family: inherit;
}

footer.site-footer .newsletter-button:hover {
    background: rgba(255, 255, 255, 0.9);
}

footer.site-footer .newsletter-button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

footer.site-footer .form-message {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 5px;
    padding: 6px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-family: 'Roboto', sans-serif;
    display: none;
}

footer.site-footer .form-message.success {
    background: rgba(76, 175, 80, 0.1);
    color: #66BB6A;
    border: 1px solid rgba(76, 175, 80, 0.3);
    display: block;
}

footer.site-footer .form-message.error {
    background: rgba(244, 67, 54, 0.1);
    color: #EF5350;
    border: 1px solid rgba(244, 67, 54, 0.3);
    display: block;
}

footer.site-footer .footer-legal {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 30px;
    flex: 0 0 50%;
    flex-wrap: nowrap;
    align-self: center;
    min-height: 32px;
    padding-top: 20px;
}

footer.site-footer .footer-copyright {
    font-size: 10px;
    font-family: 'Roboto', sans-serif;
    color: rgba(255, 255, 255, 0.5);
    margin: 0;
    white-space: nowrap;
    text-align: left;
}

footer.site-footer .footer-links {
    display: flex;
    gap: 25px;
    flex-wrap: nowrap;
    align-items: center;
}

footer.site-footer .footer-link {
    font-size: 10px;
    font-family: 'Roboto', sans-serif;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    transition: color 0.3s ease;
    white-space: nowrap;
    text-align: left;
}

footer.site-footer .footer-link:hover {
    color: #ffffff;
}

/* === RESPONSIVE === */

@media (max-width: 1199px) {
    footer.site-footer .footer-social-contacts {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    footer.site-footer .footer-social-group {
        flex: 0 0 auto;
        width: auto;
        justify-content: center;
    }

    footer.site-footer .footer-contacts-group {
        flex: 0 0 auto;
        width: auto;
        justify-content: center;
        flex-wrap: wrap;
    }
}

@media (max-width: 991px) {
    footer.site-footer .footer-header {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    footer.site-footer .footer-logo-container {
        flex: 0 0 auto;
        width: auto;
        align-items: center;
        justify-content: center;
    }

    footer.site-footer .footer-logo {
        object-position: center center;
    }

    footer.site-footer .footer-cta {
        flex: 0 0 auto;
        width: 100%;
        max-width: 500px;
        text-align: center;
        white-space: normal;
    }

    footer.site-footer .footer-bottom {
        align-items: center;
        gap: 40px;
    }

    footer.site-footer .footer-newsletter {
        flex: 0 0 auto;
        width: 100%;
        max-width: 500px;
    }

    footer.site-footer .newsletter-title {
        font-size: 9px;
        text-align: center;
    }

    footer.site-footer .footer-legal {
        flex: 0 0 auto;
        width: auto;
        justify-content: center;
        padding-top: 0;
    }
}

@media (max-width: 767px) {
    footer.site-footer {
        padding: 20px 0 90px;
    }
    
    footer.site-footer .footer-container {
        padding: 0 20px;
    }
    
    footer.site-footer .footer-header {
        margin-bottom: 15px;
        flex-direction: column;
        align-items: center;
    }
    
    footer.site-footer .footer-logo-container {
        height: 45px;
        display: flex;
        justify-content: center;
        align-items: center;
        width: 100%;
    }
    
    footer.site-footer .footer-logo {
        height: 30px;
    }

    footer.site-footer .footer-social-contacts {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 20px;
    }

    footer.site-footer .footer-social-group {
        flex-direction: row;
        justify-content: center;
        align-items: center;
        gap: 12px;
        flex: 0 0 auto;
        width: auto;
    }

    footer.site-footer .social-link {
        width: auto;
        flex: 0 1 auto;
    }

    footer.site-footer .footer-contacts-group {
        flex-direction: column;
        align-items: flex-start;
        justify-content: center;
        gap: 7.2px; /* Зменшено на 10% з 8px */
        width: auto;
        padding-top: 13.5px; /* Зменшено на 10% з базового 15px */
    }

    footer.site-footer .contact-item {
        flex-direction: row;
        align-items: center;
        justify-content: flex-start;
        gap: 4px;
        width: auto;
        flex-wrap: wrap; /* Переносить тільки якщо не вміщається */
        min-width: 0; /* Дозволяє стискатися */
    }

    footer.site-footer .contact-label {
        font-size: 8px; /* Зменшено на 2px з базового 10px для мобільних */;
        font-family: 'Roboto', sans-serif;
    }

    footer.site-footer .contact-link {
        font-size: 9.3px; /* Зменшено на 2px з базового 11.3px */;
        font-family: 'Roboto', sans-serif;
        word-break: break-word; /* М'який перенос */
        overflow-wrap: break-word;
        min-width: 0;
    }

    footer.site-footer .footer-newsletter {
        max-width: 45%;
    }

    footer.site-footer .newsletter-title {
        font-size: 9px;
    }

    footer.site-footer .newsletter-form {
        flex-direction: column;
    }

    footer.site-footer .newsletter-button {
        width: 100%;
    }

    footer.site-footer .footer-legal {
        width: auto;
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 1px;
    }

    footer.site-footer .footer-copyright {
        text-align: center;
    }

    footer.site-footer .footer-links {
        flex-direction: row;
        gap: 10px;
        align-items: flex-start;
        justify-content: center;
    }
}

/* === ПЛАНШЕТНА АДАПТАЦІЯ (Синхронізовано з content-width) === */
@media (min-width: 768px) and (max-width: 1024px) {
    footer.site-footer .footer-container {
        width: 90%;
        padding: 0 var(--spacing-lg);
    }
}

/* === МОБІЛЬНА АДАПТАЦІЯ (Синхронізовано з content-width) === */
@media (max-width: 767px) {
    footer.site-footer .footer-container {
        width: 95%;
        padding: 0 var(--spacing-md);
    }
}

@media (max-width: 767px) {
    footer.site-footer .footer-container {
        width: 95%;
        padding: 0 var(--spacing-sm);
    }
    
    footer.site-footer .footer-logo-container {
        height: 45px;
        justify-content: center;
        width: auto;
    }
    
    footer.site-footer .footer-logo {
        height: 30px;
    }
    
    footer.site-footer .footer-links {
        flex-direction: column;
        gap: 8px;
    }
}

/* === COPYRIGHT BLOCK (в самому низу) === */
footer.site-footer .footer-copyright-block {
    text-align: center;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

@media (max-width: 767px) {
    footer.site-footer .footer-copyright-block {
        margin-top: 15px;
        padding-top: 10px;
    }
}