/* ==========================================================================
   CSS Variables & Tokens
   ========================================================================== */
:root {
    /* Colors */
    --primary-blue: #1A6FD4;
    --secondary-blue: #2A9BF5;
    --light-blue: #0D1B2A;
    --white: #F0F6FF;
    --dark-gray: #E8F0F8;
    --accent-cyan: #00D4FF;
    --bg-main: #0A1628;
    --bg-section: #0D1F36;
    --bg-card: #112240;
    --bg-card-hover: #162C52;
    --text-primary: #E8F0F8;
    --text-secondary: #94AABF;
    --border-subtle: rgba(42, 155, 245, 0.15);
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #1A6FD4, #2A9BF5);
    --gradient-glow: linear-gradient(135deg, var(--accent-cyan), var(--secondary-blue));
    
    /* Typography */
    --font-heading: 'Poppins', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Effects */
    --shadow-soft: 0 10px 40px rgba(0, 0, 0, 0.4);
    --shadow-hover: 0 20px 50px rgba(26, 111, 212, 0.3);
    --glass-bg: rgba(17, 34, 64, 0.92);
    --glass-border: rgba(42, 155, 245, 0.2);
    
    /* Transition */
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    
    /* Layout */
    --border-radius: 16px;
    --container-max: 1200px;
}

/* ==========================================================================
   Reset & Base
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%; /* prevent iOS font resize on orientation change */
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background-color: var(--bg-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch; /* smooth scroll on iOS */
    /* Safe area for notch/home indicator on modern iPhones */
    padding-left: env(safe-area-inset-left);
    padding-right: env(safe-area-inset-right);
}

/* Prevent iOS auto-zoom on input focus (needs font-size >= 16px) */
input, textarea, select {
    font-size: 16px !important;
}

/* Consistent tap highlight removal */
a, button, input, select, textarea {
    -webkit-tap-highlight-color: transparent;
}

/* Better touch targets (minimum 44px per Apple HIG) */
.btn, .nav-link, .faq-question, .sim-tab-btn, .wa-toggle-btn, .wa-quick-btn {
    min-height: 44px;
}

/* Horizontal overflow guard — only body level, never clip inner containers */
/* (body already has overflow-x: hidden from base reset) */

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
}

/* UTILS */
.container {
    width: 100%;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-cyan { color: var(--accent-cyan) !important; }
.text-white { color: var(--text-primary); }
.text-danger { color: #ff6b6b; }
.text-success { color: #4ade80; }
.text-muted { color: var(--text-secondary); }
.bg-light { background-color: var(--bg-section); }
.bg-dark { background-color: #071020; }
.bg-gradient { background: var(--gradient-primary); }
.mt-3 { margin-top: 1rem; }
.mt-4 { margin-top: 1.5rem; }
.mt-5 { margin-top: 3rem; }
.mb-4 { margin-bottom: 1.5rem; }
.mb-5 { margin-bottom: 3rem; }
.w-100 { width: 100%; }
.max-w-800 { max-width: 800px; }
.mx-auto { margin-left: auto; margin-right: auto; }
.fw-light { font-weight: 300; }
.fw-bold { font-weight: 700; }
.rounded-lg { border-radius: var(--border-radius); }
.justify-center { justify-content: center; }

/* Grid System */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: -12px;
}
.col-md-6 {
    width: 100%;
    padding: 12px;
}
@media (min-width: 768px) {
    .col-md-6 { width: 50%; }
}
.align-center { align-items: center; }

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 500;
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-lg {
    padding: 16px 32px;
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--white);
    box-shadow: 0 4px 15px rgba(10, 77, 157, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(10, 77, 157, 0.4);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--primary-blue);
    border: 2px solid var(--primary-blue);
}

.btn-outline:hover {
    background: var(--light-blue);
}

.btn-light {
    background: var(--white);
    color: var(--primary-blue);
    box-shadow: 0 4px 15px rgba(255, 255, 255, 0.3);
}

.btn-outline-light {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white);
}

.btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ==========================================================================
   Header & Nav
   ========================================================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: transparent;
    transition: var(--transition);
    padding: 20px 0;
}

