/* BuyExpress Footer Styles with RTL/LTR Support */
:root {
    --primary-color: #287e9f;
    --secondary-color: #c9615e;
}

.custom-footer {
    background: linear-gradient(135deg, var(--primary-color) 0%, #2a8ba8 50%, #2d98b1 100%);
    color: white;
    padding: 40px 0 20px;
    margin-top: 50px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Main Footer Content */
.footer-columns {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 50px;
}

.footer-column h3 {
    color: #fff;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.3);
    position: relative;
}

.footer-column h3:after {
    content: '';
    position: absolute;
    bottom: -2px;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, var(--secondary-color), var(--primary-color));
}

.footer-column ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-column li {
    margin-bottom: 12px;
}

.footer-column a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s ease;
    font-size: 14px;
    line-height: 1.5;
    display: block;
}

.footer-column a:hover {
    color: #fff;
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.5);
}

/* Social Media Section */
.footer-social {
    text-align: center;
    margin-bottom: 40px;
}

.social-icons {
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.social-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.social-icon:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transform: translateX(-100%);
    transition: transform 0.6s;
}

.social-icon:hover:before {
    transform: translateX(100%);
}

.social-icon:hover {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
}

.social-icon.facebook { background: linear-gradient(45deg, #3b5998, #4c70ba); }
.social-icon.telegram { background: linear-gradient(45deg, #0088cc, #00a8cc); }
.social-icon.instagram { background: linear-gradient(45deg, #e4405f, #fd5949, #fccc63); }
.social-icon.youtube { background: linear-gradient(45deg, #ff0000, #cc0000); }
.social-icon.tiktok { background: linear-gradient(45deg, #000000, #333333); }
.social-icon.whatsapp { background: linear-gradient(45deg, #25d366, #128c7e); }

.social-icon i {
    color: white;
    font-size: 20px;
    z-index: 1;
}

/* RTL (Right-to-Left) - Hebrew/Arabic */
body[dir="rtl"] .custom-footer,
[dir="rtl"] .custom-footer {
    text-align: right;
    direction: rtl;
}

[dir="rtl"] .footer-container {
    padding-left: 0;
    padding-right: 20px;
}

[dir="rtl"] .footer-column {
    text-align: right;
}

[dir="rtl"] .footer-column h3 {
    text-align: right;
}

[dir="rtl"] .footer-column h3:after {
    right: 0;
    left: auto;
}

[dir="rtl"] .footer-column a:hover {
    transform: translateX(-5px);
}

[dir="rtl"] .newsletter-wrapper {
    direction: rtl;
}

[dir="rtl"] .newsletter-input {
    border-radius: 0 8px 8px 0;
    text-align: right;
}

[dir="rtl"] .newsletter-btn {
    border-radius: 8px 0 0 8px;
}

[dir="rtl"] .social-icons {
    direction: rtl;
}

/* LTR (Left-to-Right) - English/European */
body[dir="ltr"] .custom-footer,
[dir="ltr"] .custom-footer {
    text-align: left;
    direction: ltr;
}

[dir="ltr"] .footer-container {
    padding-right: 0;
    padding-left: 20px;
}

[dir="ltr"] .footer-column {
    text-align: left;
}

[dir="ltr"] .footer-column h3 {
    text-align: left;
}

[dir="ltr"] .footer-column h3:after {
    left: 0;
    right: auto;
}

[dir="ltr"] .footer-column a:hover {
    transform: translateX(5px);
}

[dir="ltr"] .newsletter-wrapper {
    direction: ltr;
}

[dir="ltr"] .newsletter-input {
    border-radius: 8px 0 0 8px;
    text-align: left;
}

[dir="ltr"] .newsletter-btn {
    border-radius: 0 8px 8px 0;
}

[dir="ltr"] .social-icons {
    direction: ltr;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .newsletter-wrapper {
        flex-direction: column;
        gap: 10px;
    }

    .newsletter-input,
    .newsletter-btn {
        border-radius: 8px;
    }

    .social-icons {
        gap: 15px;
    }

    /* Mobile Collapsible Footer Columns */
    .footer-column {
        border-bottom: 1px solid rgba(255, 255, 255, 0.3);
        margin-bottom: 0;
    }

    .footer-column:last-child {
        border-bottom: none;
    }

    .footer-column h3 {
        margin: 0;
        padding: 18px 0;
        background: transparent;
        border-bottom: none;
        cursor: pointer;
        position: relative;
        display: flex;
        justify-content: center;
        align-items: center;
        transition: all 0.3s ease;
        font-size: 16px;
        user-select: none;
        text-align: center;
    }

    .footer-column h3:hover {
        opacity: 0.8;
        background: rgba(255, 255, 255, 0.05);
    }

    .footer-column h3:after {
        display: none; /* Hide desktop after element */
    }

    /* Mobile Dropdown Indicator - Plus/Minus */
    .footer-column h3::before {
        content: '+';
        position: absolute;
        right: 20px;
        font-size: 18px;
        font-weight: bold;
        color: rgba(255, 255, 255, 0.8);
        transition: all 0.3s ease;
        line-height: 1;
    }

    .footer-column.mobile-expanded h3::before {
        content: '−';
    }

    /* RTL Support - indicator on left */
    [dir="rtl"] .footer-column h3::before {
        right: auto;
        left: 20px;
    }

    /* Hide other indicators */
    .footer-column h3::after {
        display: none;
    }

    .footer-column.mobile-expanded h3::before {
        transform: rotate(180deg);
    }

    /* Mobile Column Content */
    .footer-column ul {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.4s ease;
        padding: 0;
        background: transparent;
        opacity: 0;
    }

    .footer-column.mobile-expanded ul {
        max-height: 500px;
        padding: 10px 0 20px 0;
        opacity: 1;
        transition: max-height 0.4s ease, opacity 0.3s ease 0.1s;
    }

    .footer-column li {
        margin-bottom: 10px;
        padding: 0;
    }

    .footer-column a {
        padding: 8px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        font-size: 14px;
        display: block;
        transition: all 0.3s ease;
    }

    .footer-column a:hover {
        transform: none;
        color: rgba(255, 255, 255, 1);
        background: rgba(255, 255, 255, 0.1);
        padding-left: 10px;
    }

    /* RTL Mobile Hover */
    [dir="rtl"] .footer-column a:hover {
        padding-right: 10px;
        padding-left: 0;
    }

    /* RTL Mobile */
    body[dir="rtl"] .custom-footer,
    [dir="rtl"] .custom-footer {
        text-align: right;
        padding-left: 0;
        padding-right: 15px;
    }

    /* LTR Mobile */
    body[dir="ltr"] .custom-footer,
    [dir="ltr"] .custom-footer {
        text-align: left;
        padding-right: 0;
        padding-left: 15px;
    }

    /* Force collapsed state */
    .footer-column:not(.mobile-expanded) ul {
        max-height: 0 !important;
        opacity: 0 !important;
        padding: 0 !important;
        overflow: hidden !important;
    }

    .footer-column:not(.mobile-expanded) h3::before {
        transform: rotate(0deg) !important;
    }
}

@media (max-width: 480px) {
    .footer-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .footer-container {
        padding: 0 15px;
    }

    .newsletter-section {
        padding: 20px;
    }

    .social-icon {
        width: 45px;
        height: 45px;
    }

    .social-icon i {
        font-size: 18px;
    }
}

/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.footer-column {
    animation: fadeInUp 0.6s ease-out;
}

.footer-column:nth-child(1) { animation-delay: 0.1s; }
.footer-column:nth-child(2) { animation-delay: 0.2s; }
.footer-column:nth-child(3) { animation-delay: 0.3s; }
.footer-column:nth-child(4) { animation-delay: 0.4s; }
.footer-column:nth-child(5) { animation-delay: 0.5s; }