/* ============================================
   FOOTER RESPONSIVE STYLES
   Dedicated file for footer mobile responsiveness
   Loaded after style.css and responsive-layout-fixes.css
   ============================================ */

/* --- Large Tablets / Small Desktops (≤1024px) --- */
@media (max-width: 1024px) {
    .site-footer {
        padding: 40px 24px 30px !important;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr 1fr !important;
        gap: 32px !important;
    }

    .footer-brand__logo-icon {
        width: 320px !important;
        height: auto !important;
    }

    .footer-brand__header {
        margin-bottom: 16px !important;
    }

    .footer-col__title {
        margin-bottom: 18px !important;
        margin-right: 0 !important;
    }

    .footer-socials {
        margin-top: 0 !important;
    }

    .footer-middle {
        margin-top: 0 !important;
        gap: 24px !important;
    }

    .footer-contacts-header {
        margin-top: 0 !important;
        margin-bottom: 20px !important;
    }

    .footer-contacts-header h4 {
        margin-right: 0 !important;
    }
}

/* --- Tablets (≤768px) --- */
@media (max-width: 768px) {
    .site-footer {
        padding: 36px 20px 24px !important;
    }

    .footer-top {
        grid-template-columns: 1fr 1fr 1fr !important;
        gap: 28px !important;
        margin-bottom: 32px !important;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-brand__logo-icon {
        width: 260px !important;
        height: auto !important;
    }

    .footer-newsletter__form {
        flex-wrap: wrap;
        gap: 10px !important;
    }

    .footer-newsletter__input {
        min-width: 200px;
        width: 100%;
    }

    .footer-newsletter__btn {
        width: 100%;
        padding: 12px 20px !important;
    }

    .footer-col__title {
        font-size: 11px !important;
        margin-bottom: 16px !important;
    }

    .footer-links li {
        margin-bottom: 10px !important;
    }

    .footer-contacts-header {
        text-align: left !important;
        margin-bottom: 16px !important;
    }

    .footer-contacts-header h4 {
        margin-right: 0 !important;
    }

    .footer-middle {
        flex-direction: column !important;
        gap: 20px !important;
        padding-top: 20px !important;
        margin-bottom: 28px !important;
        margin-top: 0 !important;
    }

    .footer-contacts-left,
    .footer-contacts-right {
        flex: none !important;
        width: 100%;
    }

    .contact-item {
        gap: 10px !important;
    }

    .contact-item__icon {
        font-size: 18px !important;
        margin-top: 2px !important;
    }

    .contact-item__text {
        font-size: 13px !important;
    }

    .footer-socials {
        margin-top: 0 !important;
        gap: 12px !important;
    }

    .footer-social-link {
        width: 48px !important;
        height: 48px !important;
        font-size: 18px !important;
    }

    .footer-social-link i {
        font-size: 24px !important;
    }

    .footer-bottom {
        flex-direction: column !important;
        gap: 16px !important;
        height: auto !important;
        padding-top: 16px !important;
        text-align: center !important;
    }

    .footer-copyright {
        font-size: 11px !important;
    }

    .payment-pill {
        padding: 8px 16px !important;
    }

    .payment-icon {
        height: 18px !important;
    }
}

/* --- Mobile (≤576px) --- */
@media (max-width: 576px) {
    .site-footer {
        padding: 32px 16px 20px !important;
    }

    .footer-top {
        grid-template-columns: 1fr !important;
        gap: 24px !important;
        margin-bottom: 28px !important;
    }

    .footer-brand__header {
        margin-bottom: 12px !important;
    }

    .footer-brand__logo-icon {
        width: 200px !important;
        height: auto !important;
    }

    .footer-des {
        font-size: 13px !important;
        margin-bottom: 20px !important;
    }

    .footer-newsletter__text {
        font-size: 12px !important;
        margin-bottom: 12px !important;
    }

    .footer-newsletter__form {
        flex-direction: column !important;
        gap: 8px !important;
        margin-bottom: 20px !important;
    }

    .footer-newsletter__input,
    .footer-newsletter__btn {
        width: 100% !important;
        border-radius: 6px !important;
    }

    .footer-col {
        text-align: center;
    }

    .footer-col__title {
        margin-bottom: 14px !important;
        font-size: 12px !important;
    }

    .footer-links {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
        gap: 8px 16px;
    }

    .footer-links li {
        margin-bottom: 0 !important;
    }

    .footer-links a {
        font-size: 13px !important;
    }

    .footer-contacts-header {
        text-align: center !important;
        margin-bottom: 14px !important;
    }

    .footer-middle {
        gap: 16px !important;
        padding-top: 16px !important;
        margin-bottom: 24px !important;
    }

    .footer-contacts-left .contact-item,
    .footer-contacts-right .contact-item {
        justify-content: center;
        text-align: center;
        flex-direction: column;
        align-items: center;
        gap: 6px !important;
    }

    .contact-item__icon {
        margin-top: 0 !important;
        font-size: 20px !important;
    }

    .contact-item__text {
        font-size: 12px !important;
        line-height: 1.4 !important;
    }

    .footer-socials {
        justify-content: center;
        gap: 14px !important;
    }

    .footer-social-link {
        width: 44px !important;
        height: 44px !important;
    }

    .footer-social-link i {
        font-size: 22px !important;
    }

    .footer-bottom {
        gap: 12px !important;
        padding-top: 14px !important;
    }

    .footer-copyright {
        font-size: 11px !important;
        line-height: 1.4 !important;
    }

    .payment-pill {
        padding: 6px 14px !important;
        border-radius: 30px !important;
    }

    .payment-icon {
        height: 16px !important;
    }
}

/* --- Small Mobile (≤480px) --- */
@media (max-width: 480px) {
    .site-footer {
        padding: 28px 14px 18px !important;
    }

    .footer-brand__logo-icon {
        width: 180px !important;
    }

    .footer-des {
        font-size: 12px !important;
    }

    .footer-newsletter__text {
        font-size: 11px !important;
    }

    .footer-col__title {
        font-size: 11px !important;
    }

    .footer-links a {
        font-size: 12px !important;
    }

    .contact-item__text {
        font-size: 11px !important;
    }

    .footer-copyright {
        font-size: 10px !important;
    }
}

/* --- Extra Small Mobile (≤360px) --- */
@media (max-width: 360px) {
    .site-footer {
        padding: 24px 12px 16px !important;
    }

    .footer-brand__logo-icon {
        width: 160px !important;
    }

    .footer-top {
        gap: 20px !important;
    }

    .footer-social-link {
        width: 40px !important;
        height: 40px !important;
    }

    .footer-social-link i {
        font-size: 20px !important;
    }

    .payment-pill {
        padding: 6px 10px !important;
    }

    .payment-icon {
        height: 14px !important;
    }
}

/* --- Footer Categories and Policy Split Layout --- */
.footer-categories-wrapper,
.footer-policy-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.footer-categories-left,
.footer-categories-right,
.footer-policy-left,
.footer-policy-right {
    width: 100%;
}

.footer-categories-left ul,
.footer-categories-right ul,
.footer-policy-left ul,
.footer-policy-right ul {
    padding-left: 0;
    list-style: none;
    margin: 0;
}

/* --- Scroll to Top Button --- */
.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: var(--primary-color, #e74c3c);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
}

.scroll-to-top:hover {
    background-color: var(--primary-color-hover, #c0392b);
    transform: translateY(-3px);
}

.scroll-to-top:active {
    transform: translateY(-1px);
}

/* --- Mobile Split Layout for Categories and Policy --- */
@media (max-width: 576px) {
    .footer-categories-wrapper,
    .footer-policy-wrapper {
        flex-direction: row;
        gap: 12px;
    }

    .footer-categories-left,
    .footer-categories-right,
    .footer-policy-left,
    .footer-policy-right {
        width: 50%;
    }

    .footer-categories-left ul,
    .footer-categories-right ul,
    .footer-policy-left ul,
    .footer-policy-right ul {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .footer-categories-left ul li,
    .footer-categories-right ul li,
    .footer-policy-left ul li,
    .footer-policy-right ul li {
        margin-bottom: 0;
    }
}

/* --- Scroll to Top Button Mobile Adjustments --- */
@media (max-width: 576px) {
    .scroll-to-top {
        bottom: 20px;
        right: 20px;
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .scroll-to-top {
        bottom: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 18px;
    }
}

/* --- Combined Categories and Policy Column --- */
.footer-col-combined {
    grid-column: span 1;
}

.footer-combined-wrapper {
    display: flex;
    gap: 40px;
}

.footer-combined-section {
    flex: 1;
}

.footer-combined-section .footer-col__title {
    margin-bottom: 16px;
}

/* Responsive adjustments for combined column */
@media (max-width: 1024px) {
    .footer-combined-wrapper {
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .footer-col-combined {
        grid-column: 1 / -1;
    }

    .footer-combined-wrapper {
        flex-direction: column;
        gap: 24px;
    }

    .footer-combined-section {
        width: 100%;
    }
}

@media (max-width: 576px) {
    .footer-combined-wrapper {
        gap: 20px;
    }

    .footer-combined-section .footer-col__title {
        margin-bottom: 12px;
    }
}


/* --- Mobile Split Layout for Categories and Policy --- */
@media (max-width: 576px) {
    .footer-categories-wrapper,
    .footer-policy-wrapper {
        flex-direction: row;
        gap: 12px;
    }

    .footer-categories-left,
    .footer-categories-right,
    .footer-policy-left,
    .footer-policy-right {
        width: 50%;
    }

    .footer-categories-left ul,
    .footer-categories-right ul,
    .footer-policy-left ul,
    .footer-policy-right ul {
        display: flex;
        flex-direction: column;
        gap: 8px;
    }

    .footer-categories-left ul li,
    .footer-categories-right ul li,
    .footer-policy-left ul li,
    .footer-policy-right ul li {
        margin-bottom: 0;
    }
}
