/* روابط تحميل الهاتف بأسفل الفوتر */
.footer-app-mobile-row {
    display: none;
}
.footer-app-mobile-links {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    /* إظهار روابط تحميل الهاتف فقط في الهاتف */
    .footer-app-mobile-row {
        display: flex;
        flex-direction: row;
        justify-content: center;
        align-items: center;
        margin-bottom: 8px;
    }
    .footer-app-mobile-links {
        flex-wrap: wrap;
        gap: 8px;
    }
    /* إخفاء روابط تحميل الكمبيوتر (داخل الفوتر العادي) */
    .footer-section .app-install-box,
    .footer-section .app-install-links-grid {
        display: none !important;
    }
    /* أيقونات التواصل في صف مع سكرول أفقي عند overflow */
    .social-links {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        justify-content: flex-start;
        scrollbar-width: thin;
    }
    .social-link {
        flex: 0 0 auto;
    }
}
/* ===========================================
   Mada Platform - Footer Component
   Grid Layout, Social Links, Responsive
   =========================================== */

/* Site Footer */
.site-footer {
    background: linear-gradient(135deg, #0b1120 0%, #111827 60%, #0b1120 100%);
    color: white;
    padding: 60px 0 30px;
    margin-top: 80px;
    width: 100%;
    max-width: 100%;
    overflow-x: clip;
}

.footer-container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
    width: 100%;
    min-width: 0;
}

/* Footer Grid */
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
    width: 100%;
    min-width: 0;
}

/* Footer Sections */
.footer-section h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: white;
    position: relative;
    padding-bottom: 10px;
}

.footer-section h4::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, #2f5bff, #12b6a6);
    border-radius: 2px;
}

.footer-section p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    font-size: 0.95rem;
}

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

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

.footer-section ul li a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-section ul li a:hover {
    color: #f6c56b;
    transform: translateX(-5px);
}

.footer-section {
    min-width: 0;
}

/* Social Links */
.social-links {
    display: flex;
    gap: 12px;
    margin-top: 20px;
}

.social-link {
    --social-brand: #38bdf8;
    --social-brand-soft: rgba(56, 189, 248, 0.35);
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.social-link-icon {
    width: 20px;
    height: 20px;
    object-fit: contain;
    display: block;
}

.social-link:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(2, 6, 23, 0.32);
}

.social-link-brand-facebook {
    --social-brand: #1877f2;
    --social-brand-soft: rgba(24, 119, 242, 0.35);
}

.social-link-brand-instagram {
    --social-brand: #e4405f;
    --social-brand-soft: rgba(228, 64, 95, 0.35);
}

.social-link-brand-x {
    --social-brand: #0f172a;
    --social-brand-soft: rgba(100, 116, 139, 0.4);
}

.social-link-brand-youtube {
    --social-brand: #ff0000;
    --social-brand-soft: rgba(239, 68, 68, 0.38);
}

.social-link-brand-tiktok {
    --social-brand: #25f4ee;
    --social-brand-soft: rgba(244, 63, 94, 0.38);
}

.social-link-brand-telegram {
    --social-brand: #26a5e4;
    --social-brand-soft: rgba(56, 189, 248, 0.36);
}

.social-link-brand-whatsapp {
    --social-brand: #25d366;
    --social-brand-soft: rgba(34, 197, 94, 0.4);
}

.social-link-brand-link {
    --social-brand: #38bdf8;
    --social-brand-soft: rgba(56, 189, 248, 0.36);
}

.social-link-style-flat {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(15, 23, 42, 0.68);
}

.social-link-style-flat:hover {
    border-color: var(--social-brand-soft);
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.8), var(--social-brand-soft));
}

.social-link-style-circle {
    border-radius: 999px;
    border-color: var(--social-brand-soft);
    background: rgba(15, 23, 42, 0.76);
}

.social-link-style-circle:hover {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.88), var(--social-brand-soft));
}

.social-link-style-square {
    border-radius: 7px;
    border-color: var(--social-brand-soft);
    background: rgba(15, 23, 42, 0.8);
}

.social-link-style-square:hover {
    background: linear-gradient(130deg, rgba(15, 23, 42, 0.86), var(--social-brand-soft));
}

.social-link-style-glass {
    border-color: rgba(255, 255, 255, 0.4);
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.27) 0%, rgba(15, 23, 42, 0.4) 100%);
    backdrop-filter: blur(8px);
}

.social-link-style-glass:hover {
    border-color: rgba(255, 255, 255, 0.55);
    background: linear-gradient(140deg, rgba(255, 255, 255, 0.35) 0%, rgba(15, 23, 42, 0.5) 100%);
}

.social-link-style-three_d {
    border-color: rgba(255, 255, 255, 0.2);
    background: linear-gradient(140deg, var(--social-brand) 0%, rgba(15, 23, 42, 0.9) 100%);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.3),
        0 5px 16px rgba(2, 6, 23, 0.35);
}

