/* CVG Neuron Enhanced CSS - Complete Professional Styling */
/* Version 1.0 - All New Components and Features */

/* ========================================
   CORE ENHANCEMENTS
   ======================================== */

/* Scroll animations */
.scroll-animate {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.scroll-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   BACK TO TOP BUTTON
   ======================================== */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    color: white;
    border: none;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 1000;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(37, 99, 235, 0.5);
}

/* ========================================
   MOBILE HAMBURGER MENU
   ======================================== */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger span {
    width: 28px;
    height: 3px;
    background: #2563eb;
    border-radius: 3px;
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(8px, 8px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(8px, -8px);
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }
    
    nav .container > div:last-child {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: white;
        flex-direction: column;
        align-items: center;
        padding: 40px 20px;
        transition: left 0.3s;
        box-shadow: 2px 0 10px rgba(0,0,0,0.1);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: calc(40px + env(safe-area-inset-bottom, 0px));
    }
    
    nav .container > div:last-child.mobile-active {
        left: 0;
    }
    
    nav .container > div:last-child a {
        margin: 10px 0;
        font-size: 20px;
    }

    /* Keep nav usable when the page is scrolled */
    nav {
        -webkit-backdrop-filter: blur(10px);
        backdrop-filter: blur(10px);
    }
}

/* ========================================
   DARK MODE
   ======================================== */
.dark-mode-toggle {
    background: none;
    border: 2px solid #e2e8f0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    margin-left: 20px;
}

.dark-mode-toggle:hover {
    border-color: #2563eb;
    transform: rotate(180deg);
}

body.dark-mode {
    background: #0f172a;
    color: #e2e8f0;
}

body.dark-mode .page-bg {
    background: radial-gradient(circle at 20% 50%, rgba(37, 99, 235, 0.1) 0%, transparent 50%),
                radial-gradient(circle at 80% 80%, rgba(147, 51, 234, 0.1) 0%, transparent 50%);
}

body.dark-mode nav {
    background: rgba(15, 23, 42, 0.95);
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

body.dark-mode nav a {
    color: #94a3b8;
}

body.dark-mode nav a:hover {
    color: #60a5fa;
}

body.dark-mode .stats-bar,
body.dark-mode .feature,
body.dark-mode .price-card,
body.dark-mode .faq {
    background: #1e293b;
    border-color: #334155;
}

body.dark-mode .section-title,
body.dark-mode .feature h3,
body.dark-mode .faq h4 {
    color: #f1f5f9;
}

body.dark-mode .section-subtitle,
body.dark-mode .feature p,
body.dark-mode .faq p {
    color: #cbd5e1;
}

/* ========================================
   CHAT WIDGET
   ======================================== */
.chat-widget {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
}

.chat-toggle {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    border: none;
    font-size: 28px;
    cursor: pointer;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.4);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.chat-toggle:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(37, 99, 235, 0.5);
    animation: none;
}

.chat-window {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 380px;
    height: 500px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: scale(0.8) translateY(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.chat-window.active {
    opacity: 1;
    visibility: visible;
    transform: scale(1) translateY(0);
}

.chat-header {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    padding: 20px;
    border-radius: 16px 16px 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.chat-minimize {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 20px;
    transition: background 0.2s;
}

.chat-minimize:hover {
    background: rgba(255,255,255,0.3);
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 20px;
    background: #f8fafc;
}

.chat-message {
    padding: 12px 16px;
    border-radius: 12px;
    margin-bottom: 12px;
    max-width: 80%;
    line-height: 1.6;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(-10px); }
    to { opacity: 1; transform: translateX(0); }
}

.chat-message.bot {
    background: white;
    color: #0f172a;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.chat-message.user {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    margin-left: auto;
}

.chat-input-form {
    display: flex;
    padding: 20px;
    background: white;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 16px 16px;
}

.chat-input {
    flex: 1;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    font-family: inherit;
}

.chat-input:focus {
    outline: none;
    border-color: #2563eb;
}

.chat-send {
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    color: white;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 8px;
    margin-left: 10px;
    cursor: pointer;
    font-size: 20px;
    transition: transform 0.2s;
}

.chat-send:hover {
    transform: scale(1.1);
}

@media (max-width: 480px) {
    .chat-window {
        width: calc(100vw - 40px);
        right: 20px;
    }
}

/* ========================================
   NEWSLETTER MODAL
   ======================================== */
.newsletter-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 2000;
}

.newsletter-modal.active {
    opacity: 1;
    visibility: visible;
}

.newsletter-content {
    background: white;
    padding: 50px;
    border-radius: 20px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    position: relative;
    transform: scale(0.8);
    transition: transform 0.3s;
}

.newsletter-modal.active .newsletter-content {
    transform: scale(1);
}

.newsletter-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: none;
    border: none;
    font-size: 32px;
    color: #94a3b8;
    cursor: pointer;
    transition: color 0.2s;
    line-height: 1;
}

.newsletter-close:hover {
    color: #0f172a;
}

.newsletter-content h3 {
    font-size: 32px;
    color: #0f172a;
    margin-bottom: 16px;
}

.newsletter-content p {
    color: #64748b;
    font-size: 16px;
    margin-bottom: 24px;
}

