/* ==========================================================================
   أرباحي — Public Footer (Task ID: A — SUBTASK A2)
   --------------------------------------------------------------------------
   Modern, professional, glass-effect footer that matches the homepage's
   dark + purple-gradient aesthetic. Linked from public_header.php AFTER
   landing.css so it can override the legacy `.landing-footer` rule.

   Design system (matches worklog.md):
     • Bg: linear-gradient(180deg, #0a0a14 → #13131f)
     • Top border: 1px solid rgba(108,92,231,0.15)
     • Glass: backdrop-filter: blur(12px) saturate(140%)
     • Text primary #f5f5fa · secondary #b8b8c8 · tertiary rgba(245,245,250,0.5)
     • Border: rgba(255,255,255,0.08)
     • Primary #6c5ce7 → primary-light #a29bfe (135deg gradient)
     • Radii: 12px (cards), 10px (buttons), 999px (pills)
     • Cairo + Tajawal (Arabic), Inter (Latin)
   ========================================================================== */

/* ---------- Footer shell ---------- */
.landing-footer {
    position: relative;
    margin-top: 0;
    padding: 64px 0 0;
    background: linear-gradient(180deg, #0a0a14 0%, #13131f 100%);
    border-top: 1px solid rgba(108, 92, 231, 0.15);
    color: #f5f5fa;
    font-family: "Cairo", "Tajawal", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
    overflow: hidden;
    isolation: isolate;
}

/* Soft top glow that bleeds from the homepage's hero gradient */
.landing-footer::before {
    content: "";
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 240px;
    background:
        radial-gradient(60% 100% at 50% 0%, rgba(108, 92, 231, 0.18) 0%, transparent 70%),
        radial-gradient(40% 100% at 85% 0%, rgba(253, 121, 168, 0.10) 0%, transparent 70%),
        radial-gradient(40% 100% at 15% 0%, rgba(0, 206, 201, 0.10) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

/* ---------- Container ---------- */
.footer-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
    padding: 0 clamp(16px, 4vw, 32px);
}

/* ---------- 4-column grid ---------- */
.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr 1.1fr;
    gap: 40px;
    padding-bottom: 40px;
}

/* ---------- Each column ---------- */
.footer-col {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-width: 0;
}

.footer-col h4 {
    margin: 0 0 6px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #f5f5fa;
    letter-spacing: 0.02em;
    position: relative;
    padding-bottom: 10px;
}
.footer-col h4::after {
    content: "";
    position: absolute;
    inset-inline-start: 0;
    bottom: 0;
    width: 32px;
    height: 2px;
    border-radius: 2px;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
}

/* ---------- Brand column ---------- */
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 1.35rem;
    font-weight: 900;
    margin-bottom: 6px;
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 60%, #fd79a8 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
    letter-spacing: -0.01em;
}
.footer-brand i {
    -webkit-text-fill-color: #a29bfe;
    color: #a29bfe;
    font-size: 1.2rem;
}

.footer-desc {
    margin: 0 0 14px;
    font-size: 0.9rem;
    line-height: 1.7;
    color: #b8b8c8;
    max-width: 360px;
}

/* ---------- Payment-trust row ---------- */
.footer-pay-trust {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(12px) saturate(140%);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    margin-top: 6px;
    width: fit-content;
}
.footer-pay-trust::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #00b894;
    box-shadow: 0 0 0 3px rgba(0, 184, 148, 0.18);
    margin-inline-end: 2px;
    flex-shrink: 0;
}
.footer-pay-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 26px;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #c8c0ff;
    font-size: 0.85rem;
    transition: transform 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}
.footer-pay-icon:hover {
    transform: translateY(-2px);
    color: #a29bfe;
    border-color: rgba(108, 92, 231, 0.4);
}
.footer-pay-icon i { line-height: 1; }

/* ---------- Footer links ---------- */
.footer-col a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: #b8b8c8;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 500;
    padding: 4px 0;
    transition: color 0.25s ease, transform 0.25s ease, padding-inline-start 0.25s ease;
    line-height: 1.6;
}
.footer-col a i {
    font-size: 0.65rem;
    color: rgba(108, 92, 231, 0.7);
    transition: color 0.25s ease, transform 0.25s ease;
    flex-shrink: 0;
}
.footer-col a:hover {
    color: #f5f5fa;
    transform: translateX(-2px);
}
[dir="rtl"] .footer-col a:hover { transform: translateX(2px); }
.footer-col a:hover i {
    color: #a29bfe;
    transform: translateX(-2px);
}
[dir="rtl"] .footer-col a:hover i { transform: translateX(2px); }

