/* ========================================
   Footer CSS - تصميم الفوتر الاحترافي
   الألوان الأساسية محفوظة
======================================== */

:root {
    --primary-orange: #e24424;
    --secondary-orange: #FF7F50;
    --footer-dark: #1a1a2e;
    --footer-darker: #16162a;
    --footer-accent: #0f3460;
    --white: #ffffff;
    --light-text: #b8b8b8;
    --transition: all 0.3s ease;
}

/* ========== Main Footer ========== */
.site-footer {
    background: linear-gradient(180deg, var(--footer-dark), var(--footer-darker));
    color: var(--light-text);
    font-size: 14px;
    direction: rtl;
}

/* ========== Footer Top Section ========== */
.footer-top {
    padding: 60px 0 40px;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 40px;
}

/* ========== Footer Widget ========== */
.footer-widget {
    padding: 0 10px;
}

.footer-widget-title {
    color: var(--white);
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 25px;
    padding-bottom: 15px;
    position: relative;
}

.footer-widget-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-orange), var(--secondary-orange));
    border-radius: 2px;
}

/* ========== About Widget ========== */
.footer-about-text {
    line-height: 1.8;
    margin-bottom: 20px;
}

.footer-logo {
    margin-bottom: 20px;
}

.footer-logo img {
    max-height: 80px;
    width: auto;
    display: block;
    background: #fff;
    padding: 10px 15px;
    border-radius: 8px;
}

/* ========== Links Widget ========== */
.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--light-text);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    padding: 5px 0;
}

.footer-links a::before {
    content: '\f104';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: var(--primary-orange);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--white);
    padding-right: 10px;
}

.footer-links a:hover::before {
    color: var(--secondary-orange);
}

/* ========== Contact Widget ========== */
.footer-contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-contact-list li {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 18px;
}

.footer-contact-list li i {
    width: 40px;
    height: 40px;
    background: rgba(226, 68, 36, 0.15);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-orange);
    font-size: 16px;
    flex-shrink: 0;
}

.footer-contact-list li .contact-info {
    flex: 1;
}

.footer-contact-list li .contact-label {
    color: var(--white);
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 4px;
}

.footer-contact-list li .contact-value {
    color: var(--light-text);
    font-size: 14px;
}

.footer-contact-list li .contact-value a {
    color: var(--light-text);
    text-decoration: none;
    transition: var(--transition);
}

.footer-contact-list li .contact-value a:hover {
    color: var(--primary-orange);
}

.footer-contact-list li .contact-value a[href^="tel:"],
.footer-contact-list li .contact-value a[href^="https://wa.me"] {
    direction: ltr;
    unicode-bidi: embed;
    display: inline-block;
}

/* ========== Newsletter Widget ========== */
.footer-newsletter-text {
    margin-bottom: 20px;
    line-height: 1.7;
}

.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.newsletter-form input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid transparent;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.08);
    color: var(--white);
    font-size: 14px;
    transition: var(--transition);
}

.newsletter-form input::placeholder {
    color: #888;
}

.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary-orange);
    background: rgba(255, 255, 255, 0.12);
}

.newsletter-form button {
    width: 100%;
    padding: 14px 25px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--primary-orange), var(--secondary-orange));
    color: var(--white);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.newsletter-form button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(226, 68, 36, 0.3);
}

.newsletter-form button i {
    font-size: 14px;
}

/* ========== Social Links ========== */
.footer-social {
    margin-top: 25px;
}

.footer-social-title {
    color: var(--white);
    font-size: 14px;
    margin-bottom: 15px;
}

.footer-social-links {
    display: flex;
    gap: 10px;
}

.footer-social-links a {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-size: 16px;
    transition: var(--transition);
}

.footer-social-links a:hover {
    transform: translateY(-4px);
}

.footer-social-links a.facebook:hover {
    background: #1877f2;
}

.footer-social-links a.twitter:hover {
    background: #1da1f2;
}

.footer-social-links a.youtube:hover {
    background: #ff0000;
}

.footer-social-links a.instagram:hover {
    background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888);
}

.footer-social-links a.linkedin:hover {
    background: #0077b5;
}

.footer-social-links a.whatsapp:hover {
    background: #25d366;
}

/* ========== Footer Bottom ========== */
.footer-bottom {
    background: var(--footer-darker);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 20px 0;
}

.footer-bottom-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.footer-copyright {
    color: #888;
    font-size: 13px;
}

.footer-copyright span {
    color: var(--primary-orange);
    font-weight: 600;
}

.footer-bottom-links {
    display: flex;
    gap: 25px;
}

.footer-bottom-links a {
    color: #888;
    text-decoration: none;
    font-size: 13px;
    transition: var(--transition);
}

.footer-bottom-links a:hover {
    color: var(--primary-orange);
}

/* ========== Back to Top ========== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    left: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-orange), var(--secondary-orange));
    color: var(--white);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
    z-index: 999;
    box-shadow: 0 4px 15px rgba(226, 68, 36, 0.4);
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(226, 68, 36, 0.5);
}

/* ========== Responsive ========== */
@media (max-width: 991px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
    
    .footer-top {
        padding: 40px 0 30px;
    }
}

@media (max-width: 576px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    
    .footer-widget {
        text-align: right;
        padding: 0;
        border-bottom: 1px solid rgba(255,255,255,0.1);
    }
    
    .footer-widget:first-child {
        border-bottom: none;
        padding-bottom: 20px;
        margin-bottom: 10px;
    }
    
    .footer-widget:first-child .footer-logo,
    .footer-widget:first-child .footer-about-text,
    .footer-widget:first-child .footer-social {
        display: block;
    }
    
    .footer-widget-title {
        cursor: pointer;
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 15px 0;
        margin-bottom: 0;
    }
    
    .footer-widget-title::after {
        display: none;
    }
    
    .footer-widget-title::before {
        content: '\f107';
        font-family: 'Font Awesome 5 Free';
        font-weight: 900;
        transition: transform 0.3s ease;
        order: -1;
        margin-left: 10px;
    }
    
    .footer-widget.active .footer-widget-title::before {
        transform: rotate(180deg);
    }
    
    .footer-widget-content {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease, padding 0.3s ease;
        padding: 0;
    }
    
    .footer-widget.active .footer-widget-content {
        max-height: 500px;
        padding-bottom: 20px;
    }
    
    .footer-links,
    .footer-contact-list,
    .newsletter-form,
    .footer-newsletter-text {
        opacity: 0;
        transition: opacity 0.3s ease;
    }
    
    .footer-widget.active .footer-links,
    .footer-widget.active .footer-contact-list,
    .footer-widget.active .newsletter-form,
    .footer-widget.active .footer-newsletter-text {
        opacity: 1;
    }
    
    .footer-links a {
        justify-content: flex-start;
    }
    
    .footer-contact-list li {
        flex-direction: row;
        align-items: center;
        text-align: right;
    }
    
    .footer-social-links {
        justify-content: center;
    }
    
    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-bottom-links {
        justify-content: center;
    }
    
    .back-to-top {
        bottom: 20px;
        left: 20px;
        width: 45px;
        height: 45px;
    }
}