.newsletter-form {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.newsletter-form input {
    flex: 1;
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 16px;
    font-family: inherit;
    transition: border-color 0.2s;
}

.newsletter-form input:focus {
    outline: none;
    border-color: #2563eb;
}

.newsletter-form button {
    padding: 14px 32px;
    white-space: nowrap;
}

/* ========================================
   TESTIMONIALS SECTION
   ======================================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 32px;
    margin: 60px 0;
}

.testimonial-card {
    background: white;
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s;
}

.testimonial-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 40px rgba(37, 99, 235, 0.15);
}

.testimonial-stars {
    font-size: 20px;
    margin-bottom: 20px;
}

.testimonial-text {
    font-size: 17px;
    line-height: 1.8;
    color: #475569;
    margin-bottom: 24px;
    font-style: italic;
}

.testimonial-author {
    text-align: left;
    padding-top: 20px;
    border-top: 2px solid #f1f5f9;
}

.testimonial-author strong {
    display: block;
    color: #0f172a;
    font-size: 16px;
    margin-bottom: 4px;
}

.testimonial-author div {
    color: #64748b;
    font-size: 14px;
}

/* Trust Badges */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.trust-badge {
    text-align: center;
}

/* ========================================
   ENHANCED BADGE
   ======================================== */
.badge {
    display: inline-block;
    background: linear-gradient(135deg, #22c55e, #16a34a);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 20px;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.3);
}

/* ========================================
   ENHANCED HIGHLIGHT BOX
   ======================================== */
.highlight-box {
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    border-left: 4px solid #2563eb;
    padding: 40px;
    border-radius: 12px;
    margin: 40px 0;
    box-shadow: 0 4px 20px rgba(37, 99, 235, 0.08);
    transition: all 0.3s;
}

.highlight-box:hover {
    transform: translateX(8px);
    box-shadow: 0 8px 32px rgba(37, 99, 235, 0.12);
}

/* ========================================
   ENHANCED FEATURES
   ======================================== */
.feature-icon {
    font-size: 64px;
    margin-bottom: 24px;
    filter: drop-shadow(0 4px 12px rgba(37, 99, 235, 0.3));
    transition: transform 0.3s;
}

.feature:hover .feature-icon {
    transform: scale(1.1) rotate(5deg);
}

/* ========================================
   ENHANCED PRICING CARDS
   ======================================== */
.price-card {
    position: relative;
    overflow: visible;
}

.price-card::after {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(135deg, #2563eb, #7c3aed);
    border-radius: 18px;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s;
}

.price-card:hover::after {
    opacity: 0.1;
}

/* ========================================
   LOADING OVERLAY
   ======================================== */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: white;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    transition: opacity 0.5s, visibility 0.5s;
}

.loading-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 4px solid #e2e8f0;
    border-top-color: #2563eb;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ========================================
   VIDEO SECTION
   ======================================== */
.video-container {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.15);
    margin: 40px 0;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ========================================
   PROGRESS BAR (for page load)
   ======================================== */
.progress-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, #2563eb, #7c3aed);
    z-index: 10001;
    transition: width 0.3s;
}

/* ========================================
   TOOLTIP
   ======================================== */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(-10px);
    padding: 8px 12px;
    background: #0f172a;
    color: white;
    border-radius: 6px;
    font-size: 13px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s;
    pointer-events: none;
    z-index: 100;
}

[data-tooltip]:hover::before {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-5px);
}

/* ========================================
   ENHANCED CTA SECTION
   ======================================== */
.cta {
    position: relative;
    overflow: hidden;
}

.cta::after {
    content: '';
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(255,255,255,0.05) 0%, transparent 70%);
    bottom: -300px;
    left: -300px;
    animation: float 25s ease-in-out infinite reverse;
}

/* ========================================
   RESPONSIVE ENHANCEMENTS
   ======================================== */
@media (max-width: 768px) {
    .testimonials-grid {
        grid-template-columns: 1fr;
    }
    
    .trust-badges {
        gap: 40px;
    }
    
    .newsletter-form {
        flex-direction: column;
    }
    
    .newsletter-form button {
        width: 100%;
    }
    
    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
    }
}

/* ========================================
   ACCESSIBILITY ENHANCEMENTS
   ======================================== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus visible for keyboard navigation */
*:focus-visible {
    outline: 3px solid #2563eb;
    outline-offset: 2px;
}

/* ========================================
   DARK MODE ENHANCEMENTS FOR NEW COMPONENTS
   ======================================== */
body.dark-mode .chat-window {
    background: #1e293b;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

body.dark-mode .chat-messages {
    background: #0f172a;
}

body.dark-mode .chat-message.bot {
    background: #334155;
    color: #e2e8f0;
}

body.dark-mode .chat-input-form {
    background: #1e293b;
    border-top-color: #334155;
}

body.dark-mode .chat-input {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-mode .newsletter-content {
    background: #1e293b;
    color: #e2e8f0;
}

body.dark-mode .newsletter-content h3 {
    color: #f1f5f9;
}

body.dark-mode .newsletter-form input {
    background: #0f172a;
    border-color: #334155;
    color: #e2e8f0;
}

body.dark-mode .testimonial-card {
    background: #1e293b;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    nav, .chat-widget, .back-to-top, .newsletter-modal, .dark-mode-toggle {
        display: none !important;
    }
    
    .feature, .price-card, .faq {
        page-break-inside: avoid;
    }
}
