/* ============================================================
   MumbleChat Beautification Layer
   Enhanced visuals, images, animations, glassmorphism
   ============================================================ */

/* ─── Animated Background Particles ─── */
.hero {
    position: relative;
}

.hero::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-image: 
        radial-gradient(2px 2px at 20% 30%, rgba(99, 102, 241, 0.4), transparent),
        radial-gradient(2px 2px at 40% 70%, rgba(139, 92, 246, 0.3), transparent),
        radial-gradient(2px 2px at 60% 40%, rgba(99, 102, 241, 0.3), transparent),
        radial-gradient(2px 2px at 80% 10%, rgba(168, 85, 247, 0.4), transparent),
        radial-gradient(1px 1px at 10% 80%, rgba(99, 102, 241, 0.3), transparent),
        radial-gradient(1px 1px at 70% 60%, rgba(139, 92, 246, 0.2), transparent),
        radial-gradient(1px 1px at 90% 90%, rgba(99, 102, 241, 0.3), transparent),
        radial-gradient(1px 1px at 30% 50%, rgba(168, 85, 247, 0.2), transparent),
        radial-gradient(1.5px 1.5px at 50% 20%, rgba(99, 102, 241, 0.35), transparent),
        radial-gradient(1.5px 1.5px at 15% 55%, rgba(139, 92, 246, 0.25), transparent);
    background-size: 200% 200%;
    animation: particleFloat 20s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes particleFloat {
    0% { background-position: 0% 0%; }
    25% { background-position: 100% 50%; }
    50% { background-position: 50% 100%; }
    75% { background-position: 0% 50%; }
    100% { background-position: 0% 0%; }
}

/* ─── Hero Image Backgrounds ─── */
.hero-with-image {
    position: relative;
    overflow: hidden;
}

.hero-with-image .hero-bg-image {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.12;
    filter: blur(1px);
    z-index: 0;
}

.hero-with-image .hero-content {
    position: relative;
    z-index: 2;
}

/* ─── Image Feature Sections ─── */
.image-feature {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
    padding: 40px 0;
}

.image-feature.reverse {
    direction: rtl;
}

.image-feature.reverse > * {
    direction: ltr;
}

.image-feature-img {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.image-feature-img img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 20px;
    transition: transform 0.6s ease;
}

.image-feature-img:hover img {
    transform: scale(1.03);
}

.image-feature-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
    border-radius: 20px;
    pointer-events: none;
}

.image-feature-text h3 {
    font-size: 2rem;
    margin-bottom: 16px;
}

.image-feature-text h3 span {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.image-feature-text p {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.image-feature-text .feature-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 20px;
}

.feature-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.25);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--primary-light);
    font-weight: 500;
}

@media (max-width: 768px) {
    .image-feature {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .image-feature.reverse {
        direction: ltr;
    }
}

/* ─── Glassmorphism Cards ─── */
.glass-card {
    background: rgba(26, 26, 46, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(99, 102, 241, 0.15);
    border-radius: 20px;
    padding: 32px;
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(99, 102, 241, 0.5), transparent);
}

.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-6px);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.15);
}

/* ─── Image Card Grid ─── */
.image-card {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border);
    transition: all 0.4s ease;
}

.image-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.2);
}

.image-card-img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}

.image-card-body {
    padding: 24px;
}

.image-card-body h3 {
    font-size: 1.2rem;
    margin-bottom: 8px;
}

.image-card-body p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ─── Image Banner Sections ─── */
.image-banner {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
}

.image-banner .banner-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.15;
    filter: blur(2px);
}

.image-banner .banner-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, var(--bg-dark) 0%, transparent 30%, transparent 70%, var(--bg-dark) 100%);
}

.image-banner .container {
    position: relative;
    z-index: 2;
}

/* ─── Security Score Badge ─── */
.security-score {
    display: inline-flex;
    align-items: center;
    gap: 16px;
    background: rgba(16, 185, 129, 0.1);
    border: 2px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    padding: 16px 28px;
    margin: 20px 0;
}

.security-score .score-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #10b981, #059669);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.security-score .score-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.security-score .score-label strong {
    display: block;
    color: #10b981;
    font-size: 1.1rem;
}