.social-link-style-three_d:hover {
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.35),
        0 9px 22px rgba(2, 6, 23, 0.42);
}

/* Install App */
.app-install-box {
    margin-top: 16px;
    display: grid;
    gap: 10px;
}

.app-install-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 8px;
}

.install-app-btn {
    width: 100%;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: linear-gradient(135deg, #2f5bff, #12b6a6);
    color: #ffffff;
    border-radius: 12px;
    min-height: 44px;
    font-weight: 800;
    padding: 10px 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

.install-app-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(47, 91, 255, 0.35);
}

.install-app-btn[disabled] {
    opacity: .72;
    cursor: default;
    transform: none;
    box-shadow: none;
}

.install-app-hint {
    margin: 0;
    font-size: .86rem;
    color: rgba(255, 255, 255, .72);
    line-height: 1.6;
}

.install-app-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: fit-content;
    max-width: 100%;
    color: #7dd3fc;
    text-decoration: underline;
    font-size: .9rem;
    font-weight: 700;
    overflow-wrap: anywhere;
    text-align: center;
}

.install-app-link:hover {
    color: #bae6fd;
}

.install-app-link-android {
    text-decoration: none;
    border: 1px solid rgba(56, 189, 248, 0.45);
    border-radius: 10px;
    padding: 9px 12px;
    background: linear-gradient(135deg, rgba(47, 91, 255, 0.2), rgba(18, 182, 166, 0.2));
    color: #dbeafe;
    font-weight: 800;
}

.install-app-link-android:hover {
    color: #ffffff;
    border-color: rgba(125, 211, 252, 0.85);
    background: linear-gradient(135deg, rgba(47, 91, 255, 0.35), rgba(18, 182, 166, 0.32));
}

.install-app-link-pwa {
    text-decoration: none;
    border: 1px solid rgba(16, 185, 129, 0.45);
    border-radius: 10px;
    padding: 9px 12px;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.22), rgba(20, 184, 166, 0.18));
    color: #dcfce7;
    font-weight: 800;
}

.install-app-link-pwa:hover {
    color: #ffffff;
    border-color: rgba(110, 231, 183, 0.9);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.36), rgba(20, 184, 166, 0.28));
}

/* Footer Bottom */
.footer-bottom {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-bottom p {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.9rem;
    margin: 0;
}

/* ===========================================
   OLD FOOTER CLASSES (for backwards compat)
   =========================================== */
.main-footer {
    background: var(--bg-dark);
    color: white;
    padding: 60px 20px 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    max-width: 320px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.footer-logo-icon {
    font-size: 2.5rem;
}

.footer-logo-text {
    font-size: 2rem;
    font-weight: 800;
    background: var(--primary-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
}

.footer-links h4 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    color: white;
}

.footer-links ul {
    list-style: none;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    display: flex;
    align-items: center;
    gap: 8px;
}

.footer-links a:hover {
    color: var(--accent-color);
}

.footer-logo-img {
    width: 50px;
    height: 50px;
    border-radius: 10px;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .site-footer {
        margin-top: 42px;
        padding: 40px 0 calc(24px + env(safe-area-inset-bottom, 0px));
    }

    .footer-container {
        padding-inline: 14px;
    }

    .footer-grid {
        display: grid;
        grid-template-columns: 1fr 1fr;
        text-align: center;
        gap: 18px;
    }
    /* روابط سريعة والمساعدة بجانب بعض */
    .footer-section:nth-child(2),
    .footer-section:nth-child(3) {
        grid-column: auto;
        order: 2;
        margin-top: 0;
    }
    .footer-section:first-child {
        grid-column: 1 / -1;
        order: 1;
        margin-bottom: 10px;
    }
    .footer-section {
        order: initial;
    }
    /* أيقونات وسائل التواصل دائمًا في صف مع سكرول أفقي */
    .social-links {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        justify-content: flex-start;
        scrollbar-width: thin;
    }
    .social-link {
        flex: 0 0 auto;
    }
    /* أيقونات وسائل التواصل دائمًا في صف مع سكرول أفقي */
    .social-links {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        gap: 10px;
        justify-content: flex-start;
        scrollbar-width: thin;
    }
    .social-link {
        flex: 0 0 auto;
    }

    .footer-section {
        overflow-wrap: anywhere;
        word-break: break-word;
    }

    .footer-section p,
    .footer-section a {
        overflow-wrap: anywhere;
    }

    .footer-section h4::after {
        right: 50%;
        transform: translateX(50%);
    }

    .social-links {
        justify-content: center;
        flex-wrap: wrap;
    }

    .app-install-links-grid {
        grid-template-columns: 1fr;
    }
}
