/* =====================================================================
   NEXTEDU NEXUS — iOS 18 3D LIQUID GLASS FOOTER
   120Hz Ultra-Fluid • Frosted Glassmorphism • Specular Highlights
   Fully Responsive & Light/Dark Theme Synchronized
   ===================================================================== */

:root {
    --ios18-footer-bg: rgba(255, 255, 255, 0.82);
    --ios18-footer-border: rgba(255, 255, 255, 0.7);
    --ios18-footer-shadow: 0 -15px 45px rgba(15, 23, 42, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.95);
    --ios18-footer-text: #1e293b;
    --ios18-footer-muted: #64748b;
    --ios18-footer-link: #475569;
    --ios18-footer-link-hover: #4f46e5;
    --ios18-footer-card-bg: rgba(255, 255, 255, 0.65);
    --ios18-footer-card-border: rgba(226, 232, 240, 0.8);
    --ios18-footer-pill-bg: rgba(241, 245, 249, 0.9);
    --ios18-footer-pill-border: rgba(203, 213, 225, 0.7);
    --ios18-footer-accent: #4f46e5;
    --ios18-footer-accent-glow: rgba(79, 70, 229, 0.25);
    --ios18-footer-divider: rgba(226, 232, 240, 0.8);
}

[data-theme="dark"],
body.dark-mode {
    --ios18-footer-bg: rgba(8, 12, 24, 0.88);
    --ios18-footer-border: rgba(255, 255, 255, 0.12);
    --ios18-footer-shadow: 0 -20px 50px rgba(0, 0, 0, 0.65), inset 0 1px 0 rgba(255, 255, 255, 0.16);
    --ios18-footer-text: #f8fafc;
    --ios18-footer-muted: #94a3b8;
    --ios18-footer-link: #cbd5e1;
    --ios18-footer-link-hover: #818cf8;
    --ios18-footer-card-bg: rgba(15, 23, 42, 0.65);
    --ios18-footer-card-border: rgba(255, 255, 255, 0.08);
    --ios18-footer-pill-bg: rgba(30, 41, 59, 0.7);
    --ios18-footer-pill-border: rgba(255, 255, 255, 0.1);
    --ios18-footer-accent: #6366f1;
    --ios18-footer-accent-glow: rgba(99, 102, 241, 0.35);
    --ios18-footer-divider: rgba(255, 255, 255, 0.08);
}

/* =====================================================================
   MAIN FOOTER CONTAINER
   ===================================================================== */
.ios18-liquid-footer {
    position: relative;
    width: 100%;
    margin-top: clamp(40px, 6vw, 70px);
    background: var(--ios18-footer-bg);
    backdrop-filter: blur(32px) saturate(210%);
    -webkit-backdrop-filter: blur(32px) saturate(210%);
    border-top: 1px solid var(--ios18-footer-border);
    box-shadow: var(--ios18-footer-shadow);
    color: var(--ios18-footer-text);
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    overflow: hidden;
    z-index: 20;
    transform: translateZ(0);
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    box-sizing: border-box;
}

/* Specular Light Bar Ambient Glow */
.ios18-liquid-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 8%;
    right: 8%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.7), rgba(236, 72, 153, 0.7), rgba(56, 189, 248, 0.7), transparent);
    pointer-events: none;
    filter: blur(0.5px);
}

.ios18-footer-inner {
    max-width: 1280px;
    margin: 0 auto;
    padding: clamp(32px, 5vw, 64px) clamp(16px, 4vw, 36px) clamp(24px, 3vw, 36px);
    box-sizing: border-box;
}

/* =====================================================================
   GRID LAYOUT
   ===================================================================== */
.ios18-footer-grid {
    display: grid;
    grid-template-columns: 1.45fr 1fr 1fr 1.05fr;
    gap: clamp(24px, 3.5vw, 48px);
    margin-bottom: clamp(28px, 4vw, 44px);
    box-sizing: border-box;
}

/* Brand Column */
.ios18-brand-col {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ios18-brand-header {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: inherit;
    width: fit-content;
}

.ios18-brand-icon {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    box-shadow: 0 8px 24px var(--ios18-footer-accent-glow), inset 0 1px 1px rgba(255, 255, 255, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.25rem;
    flex-shrink: 0;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.35s ease;
}

.ios18-brand-header:hover .ios18-brand-icon {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 12px 28px var(--ios18-footer-accent-glow), inset 0 1px 1px rgba(255, 255, 255, 0.7);
}

.ios18-brand-meta h3 {
    margin: 0;
    font-size: 1.22rem;
    font-weight: 800;
    letter-spacing: -0.3px;
    background: linear-gradient(135deg, var(--ios18-footer-text) 0%, var(--ios18-footer-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1.2;
}

.ios18-brand-meta span {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--ios18-footer-muted);
}

.ios18-brand-desc {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.55;
    color: var(--ios18-footer-muted);
}

/* System Live Status Pill */
.ios18-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 999px;
    background: var(--ios18-footer-card-bg);
    border: 1px solid var(--ios18-footer-card-border);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--ios18-footer-text);
    width: fit-content;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.04);
}

.ios18-ping-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #10b981;
    position: relative;
    flex-shrink: 0;
}

.ios18-ping-dot::after {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 50%;
    background: rgba(16, 185, 129, 0.4);
    animation: ios18Pulse 2s cubic-bezier(0, 0, 0.2, 1) infinite;
}