/* ─── Animated Gradient Border ─── */
.gradient-border {
    position: relative;
    border: none !important;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 20px;
    padding: 1px;
    background: linear-gradient(135deg, #6366f1, #a855f7, #6366f1);
    background-size: 200% 200%;
    animation: gradientMove 4s ease-in-out infinite;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

@keyframes gradientMove {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ─── Stats Counter Enhancements ─── */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: var(--gradient-primary);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::after {
    opacity: 1;
}

/* ─── Scroll Animations ─── */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

.fade-in-left {
    opacity: 0;
    transform: translateX(-30px);
    transition: all 0.6s ease;
}

.fade-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.fade-in-right {
    opacity: 0;
    transform: translateX(30px);
    transition: all 0.6s ease;
}

.fade-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s ease;
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* Stagger children */
.stagger-children > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.5s ease;
}

.stagger-children.visible > *:nth-child(1) { transition-delay: 0.1s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(2) { transition-delay: 0.2s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(3) { transition-delay: 0.3s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(4) { transition-delay: 0.4s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(5) { transition-delay: 0.5s; opacity: 1; transform: translateY(0); }
.stagger-children.visible > *:nth-child(6) { transition-delay: 0.6s; opacity: 1; transform: translateY(0); }

/* ─── Enhanced Section Dividers ─── */
.section-divider {
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    margin: 0 auto;
    max-width: 600px;
}

/* ─── Tech Stack Badges ─── */
.tech-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin: 30px 0;
}

.tech-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--text-secondary);
    transition: all 0.3s ease;
}

.tech-badge:hover {
    background: rgba(99, 102, 241, 0.15);
    border-color: rgba(99, 102, 241, 0.4);
    color: var(--primary-light);
    transform: translateY(-2px);
}

.tech-badge .badge-icon {
    font-size: 1.1rem;
}

/* ─── Timeline ─── */
.timeline {
    position: relative;
    padding-left: 40px;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(180deg, var(--primary), var(--secondary), var(--primary));
}

.timeline-item {
    position: relative;
    margin-bottom: 40px;
    padding-left: 20px;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -30px;
    top: 6px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: 3px solid var(--bg-dark);
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.4);
}

.timeline-item h4 {
    color: var(--primary-light);
    margin-bottom: 4px;
}

.timeline-item p {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

/* ─── Floating Glow Effects ─── */
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
}

.glow-orb-1 {
    width: 300px;
    height: 300px;
    background: rgba(99, 102, 241, 0.15);
    top: 20%;
    left: -100px;
    animation: floatOrb 8s ease-in-out infinite;
}

.glow-orb-2 {
    width: 250px;
    height: 250px;
    background: rgba(168, 85, 247, 0.12);
    bottom: 10%;
    right: -80px;
    animation: floatOrb 10s ease-in-out infinite reverse;
}

.glow-orb-3 {
    width: 200px;
    height: 200px;
    background: rgba(16, 185, 129, 0.1);
    top: 50%;
    left: 30%;
    animation: floatOrb 12s ease-in-out infinite;
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0); }
    33% { transform: translate(30px, -30px); }
    66% { transform: translate(-20px, 20px); }
}

/* ─── Enhanced Card Hover with Image ─── */
.card-with-image {
    position: relative;
    overflow: hidden;
}

.card-with-image .card-bg-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.06;
    transition: opacity 0.4s ease;
}

.card-with-image:hover .card-bg-img {
    opacity: 0.12;
}

/* ─── CTA Section Enhanced ─── */
.cta-enhanced {
    position: relative;
    padding: 100px 0;
    background: var(--gradient-primary);
    overflow: hidden;
}

.cta-enhanced::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><circle cx="50" cy="50" r="1" fill="rgba(255,255,255,0.1)"/></svg>');
    background-size: 40px 40px;
    opacity: 0.3;
}

.cta-enhanced .container {
    position: relative;
    z-index: 1;
}

/* ─── Number Counter Style ─── */
.big-number {
    font-size: 4rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1;
}

/* ─── Features Grid Enhanced ─── */
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 1024px) {
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .features-grid {
        grid-template-columns: 1fr;
    }
}

.features-grid .card {
    position: relative;
    overflow: hidden;
}

.features-grid .card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.06) 0%, transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    pointer-events: none;
}