.header.scrolled {
    background: rgba(10, 22, 40, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    padding: 12px 0;
    border-bottom: 1px solid var(--border-subtle);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    text-decoration: none;
    flex-shrink: 0;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.logo-img {
    height: 90px;
    width: auto;
    object-fit: contain;
    transition: var(--transition);
}

.logo-text-group {
    display: flex;
    align-items: center;
    margin: 0;
    max-width: 180px;
}

.logo-subtitle {
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--primary-blue);
    line-height: 1.2;
    text-align: left;
    white-space: normal;
    letter-spacing: -0.3px;
    transition: var(--transition);
}

.logo-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--gradient-primary);
    color: var(--white);
    border-radius: 10px;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-list {
    display: flex;
    gap: 24px;
}

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent-cyan);
    transition: var(--transition);
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--primary-blue);
    cursor: pointer;
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    padding: 160px 0 80px;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(ellipse at 70% 20%, rgba(26, 111, 212, 0.2) 0%, transparent 60%),
                radial-gradient(ellipse at 10% 80%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
                var(--bg-main);
}

.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    opacity: 0.25;
}

.orb-1 {
    top: -10%;
    right: -5%;
    width: 50vw;
    height: 50vw;
    background: var(--primary-blue);
}

.orb-2 {
    bottom: 20%;
    left: -10%;
    width: 30vw;
    height: 30vw;
    background: var(--accent-cyan);
    opacity: 0.12;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.badge {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(0, 194, 255, 0.1);
    color: var(--secondary-blue);
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.85rem;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 194, 255, 0.2);
}