/* ---------- Get Started column auth buttons ---------- */
.footer-cta {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 4px;
}
.footer-cta a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 16px;
    border-radius: 10px;
    font-size: 0.88rem;
    font-weight: 700;
    text-decoration: none;
    transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease;
}
.footer-cta a i { font-size: 0.85rem; }
.footer-cta-primary {
    background: linear-gradient(135deg, #6c5ce7 0%, #a29bfe 100%);
    color: #fff !important;
    box-shadow: 0 10px 24px -8px rgba(108, 92, 231, 0.55);
}
.footer-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -8px rgba(108, 92, 231, 0.7);
}
.footer-cta-secondary {
    background: rgba(255, 255, 255, 0.05);
    color: #f5f5fa !important;
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.footer-cta-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(108, 92, 231, 0.4);
    transform: translateY(-2px);
}
.footer-cta-logout {
    background: rgba(231, 76, 60, 0.1) !important;
    color: #ff8c7a !important;
    border: 1px solid rgba(231, 76, 60, 0.25) !important;
}
.footer-cta-logout:hover {
    background: rgba(231, 76, 60, 0.18) !important;
    border-color: rgba(231, 76, 60, 0.45) !important;
}

/* ---------- Social links (rendered by renderSocialLinks()) ---------- */
.footer-social {
    margin-top: 18px;
}
.footer-social h4 {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: rgba(245, 245, 250, 0.55);
    margin: 0 0 10px;
    padding: 0;
}
.footer-social h4::after { display: none; }
.footer-social .social-icons {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.footer-social .social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: #b8b8c8;
    font-size: 1rem;
    text-decoration: none;
    transition: transform 0.25s ease, color 0.25s ease, background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    padding: 0;
}
.footer-social .social-icons a:hover {
    transform: translateY(-3px);
    color: #fff;
    background: linear-gradient(135deg, rgba(108, 92, 231, 0.25), rgba(162, 155, 254, 0.15));
    border-color: rgba(108, 92, 231, 0.45);
    box-shadow: 0 8px 20px -6px rgba(108, 92, 231, 0.5);
}

/* ---------- Footer bottom ---------- */
.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding: 22px 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 0.82rem;
    color: rgba(184, 184, 200, 0.85);
}
.footer-bottom p {
    margin: 0;
    line-height: 1.6;
}
.footer-bottom p strong {
    color: #f5f5fa;
    font-weight: 700;
}
.footer-powered {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: rgba(184, 184, 200, 0.75);
}
.footer-powered .footer-heart {
    color: #e74c3c;
    font-size: 0.85rem;
    display: inline-block;
    animation: footerHeartBeat 2.4s ease-in-out infinite;
}
@keyframes footerHeartBeat {
    0%, 100% { transform: scale(1); }
    25%      { transform: scale(1.18); }
    50%      { transform: scale(1); }
    75%      { transform: scale(1.1); }
}
@media (prefers-reduced-motion: reduce) {
    .footer-powered .footer-heart { animation: none; }
}

/* ==========================================================================
   RESPONSIVE
   ========================================================================== */

/* Tablet (≤980px) — 2×2 grid */
@media (max-width: 980px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 32px 28px;
    }
    .footer-brand-col { grid-column: span 2; }
    .footer-desc { max-width: 100%; }
}

/* Mobile (≤600px) — single column, compact bottom row */
@media (max-width: 600px) {
    .landing-footer { padding-top: 44px; }
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 28px;
        padding-bottom: 28px;
    }
    .footer-brand-col { grid-column: span 1; }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        padding: 18px 0;
        text-align: start;
    }
    .footer-bottom p { font-size: 0.78rem; }
    .footer-cta { flex-direction: row; flex-wrap: wrap; }
    .footer-cta a { flex: 1 1 calc(50% - 5px); min-width: 130px; }
}

/* Extra padding-bottom on mobile so content clears the fixed mobile bottom
   navigation bar (added by mobile-bottombar.css). The mobile-bottombar.css
   adds 70px to <body>; the footer just needs a small extra clearance so its
   last row doesn't hug the bar. */
@media (max-width: 768px) {
    .landing-footer { padding-bottom: 16px; }
}