.features-grid .card:hover::after {
    opacity: 1;
}

/* ─── Comparison Table Enhanced ─── */
.comparison-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 16px;
    overflow: hidden;
}

.comparison-table thead {
    background: var(--gradient-primary);
}

.comparison-table th {
    padding: 16px 20px;
    text-align: left;
    color: white;
    font-weight: 600;
}

.comparison-table td {
    padding: 14px 20px;
    border-bottom: 1px solid var(--border);
}

.comparison-table tbody tr {
    transition: background 0.2s ease;
}

.comparison-table tbody tr:hover {
    background: rgba(99, 102, 241, 0.05);
}

/* ─── Version Badge ─── */
.version-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(16, 185, 129, 0.15);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 50px;
    font-size: 0.8rem;
    color: var(--secondary);
    font-weight: 600;
}

/* ─── Pulse Animation for Live Indicators ─── */
.pulse-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--secondary);
    animation: pulse 2s ease-in-out infinite;
    margin-right: 6px;
}

@keyframes pulse {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.4); }
    50% { opacity: 0.8; box-shadow: 0 0 0 8px rgba(16, 185, 129, 0); }
}

/* ─── Image Showcase Grid ─── */
.showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin: 40px 0;
}

.showcase-grid .showcase-item {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    aspect-ratio: 16/10;
    cursor: pointer;
}

.showcase-grid .showcase-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.showcase-grid .showcase-item:hover img {
    transform: scale(1.08);
}

.showcase-grid .showcase-item .showcase-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(15, 15, 35, 0.8) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.showcase-grid .showcase-item:hover .showcase-overlay {
    opacity: 1;
}

.showcase-overlay h4 {
    color: white;
    font-size: 1rem;
    margin: 0;
}

@media (max-width: 768px) {
    .showcase-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .showcase-grid {
        grid-template-columns: 1fr;
    }
}

/* ─── Inline Image with Text Wrap ─── */
.section-image-float {
    float: right;
    width: 40%;
    margin: 0 0 20px 30px;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

@media (max-width: 768px) {
    .section-image-float {
        float: none;
        width: 100%;
        margin: 0 0 20px 0;
    }
}

/* ─── Enhanced Footer ─── */
.footer {
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

/* ─── Scroll to Top Button ─── */
.scroll-top {
    position: fixed;
    bottom: 80px;
    right: 24px;
    width: 44px;
    height: 44px;
    background: var(--gradient-primary);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.scroll-top.visible {
    opacity: 1;
}

.scroll-top:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 30px rgba(99, 102, 241, 0.5);
}

/* ─── Enhanced Cards with Gradient Icons ─── */
.card .card-icon {
    position: relative;
    z-index: 1;
}

/* ─── Responsive Image Utility ─── */
.img-rounded {
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.img-glow {
    box-shadow: 0 0 40px rgba(99, 102, 241, 0.2);
}

/* ─── Section with bg image ─── */
.section-with-bg {
    position: relative;
    overflow: hidden;
}

.section-with-bg .section-bg {
    position: absolute;
    top: 0; left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.08;
    z-index: 0;
}

.section-with-bg .container {
    position: relative;
    z-index: 1;
}

/* ─── Animated Number Highlights ─── */
.highlight-number {
    font-size: 3rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    line-height: 1.2;
}

/* ─── Image Row ─── */
.image-row {
    display: flex;
    gap: 20px;
    margin: 40px 0;
    overflow-x: auto;
    padding: 10px 0;
}

.image-row img {
    height: 180px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
    box-shadow: 0 8px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}

.image-row img:hover {
    transform: scale(1.05);
}

/* ─── Enhanced text-center ─── */
.text-center { text-align: center; }

/* ─── Utilities ─── */
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 12px; }
.mt-3 { margin-top: 16px; }
.mt-4 { margin-top: 24px; }
.mt-5 { margin-top: 32px; }
.mt-6 { margin-top: 48px; }
.mb-0 { margin-bottom: 0; }
.mb-2 { margin-bottom: 12px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mb-5 { margin-bottom: 32px; }
.mb-6 { margin-bottom: 48px; }
.py-6 { padding-top: 48px; padding-bottom: 48px; }
.gap-4 { gap: 24px; }