@keyframes ios18Pulse {
    0% { transform: scale(0.9); opacity: 0.9; }
    50% { transform: scale(1.6); opacity: 0; }
    100% { transform: scale(0.9); opacity: 0; }
}

/* Official Channels Pills */
.ios18-social-strip {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 4px;
}

.ios18-social-pill {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 13px;
    border-radius: 12px;
    font-size: 0.78rem;
    font-weight: 700;
    text-decoration: none;
    color: var(--ios18-footer-text);
    background: var(--ios18-footer-pill-bg);
    border: 1px solid var(--ios18-footer-pill-border);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    transition: all 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    min-height: 36px;
    box-sizing: border-box;
}

.ios18-social-pill svg {
    width: 15px;
    height: 15px;
    flex-shrink: 0;
    transition: transform 0.25s ease;
}

.ios18-social-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12);
}

.ios18-social-pill:hover svg {
    transform: scale(1.15);
}

.ios18-wa-pill:hover {
    background: rgba(37, 211, 102, 0.15);
    border-color: rgba(37, 211, 102, 0.4);
    color: #25d366;
}

.ios18-tg-pill:hover {
    background: rgba(0, 136, 204, 0.15);
    border-color: rgba(0, 136, 204, 0.4);
    color: #0088cc;
}

.ios18-yt-pill:hover {
    background: rgba(255, 0, 0, 0.15);
    border-color: rgba(255, 0, 0, 0.4);
    color: #ff0000;
}

.ios18-insta-pill:hover {
    background: rgba(225, 48, 108, 0.15);
    border-color: rgba(225, 48, 108, 0.4);
    color: #e1306c;
}

.ios18-fb-pill:hover {
    background: rgba(24, 119, 242, 0.15);
    border-color: rgba(24, 119, 242, 0.4);
    color: #1877f2;
}

/* Nav Columns */
.ios18-col-title {
    font-size: 0.88rem;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    color: var(--ios18-footer-text);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.ios18-col-title i {
    color: var(--ios18-footer-accent);
    font-size: 0.95rem;
}

.ios18-link-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.ios18-link-item a {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ios18-footer-link);
    text-decoration: none;
    font-size: 0.87rem;
    font-weight: 500;
    transition: all 0.22s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 3px 0;
    line-height: 1.4;
    position: relative;
    touch-action: manipulation;
}

.ios18-link-item a i {
    font-size: 0.78rem;
    color: var(--ios18-footer-muted);
    transition: transform 0.22s ease, color 0.22s ease;
}

.ios18-link-item a:hover {
    color: var(--ios18-footer-link-hover);
    transform: translateX(4px);
}

.ios18-link-item a:hover i {
    color: var(--ios18-footer-link-hover);
    transform: translateX(2px);
}

/* Mini Tag Badges inside links */
.ios18-tag {
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 6px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    line-height: 1;
}

.ios18-tag-hot {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.ios18-tag-ai {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(236, 72, 153, 0.2));
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.ios18-tag-vip {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

/* =====================================================================
   BOTTOM BAR & TRUST BADGES
   ===================================================================== */
.ios18-footer-bottom {
    margin-top: clamp(24px, 3.5vw, 36px);
    padding-top: clamp(18px, 2.5vw, 26px);
    border-top: 1px solid var(--ios18-footer-divider);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
    box-sizing: border-box;
}

.ios18-copy-text {
    font-size: 0.82rem;
    color: var(--ios18-footer-muted);
    margin: 0;
    line-height: 1.5;
}

.ios18-trust-badges {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ios18-trust-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 11px;
    border-radius: 10px;
    background: var(--ios18-footer-card-bg);
    border: 1px solid var(--ios18-footer-card-border);
    font-size: 0.74rem;
    font-weight: 600;
    color: var(--ios18-footer-muted);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.02);
}

.ios18-trust-pill i {
    color: #10b981;
    font-size: 0.8rem;
}

.ios18-engine-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 0.74rem;
    font-weight: 700;
    color: var(--ios18-footer-accent);
    padding: 5px 12px;
    border-radius: 999px;
    background: var(--ios18-footer-card-bg);
    border: 1px solid var(--ios18-footer-card-border);
    letter-spacing: 0.3px;
}

/* =====================================================================
   RESPONSIVE QUERIES
   ===================================================================== */
@media (max-width: 1024px) {
    .ios18-footer-grid {
        grid-template-columns: 1.3fr 1fr 1fr;
    }
    .ios18-footer-grid .ios18-trust-col {
        grid-column: span 3;
    }
}

@media (max-width: 768px) {
    .ios18-footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }
    .ios18-brand-col {
        grid-column: span 2;
    }
    .ios18-footer-grid .ios18-trust-col {
        grid-column: span 2;
    }
    .ios18-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
    .ios18-trust-badges {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .ios18-footer-grid {
        grid-template-columns: 1fr;
        gap: 22px;
    }
    .ios18-brand-col,
    .ios18-footer-grid .ios18-trust-col {
        grid-column: span 1;
    }
    .ios18-social-strip {
        gap: 6px;
    }
    .ios18-social-pill {
        padding: 6px 10px;
        font-size: 0.75rem;
    }
    .ios18-trust-badges {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        width: 100%;
    }
    .ios18-trust-pill {
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }
}
