/**
 * AG-FOOTER PRESTIGE UI v6.2
 * Apple-Style Glassmorphism | Layered Physics | Animated Glow
 */

.ag-footer {
    position: relative;
    margin-top: 100px;
    padding: 100px 0 40px;
    color: #fff;
    overflow: hidden;
    /* تحسين أداء الريندر */
    backface-visibility: hidden;
    transform: translateZ(0);
}

/* 1. الطبقة الزجاجية المتحركة (Advanced Ambient Light) */
.ag-footer-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: rgba(10, 15, 28, 0.82);
    backdrop-filter: blur(40px) saturate(180%) contrast(110%);
    -webkit-backdrop-filter: blur(40px) saturate(180%) contrast(110%);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

/* تأثير الإضاءة المتحركة خلف الزجاج */
.ag-footer-bg::before,
.ag-footer-bg::after {
    content: '';
    position: absolute;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.15;
    z-index: -1;
    animation: ag-ambient-float 15s infinite alternate ease-in-out;
}

.ag-footer-bg::before {
    background: var(--ag-primary, #6366f1);
    top: -10%;
    left: -10%;
}

.ag-footer-bg::after {
    background: var(--ag-accent, #ec4899);
    bottom: -10%;
    right: -10%;
    animation-delay: -7s;
}

@keyframes ag-ambient-float {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(100px, 50px) scale(1.2); }
}

/* 2. شريط الثقة المطور (Floating Glass Pills) */
.ag-footer-trust-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 80px;
}

.ag-trust-item {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 30px;
    border-radius: 28px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: all 0.5s cubic-bezier(0.23, 1, 0.32, 1);
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.ag-trust-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.25);
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.ag-trust-icon {
    font-size: 26px;
    color: #fff;
    width: 65px;
    height: 65px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--ag-primary), var(--ag-accent));
    border-radius: 20px;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
}

/* 3. النشرة البريدية (Reflective Newsletter Box) */
.ag-footer-newsletter {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 35px;
    padding: 45px;
    margin-bottom: 80px;
    overflow: hidden;
}

/* لمعان متحرك (Shimmer Effect) */
.ag-footer-newsletter::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,0.05) 50%, transparent 60%);
    animation: ag-shimmer 8s infinite linear;
    pointer-events: none;
}

@keyframes ag-shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.ag-footer-newsletter-title {
    font-size: 1.8rem;
    font-weight: 800;
    letter-spacing: -1px;
    background: linear-gradient(to bottom, #fff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* 4. الهيكل الرئيسي (The Layout) */
.ag-footer-main-grid {
    display: grid;
    grid-template-columns: 1.8fr 1fr 1.5fr;
    gap: 60px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    padding-bottom: 60px;
}

.ag-footer-title {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.ag-footer-title i {
    color: var(--ag-primary);
    font-size: 0.9em;
}

/* الروابط بتأثير المغناطيس */
.ag-footer-link {
    color: rgba(255, 255, 255, 0.5);
    font-weight: 500;
    transition: all 0.3s ease;
}

.ag-footer-link:hover {
    color: #fff;
    transform: translateX(-8px); /* حركة لليمين في العربي */
}

/* الأيقونات الاجتماعية (Neon Glow) */
.ag-social-pill {
    width: 48px;
    height: 48px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
}

.ag-social-pill:hover {
    background: var(--ag-primary);
    box-shadow: 0 0 25px rgba(99, 102, 241, 0.6);
    transform: scale(1.2) rotate(-8deg);
    border-color: rgba(255,255,255,0.4);
}

/* 5. الفوتر السفلي (The Bottom Strip) */
.ag-footer-bottom-strip {
    padding-top: 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.ag-payment-img {
    filter: brightness(0) invert(1) opacity(0.6);
    transition: 0.4s;
    height: 30px;
}

.ag-payment-img:hover {
    filter: none;
    opacity: 1;
}

/* Responsive */
@media (max-width: 1024px) {
    .ag-footer-main-grid { grid-template-columns: 1fr 1fr; }
    .ag-footer-trust-bar { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .ag-footer-main-grid, .ag-footer-trust-bar { grid-template-columns: 1fr; }
    .ag-footer { text-align: center; }
    .ag-footer-title { justify-content: center; }
    .ag-social-pills { justify-content: center; }
    .ag-trust-item { flex-direction: column; text-align: center; }
}
/* Toggle cards row (neumorphic cards) */
.ag-footer-toggle-row {
    display: flex;
    gap: 32px;
    justify-content: center;
    margin: 0 0 60px;
}

.ag-footer-toggle-card {
    width: 260px;
    height: 80px;
    border-radius: 999px;
    background: #ffffff;
    box-shadow:
        0 26px 40px rgba(15, 23, 42, 0.18),
        0 0 0 1px rgba(148, 163, 184, 0.18);
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 28px;
    position: relative;
}

.ag-footer-toggle-pill {
    box-shadow:
        0 18px 35px rgba(99, 102, 241, 0.40),
        0 0 0 1px rgba(199, 210, 254, 0.9);
}

.ag-footer-toggle-knob {
    box-shadow:
        0 18px 40px rgba(99, 102, 241, 0.55),
        0 0 0 1px rgba(191, 219, 254, 0.95);
}


.ag-footer-toggle-knob {
    width: 40px;
    height: 40px;
    border-radius: 14px;
    background: #ffffff;
    box-shadow:
        0 18px 40px rgba(99, 102, 241, 0.55),
        0 0 0 1px rgba(191, 219, 254, 0.95);
}
.ag-footer .ag-container {
    position: relative;
    z-index: 1;
}
.ag-footer {
    background: #111 !important;
}