.hero-title {
    font-size: 3.5rem;
    color: var(--text-primary);
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero-subtitle {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.hero-bullet-list {
    margin-bottom: 40px;
}

.hero-bullet-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
    font-size: 1.05rem;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.trust-badges {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    opacity: 0.7;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* MOCKUP UI CSS */
.hero-visual {
    position: relative;
    perspective: 1000px;
}

.mockup-container {
    position: relative;
    transform: rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.mockup-container:hover {
    transform: rotateY(0deg) rotateX(0deg);
}

.macos-window {
    background: var(--white);
    border-radius: 12px;
    box-shadow: 0 25px 60px rgba(10, 77, 157, 0.2);
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.window-header {
    background: #f1f5f9;
    padding: 12px;
    display: flex;
    align-items: center;
}

.dots {
    display: flex;
    gap: 6px;
}

.dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #cbd5e1;
}

.dots span:nth-child(1) { background: #ef4444; }
.dots span:nth-child(2) { background: #f59e0b; }
.dots span:nth-child(3) { background: #10b981; }

.window-body {
    height: 400px;
    background: #0f172a;
}

.app-ui-mockup {
    display: flex;
    height: 100%;
}

.sidebar {
    width: 80px;
    background: #1e293b;
    padding: 20px 10px;
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.main-view {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.toolbar {
    height: 50px;
    background: #334155;
    border-bottom: 1px solid #0f172a;
}

.dicom-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255,255,255,0.2);
}

.p-item {
    width: 100%;
    height: 40px;
    border-radius: 6px;
    background: #334155;
}

.floating-card {
    position: absolute;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    padding: 12px 20px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--primary-blue);
    animation: float 6s ease-in-out infinite;
}

.card-1 {
    bottom: -20px;
    left: -30px;
    animation-delay: 0s;
}

.card-2 {
    top: 50px;
    right: -30px;
    animation-delay: 2s;
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

/* ==========================================================================
   Sections Base
   ========================================================================== */
.section {
    padding: 100px 0;
    position: relative;
    scroll-margin-top: 80px; /* Offset for fixed header on anchor navigation */
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: var(--text-primary);
}

.section-desc {
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 40px;
}

/* Glassmorphism Classes */
.glass {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}

/* ==========================================================================
   About Section (Ecosystem Grid)
   ========================================================================== */
.ecosystem-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.eco-card {
    padding: 40px 20px;
    transition: var(--transition);
}

.eco-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
    border-bottom: 3px solid var(--accent-cyan);
}

.eco-icon {
    width: 70px;
    height: 70px;
    background: rgba(26, 111, 212, 0.2);
    color: var(--accent-cyan);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    margin: 0 auto 24px;
    border: 1px solid rgba(26, 111, 212, 0.3);
}

.eco-icon svg {
    width: 32px;
    height: 32px;
}

/* ==========================================================================
   Features Section
   ========================================================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.feature-card {
    padding: 30px;
    position: relative;
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-hover);
}

.feature-highlight {
    border: 2px solid var(--accent-cyan);
    background: linear-gradient(135deg, #112240, #0d2040);
}

.feature-badge {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--accent-cyan);
    color: var(--dark-gray);
    box-shadow: 0 4px 10px rgba(0, 194, 255, 0.3);
}

.feature-icon {
    width: 50px;
    height: 50px;
    color: var(--accent-cyan);
    margin-bottom: 20px;
}

.feature-icon svg { width: 40px; height: 40px; stroke-width: 1.5; }

.feature-card h3 {
    margin-bottom: 15px;
    font-size: 1.25rem;
    color: var(--text-primary);
}

.feature-list {
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.feature-list li {
    margin-bottom: 8px;
    position: relative;
    padding-left: 15px;
}

.feature-list li::before {
    content: "•";
    color: var(--accent-cyan);
    position: absolute;
    left: 0;
    font-weight: bold;
}

/* Wave Divider */
.wave-divider {
    position: relative;
    width: 100%;
    overflow: hidden;
    line-height: 0;
}
.wave-divider svg {
    position: relative;
    display: block;
    width: calc(100% + 1.3px);
    height: 60px;
}
.wave-divider .shape-fill { fill: var(--dark-gray); }

/* ==========================================================================
   Benefits
   ========================================================================== */
.benefits-list li {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 1.1rem;
    color: #cbd5e1;
}

.benefits-list li strong {
    color: var(--white);
}

.icon-box {
    color: var(--accent-cyan);
    flex-shrink: 0;
}

/* ==========================================================================
   Compatibility & Comparison
   ========================================================================== */
.compat-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.compat-card {
    padding: 30px;
}

.compat-icon {
    width: 60px;
    height: 60px;
    background: var(--primary-blue);
    color: white;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Comparison Table */
.table-responsive {
    overflow-x: auto;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--border-radius);
    overflow: hidden;
    box-shadow: var(--shadow-soft);
    border: 1px solid var(--border-subtle);
}

.comparison-table th, .comparison-table td {
    padding: 20px;
    border-bottom: 1px solid rgba(42, 155, 245, 0.1);
    text-align: center;
    color: var(--text-primary);
}

.comparison-table th {
    background: rgba(26, 111, 212, 0.15);
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--text-primary);
}

.comparison-table td:first-child, .comparison-table th:first-child {
    text-align: left;
    font-weight: 500;
}

.highlight-col {
    background: rgba(0, 212, 255, 0.05);
    border-left: 2px solid var(--accent-cyan);
    border-right: 2px solid var(--accent-cyan);
}
.comparison-table th.highlight-col {
    background: var(--gradient-primary);
    color: #fff;
    border: none;
}

/* ==========================================================================
   Testimonials
   ========================================================================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.testimonial-card {
    padding: 30px;
}

.stars {
    color: #f59e0b;
    margin-bottom: 15px;
    display: flex;
    gap: 2px;
}

.stars svg.fill { fill: #f59e0b; }

.quote {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.author {
    display: flex;
    align-items: center;
    gap: 15px;
    border-top: 1px solid var(--border-subtle);
    padding-top: 20px;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--gradient-primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.author .info strong { display: block; color: var(--text-primary); }
.author .info span { font-size: 0.85rem; color: var(--text-secondary); }

/* ==========================================================================
   Pricing
   ========================================================================== */
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    align-items: stretch;
    /* allow scale(1.05) on highlight card without clipping */
    padding: 16px 4px;
}

.pricing-card {
    background: var(--bg-card);
    border-radius: var(--border-radius);
    padding: 40px 30px;
    border: 1px solid var(--border-subtle);
    display: flex;
    flex-direction: column;
    position: relative;
    transition: var(--transition);
}

.pricing-card:hover { transform: translateY(-10px); box-shadow: var(--shadow-hover); }
.pricing-card.highlight {
    border: 2px solid var(--accent-cyan);
    transform: scale(1.05);
    box-shadow: 0 20px 60px rgba(0, 212, 255, 0.2);
    z-index: 10;
}
.pricing-card.highlight:hover { transform: scale(1.05) translateY(-5px); }

.pricing-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent-cyan);
    color: #071020;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
}

.plan-name { font-size: 1.5rem; margin-bottom: 10px; color: var(--text-primary); }
.plan-price { font-size: 2.5rem; font-weight: 700; color: var(--accent-cyan); margin-bottom: 15px; }
.plan-desc { color: var(--text-secondary); margin-bottom: 24px; min-height: 50px; }

.plan-features { flex: 1; margin-bottom: 30px; }
.plan-features li {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    color: var(--text-secondary);
}
.plan-features li svg { color: var(--accent-cyan); flex-shrink: 0; width: 20px; }

/* ==========================================================================
   FAQ
   ========================================================================== */
.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: 12px;
    margin-bottom: 15px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-question {
    width: 100%;
    background: none;
    border: none;
    padding: 20px;
    text-align: left;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-question svg { transition: transform 0.3s; }
.faq-question.active svg { transform: rotate(180deg); color: var(--accent-cyan); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
}

.faq-answer p { padding: 0 20px 20px; color: var(--text-secondary); }

/* ==========================================================================
   Contact Forms & Cards
   ========================================================================== */
.contact-card {
    padding: 40px;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-soft);
}

.contact-card h3 {
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px !important;
    letter-spacing: -0.3px;
}

.form-group { margin-bottom: 20px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 500; color: var(--text-secondary); font-size: 0.9rem; letter-spacing: 0.2px; }
.form-control {
    width: 100%;
    padding: 14px 18px;
    border: 1px solid rgba(42, 155, 245, 0.18);
    border-radius: 10px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    transition: var(--transition);
    background: rgba(10, 22, 40, 0.5);
    color: var(--text-primary);
}
.form-control::placeholder { color: rgba(148, 170, 191, 0.4); }
.form-control:hover {
    border-color: rgba(42, 155, 245, 0.35);
    background: rgba(10, 22, 40, 0.7);
}
.form-control:focus {
    outline: none;
    background: rgba(10, 22, 40, 0.8);
    border-color: var(--accent-cyan);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.12), inset 0 1px 2px rgba(0, 0, 0, 0.2);
}
textarea.form-control {
    resize: vertical;
    min-height: 120px;
}


.contact-info-item {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}
.contact-info-item .icon {
    width: 48px; height: 48px; border-radius: 50%;
    background: rgba(26, 111, 212, 0.2); color: var(--accent-cyan);
    display: flex; align-items: center; justify-content: center;
    border: 1px solid rgba(26, 111, 212, 0.3);
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background: #050e1a;
    color: var(--text-secondary);
    padding: 80px 0 20px;
    border-top: 1px solid rgba(42, 155, 245, 0.1);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-links h4 { color: var(--text-primary); margin-bottom: 20px; }
.footer-links li { margin-bottom: 12px; }
.footer-links a:hover { color: var(--accent-cyan); }

.footer-bottom { border-top: 1px solid rgba(42, 155, 245, 0.1); padding-top: 20px; text-align: center; }

/* ==========================================================================
   Placeholders & Floating Elements
   ========================================================================== */
.image-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f1f5f9;
    border: 2px dashed #cbd5e1;
    border-radius: 12px;
    color: #64748b;
    min-height: 300px;
}
.placeholder-icon { width: 48px; height: 48px; margin-bottom: 15px; opacity: 0.5; }
.gradient-bg { background: linear-gradient(135deg, #1e293b, #0f172a); border: none; color: #94a3b8; }

.floating-whatsapp {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background-color: #25D366;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(37, 211, 102, 0.3);
    z-index: 1000;
    transition: var(--transition);
}

.floating-whatsapp:hover { transform: scale(1.1); }

/* Utilities - Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.animate-on-scroll.is-visible { opacity: 1; transform: translateY(0); }

/* ==========================================================================
   Simulator Section
   ========================================================================== */
.simulator-wrapper {
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) 300px;
    gap: 20px;
    padding: 20px;
    min-height: 500px;
}

.simulator-menu {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.simulator-menu-title {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--accent-cyan);
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 10px;
}

.sim-tab-btn {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    border: 1px solid var(--border-subtle);
    border-radius: 8px;
    background: rgba(17, 34, 64, 0.4);
    color: var(--text-primary);
    text-align: left;
    cursor: pointer;
    transition: var(--transition);
}

.sim-tab-btn:hover {
    background: rgba(42, 155, 245, 0.1);
    border-color: rgba(42, 155, 245, 0.3);
}

.sim-tab-btn.active {
    background: rgba(26, 111, 212, 0.25);
    border-color: var(--accent-cyan);
    border-left: 4px solid var(--accent-cyan);
}

.sim-tab-btn i {
    color: var(--text-secondary);
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.sim-tab-btn.active i {
    color: var(--accent-cyan) !important;
}

.sim-tab-btn .btn-text strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.sim-tab-btn .btn-text span {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.sim-tab-btn.active .btn-text span {
    color: var(--text-primary);
}

.simulator-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.simulator-main .desktop-frame {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.4);
    min-width: 0;
    border: 1px solid var(--border-subtle);
}

.simulator-main .desktop-header {
    background: #0d1f36;
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-bottom: 1px solid var(--border-subtle);
}

.simulator-main .desktop-title-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.simulator-main .desktop-icon {
    width: 16px;
    height: 16px;
    color: var(--accent-cyan);
}

.simulator-main .desktop-controls span {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    margin-left: 6px;
}

.simulator-main .desktop-controls .close { background: #ef4444; }
.simulator-main .desktop-controls .min { background: #f59e0b; }
.simulator-main .desktop-controls .max { background: #10b981; }

.simulator-main .desktop-body {
    flex: 1;
    position: relative;
    background: #000;
    overflow: hidden;
    display: flex;
}

.sim-viewport {
    display: none;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
    position: relative;
}

.sim-viewport.active {
    display: flex;
}

.viewport-canvas {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
    background: #000;
}

.sim-image-container {
    position: relative;
    max-width: 100%;
    max-height: 100%;
    width: fit-content;
    height: fit-content;
}

.sim-canvas {
    display: block;
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    z-index: 2;
}

.worklist-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.worklist-wrapper .sim-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.sim-wl-btn {
    position: absolute;
    padding: 8px 16px;
    border-radius: 4px;
    border: none;
    font-weight: bold;
    cursor: pointer;
    font-size: 0.8rem;
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transition: transform 0.1s, background 0.2s;
    z-index: 10;
}

.sim-wl-btn:active {
    transform: scale(0.95);
}

.btn-wl-iniciar { top: 20px; left: 20px; }
.btn-wl-atualizar { top: 20px; left: 140px; background: #f59e0b; }
.btn-wl-agendar { top: 20px; right: 20px; background: #10b981; }

.sim-wl-console {
    position: absolute;
    bottom: 20px;
    left: 20px;
    right: 20px;
    height: 120px;
    background: rgba(15, 23, 42, 0.95);
    border: 1px solid #334155;
    border-radius: 6px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    backdrop-filter: blur(5px);
}

.console-header {
    background: #1e293b;
    padding: 5px 10px;
    font-size: 0.75rem;
    color: #94a3b8;
    font-weight: bold;
    border-bottom: 1px solid #334155;
}

.console-body {
    padding: 10px;
    overflow-y: auto;
    flex: 1;
    font-family: monospace;
    font-size: 0.8rem;
}

.console-line {
    margin-bottom: 4px;
    line-height: 1.2;
}

.simulator-controls {
    background: var(--bg-card);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid var(--border-subtle);
}

.controls-title {
    font-size: 1.1rem;
    margin-bottom: 20px;
    color: var(--accent-cyan);
}

.control-group {
    margin-bottom: 20px;
}

.label-wrapper {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.control-value {
    color: var(--accent-cyan);
}

.sim-range {
    width: 100%;
    accent-color: var(--accent-cyan);
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 30px;
}

.tip-box {
    margin-top: 30px;
    padding: 15px;
    background: rgba(0, 212, 255, 0.05);
    border-radius: 8px;
    display: flex;
    gap: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    border: 1px solid rgba(0, 212, 255, 0.1);
}

.tip-box i {
    color: var(--accent-cyan);
    flex-shrink: 0;
}

.service-status {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 15px;
    background: rgba(26, 111, 212, 0.1);
    border-radius: 6px;
    margin-bottom: 15px;
    font-weight: 500;
    color: var(--text-primary);
    border: 1px solid rgba(42, 155, 245, 0.15);
}

.status-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #94a3b8;
}

.status-indicator.active {
    background: #10b981;
    box-shadow: 0 0 10px rgba(16, 185, 129, 0.5);
}

.controls-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 15px;
}

.features-mini-list li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    margin-bottom: 8px;
    color: var(--text-secondary);
}

.d-none { display: none !important; }

/* ==========================================================================
   Responsive — Mobile First (Android, iOS, Windows)
   ========================================================================== */

/* ── Tablet / Small desktop (≤ 992px) ── */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .hero-content { order: 2; }
    .hero-visual  { order: 1; padding: 0 20px; }
    .hero-bullet-list li { justify-content: flex-start; text-align: left; }
    .hero-actions { justify-content: center; }
    .trust-badges { justify-content: center; }

    .footer-grid   { grid-template-columns: 1fr; gap: 30px; }
    .compat-grid   { grid-template-columns: 1fr; }
    .pricing-grid  { grid-template-columns: 1fr; max-width: 500px; margin: 0 auto; }
    .pricing-card.highlight { transform: scale(1); }
    .pricing-card.highlight:hover { transform: translateY(-5px); }
    .testimonials-grid { grid-template-columns: 1fr; }
    .ecosystem-grid    { grid-template-columns: 1fr; }

    .hero-title    { font-size: 2.6rem; }
    .section-title { font-size: 2rem; }

    /* Floating cards: keep inside frame, no overflow */
    .floating-card {
        display: none;
    }

    /* Mockup 3-D tilt off on tablet */
    .mockup-container {
        transform: none !important;
    }
}

/* ── Mobile landscape / large phone (≤ 768px) ── */
@media (max-width: 768px) {
    /* Header */
    .header { padding: 10px 0; }
    .header.scrolled { padding: 8px 0; }

    .logo { gap: 10px; }
    .logo-img { height: 60px; }
    .logo-subtitle { font-size: 0.85rem; }

    /* Mobile nav — dark theme */
    .nav-list {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(7, 16, 32, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 0;
        z-index: 999;
        /* Use opacity+visibility instead of clip-path for reliable touch on mobile */
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
        pointer-events: none;
    }
    .nav-list.active {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }
    .nav-list li {
        border-bottom: 1px solid rgba(42, 155, 245, 0.1);
        width: 100%;
        text-align: center;
    }
    .nav-list li:last-child { border-bottom: none; }
    .nav-list a {
        display: block;
        padding: 18px 24px;
        font-size: 1.15rem;
        font-weight: 600;
        color: var(--text-primary);
        pointer-events: auto; /* explicitly ensure tappable on all mobile browsers */
        -webkit-tap-highlight-color: rgba(0, 212, 255, 0.2);
    }
    .nav-list a:hover, .nav-list a:active { color: var(--accent-cyan); }
    .mobile-menu-btn { display: block; z-index: 1000; }
    .d-mobile-none { display: none !important; }

    /* Hero */
    .hero { padding: 120px 0 60px; }
    .hero-title { font-size: 2rem; letter-spacing: -0.5px; }
    .hero-subtitle { font-size: 1rem; }
    .hero-visual { padding: 0 10px; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .hero-actions { flex-direction: column; gap: 12px; }

    /* Sections */
    .section { padding: 60px 0; }
    .section-title { font-size: 1.75rem; }
    .section-desc  { font-size: 1rem; }

    /* Features grid single col */
    .features-grid { grid-template-columns: 1fr; }

    /* Comparison table scrollable */
    .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .comparison-table { min-width: 520px; }
    .comparison-table th, .comparison-table td { padding: 12px 10px; font-size: 0.85rem; }

    /* Contact form full-width */
    .contact-card { padding: 24px; }

    /* Footer */
    .footer { padding: 50px 0 20px; }
    .footer-brand .logo-img { height: 80px; }
    .footer-brand .logo-subtitle { font-size: 1rem; white-space: normal; }

    /* Benefits col ordering */
    .row.align-center { flex-direction: column; }
}

/* ── Small phone (≤ 576px) — portrait Android / iPhone SE ── */
@media (max-width: 576px) {
    .container { padding: 0 16px; }

    /* Header */
    .logo-img { height: 50px; }
    .logo-subtitle { display: none; } /* hide text, logo alone is enough */

    /* Hero */
    .hero { padding: 100px 0 50px; }
    .hero-title { font-size: 1.75rem; }
    .badge  { font-size: 0.78rem; padding: 5px 12px; }

    /* Trust badges wrap */
    .trust-badges { gap: 10px; }
    .trust-badge  { font-size: 0.72rem; }

    /* Desktop frame mockup scales down */
    .mockup-container .macos-window .window-body { height: 250px; }
    .hero-mockup-img { width: 100%; height: 100%; object-fit: cover; }

    /* Cards / Grid */
    .eco-card { padding: 24px 16px; }
    .feature-card { padding: 22px 16px; }
    .pricing-card { padding: 28px 20px; }
    .contact-card { padding: 20px 16px; }

    /* Sections */
    .section { padding: 48px 0; }
    .section-title { font-size: 1.5rem; }

    /* CTA button full width on small screens */
    .btn-lg { padding: 14px 20px; font-size: 1rem; }

    /* Simulator */
    .simulator-wrapper { padding: 14px; gap: 20px; }
    .sim-tab-btn {
        flex: 1 1 100%;
        max-width: 100%;
        padding: 12px;
        gap: 10px;
    }
    .sim-tab-btn .btn-text strong { font-size: 0.85rem; }
    .sim-tab-btn .btn-text span   { font-size: 0.7rem; }
    .simulator-main .desktop-frame { min-height: 220px; }

    /* Worklist console smaller */
    .sim-wl-console { height: 90px; }
    .btn-wl-iniciar  { font-size: 0.7rem; padding: 6px 10px; left: 10px; top: 10px; }
    .btn-wl-atualizar{ font-size: 0.7rem; padding: 6px 10px; left: 110px; top: 10px; }
    .btn-wl-agendar  { font-size: 0.7rem; padding: 6px 10px; right: 10px; top: 10px; }

    /* Testimonials spacing */
    .testimonial-card { padding: 20px 16px; }

    /* Footer */
    .footer-grid { gap: 24px; }
}

/* Simulator Responsive Adjustments (shared ≤ 1024px) */
@media (max-width: 1024px) {
    .simulator-wrapper {
        grid-template-columns: 1fr !important;
        gap: 24px;
    }
    .simulator-menu {
        flex-direction: row !important;
        flex-wrap: wrap;
        justify-content: center;
        width: 100%;
    }
    .simulator-menu-title {
        width: 100%;
        text-align: center;
        border-bottom: none;
        padding-bottom: 0;
        margin-bottom: 10px;
    }
    .sim-tab-btn {
        flex: 1 1 250px;
        max-width: 350px;
    }
    .simulator-controls {
        max-width: 600px;
        margin: 0 auto;
        width: 100%;
    }
}

/* ==========================================================================
   WhatsApp Chatbot Widget
   ========================================================================== */

.wa-chatbot {
    position: fixed;
    bottom: 28px;
    right: 28px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    font-family: var(--font-body, 'Inter', sans-serif);
}

/* Toggle Button */
.wa-toggle-btn {
    position: relative;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    border: none;
    background: #25D366;
    color: #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 24px rgba(37,211,102,0.55), 0 2px 8px rgba(0,0,0,0.25);
    transition: transform 0.25s cubic-bezier(.34,1.56,.64,1), box-shadow 0.25s ease;
}
.wa-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 10px 32px rgba(37,211,102,0.7), 0 2px 12px rgba(0,0,0,0.3);
}
.wa-toggle-btn--open { background: #128C7E; }
.wa-toggle-btn::before {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 50%;
    border: 2px solid rgba(37,211,102,0.5);
    animation: wa-ring 2s ease-out infinite;
}
@keyframes wa-ring {
    0%   { transform: scale(1);   opacity: 0.8; }
    70%  { transform: scale(1.3); opacity: 0; }
    100% { transform: scale(1.3); opacity: 0; }
}

/* Badge */
.wa-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #ef4444;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0a1628;
    transition: transform 0.3s ease;
}
.wa-badge--pulse { animation: wa-badge-bounce 0.6s ease 2; }
@keyframes wa-badge-bounce {
    0%, 100% { transform: scale(1); }
    50%       { transform: scale(1.4); }
}

/* Chat Window */
.wa-chat-window {
    width: 340px;
    max-height: 520px;
    border-radius: 18px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    background: #0d1b2a;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 0 1px rgba(37,211,102,0.15);
    transform-origin: bottom right;
    transform: scale(0.85) translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(.34,1.56,.64,1), opacity 0.25s ease;
}
.wa-chat-window--open {
    transform: scale(1) translateY(0);
    opacity: 1;
    pointer-events: all;
}

/* Header */
.wa-chat-header {
    background: linear-gradient(135deg, #128C7E 0%, #075E54 100%);
    padding: 14px 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}
.wa-header-avatar { position: relative; flex-shrink: 0; }
.wa-header-avatar svg { border-radius: 50%; border: 2px solid rgba(255,255,255,0.25); }
.wa-status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #25D366;
    border: 2px solid #075E54;
    animation: wa-pulse-dot 2s ease infinite;
}
@keyframes wa-pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0.4); }
    50%       { box-shadow: 0 0 0 5px rgba(37,211,102,0); }
}
.wa-header-info { flex: 1; min-width: 0; }
.wa-header-name  { display: block; font-size: 0.95rem; font-weight: 700; color: #fff; letter-spacing: 0.3px; }
.wa-header-status { display: block; font-size: 0.72rem; color: rgba(255,255,255,0.75); margin-top: 1px; }
.wa-close-btn {
    background: none;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s, color 0.2s;
    flex-shrink: 0;
}
.wa-close-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }

/* Body */
.wa-chat-body {
    flex: 1;
    overflow-y: auto;
    padding: 16px 14px 8px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    background: #0d1b2a;
}
.wa-chat-body::-webkit-scrollbar { width: 4px; }
.wa-chat-body::-webkit-scrollbar-track { background: transparent; }
.wa-chat-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 4px; }

/* Messages */
.wa-msg {
    display: flex;
    flex-direction: column;
    max-width: 88%;
    animation: wa-msg-in 0.25s ease;
}
@keyframes wa-msg-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.wa-msg--bot  { align-self: flex-start; }
.wa-msg--user { align-self: flex-end; }
.wa-bubble {
    padding: 10px 14px;
    border-radius: 16px;
    font-size: 0.84rem;
    line-height: 1.55;
    word-break: break-word;
}
.wa-msg--bot .wa-bubble {
    background: #1e3a5f;
    color: #e2eaf2;
    border-bottom-left-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.wa-msg--bot .wa-bubble strong { color: #00D4FF; }
.wa-msg--bot .wa-bubble a { color: #25D366; text-decoration: underline; }
.wa-msg--user .wa-bubble {
    background: linear-gradient(135deg, #25D366, #128C7E);
    color: #fff;
    border-bottom-right-radius: 4px;
    box-shadow: 0 1px 4px rgba(0,0,0,0.3);
}
.wa-time { font-size: 0.65rem; color: rgba(180,200,220,0.45); margin-top: 3px; padding: 0 4px; }
.wa-msg--user .wa-time { align-self: flex-end; }

/* Typing indicator */
.wa-typing {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    background: #1e3a5f;
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    width: fit-content;
}
.wa-typing span {
    display: block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(0,212,255,0.7);
    animation: wa-dot 1.2s ease-in-out infinite;
}
.wa-typing span:nth-child(2) { animation-delay: 0.2s; }
.wa-typing span:nth-child(3) { animation-delay: 0.4s; }
@keyframes wa-dot {
    0%, 60%, 100% { transform: translateY(0);    opacity: 0.5; }
    30%            { transform: translateY(-6px); opacity: 1; }
}

/* Footer */
.wa-chat-footer {
    background: #0a1628;
    padding: 10px 12px 14px;
    flex-shrink: 0;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.wa-reply-btns { display: flex; flex-direction: column; gap: 7px; }
.wa-quick-btn {
    width: 100%;
    padding: 10px 14px;
    border-radius: 10px;
    border: 1px solid rgba(37,211,102,0.35);
    background: rgba(37,211,102,0.07);
    color: #25D366;
    font-family: var(--font-body, 'Inter', sans-serif);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    text-align: left;
    transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.15s;
    line-height: 1.3;
}
.wa-quick-btn:hover {
    background: rgba(37,211,102,0.18);
    border-color: #25D366;
    color: #fff;
    transform: translateX(3px);
}
.wa-quick-btn:active { transform: scale(0.97); }

/* Mobile */
@media (max-width: 480px) {
    .wa-chatbot { bottom: 16px; right: 16px; }
    .wa-chat-window { width: calc(100vw - 32px); max-height: 75vh; }
}
