/* ========================================
   PLUSPOINT CASE STUDIES - UNIFIED STYLE
   Minimalista mas com identidade visual
======================================== */

:root {
    /* Colors - Neutral Palette */
    --color-text: #1a1a1a;
    --color-text-light: #666666;
    --color-bg: #ffffff;
    --color-bg-alt: #f8f9fa;
    --color-border: #e5e7eb;
    --color-accent: #000000;
    --color-success: #059669;
    --color-warning: #f59e0b;
    
    /* Typography */
    --font-base: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Spacing - 8pt Grid */
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-5: 2.5rem;
    --space-6: 3rem;
    --space-8: 4rem;
    --space-10: 5rem;
    
    /* Border Radius */
    --radius-sm: 4px;
    --radius: 8px;
    --radius-lg: 12px;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.06);
    
    /* Transitions */
    --transition: 0.2s ease;
}

/* ========== BASE RESET ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-base);
    font-size: 16px;
    line-height: 1.6;
    color: var(--color-text);
    background: var(--color-bg);
}

/* ========== HEADER - CLEAN ========== */
.case-header {
    background: var(--color-bg);
    padding: var(--space-6) var(--space-3);
    text-align: center;
    border-bottom: 1px solid var(--color-border);
}

.case-logo {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    margin-bottom: var(--space-3);
    color: var(--color-text-light);
}

.case-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: var(--space-2);
    color: var(--color-accent);
    letter-spacing: -0.02em;
}

.case-subtitle {
    font-size: 1.125rem;
    color: var(--color-text-light);
    font-weight: 400;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

.case-date {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-top: var(--space-2);
}

/* ========== HERO IMAGE ========== */
.hero-image {
    width: 100%;
    max-width: 100%;
    height: auto;
    display: block;
    border-bottom: 1px solid var(--color-border);
}

/* ========== CONTAINER ========== */
.case-container {
    /* Mobile-first container: full width with comfortable padding */
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    padding: var(--space-4) var(--space-3);
}

@media (min-width: 768px) {
    .case-container {
        max-width: 720px;
        padding: var(--space-6) var(--space-3);
    }
}

/* ========== TYPOGRAPHY ========== */
h2 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    margin: var(--space-6) 0 var(--space-3);
    color: var(--color-accent);
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.4;
    margin: var(--space-5) 0 var(--space-2);
    color: var(--color-text);
}

h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--color-accent);
}

p {
    margin-bottom: var(--space-3);
    line-height: 1.7;
    color: var(--color-text);
}

strong {
    font-weight: 600;
    color: var(--color-accent);
}

/* ========== LISTS ========== */
ul {
    margin: var(--space-3) 0;
    padding-left: var(--space-4);
}

ul li {
    margin-bottom: var(--space-2);
    line-height: 1.7;
}

ul li::marker {
    color: var(--color-text-light);
}

/* ========== STATS CARDS - TEAL DESIGN (HORIZONTAL LAYOUT) ========== */
.stats-grid {
    /* Mobile-first: stack cards by default for narrow viewports */
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-3);
    margin: var(--space-6) 0;
}

/* Larger layouts: progressively add columns */
@media (min-width: 576px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-4);
    }
}

@media (min-width: 992px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: var(--space-4);
        margin: var(--space-8) 0;
    }
}

/* Para row.mb-5 mantém Bootstrap mas ajusta cards */
.row.mb-5 {
    margin-top: var(--space-8);
    margin-bottom: var(--space-8) !important;
}

.row.mb-5 > [class*="col-"] {
    padding: 0 calc(var(--space-4) / 2);
    margin-bottom: var(--space-4);
}

.stat-card {
    background: linear-gradient(135deg, #1e5a6d 0%, #164555 100%);
    color: white;
    padding: var(--space-5) var(--space-3);
    border-radius: 20px;
    text-align: center;
    transition: all var(--transition);
    box-shadow: 0 4px 12px rgba(30, 90, 109, 0.2);
    min-height: 160px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.stat-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 12px 24px rgba(30, 90, 109, 0.3);
}

.stat-card .number,
.stat-card .stat-number {
    display: block;
    font-size: 3rem;
    font-weight: 700;
    line-height: 1;
    margin-bottom: var(--space-2);
    letter-spacing: -0.02em;
}

.stat-card .label,
.stat-card .stat-label {
    display: block;
    font-size: 0.9375rem;
    font-weight: 500;
    line-height: 1.4;
    opacity: 0.95;
}

/* ========== RESPONSIVE - STATS CARDS ========== */
@media (max-width: 767px) {
    .stats-grid {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }
    
    .row.mb-5 > [class*="col-"] {
        padding: 0;
        margin-bottom: var(--space-3);
    }
    
    .stat-card {
        padding: var(--space-4) var(--space-3);
        min-height: 140px;
    }
    
    .stat-card .number,
    .stat-card .stat-number {
        font-size: 2.5rem;
    }
}

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

/* Remove conflito com Bootstrap */
.row.mb-5:not(.stats-grid) {
    display: flex !important;
}

/* ========== HIGHLIGHT BOX - WITH ICON ========== */
.highlight-box {
    background: var(--color-bg-alt);
    padding: var(--space-5);
    margin: var(--space-6) 0;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-accent);
    position: relative;
}

.highlight-box::before {
    content: '💡';
    position: absolute;
    top: var(--space-4);
    right: var(--space-4);
    font-size: 1.5rem;
    opacity: 0.3;
}

.highlight-box p {
    margin-bottom: 0;
    font-size: 1.0625rem;
    line-height: 1.7;
}

/* ========== CHALLENGE CARDS - RED/ORANGE THEME ========== */
.challenge-grid,
.row:has(.challenge-card) {
    margin: var(--space-6) 0;
}

.challenge-card {
    background: white;
    padding: var(--space-5);
    border-radius: 16px;
    transition: all var(--transition);
    border: 2px solid transparent;
    position: relative;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    margin-bottom: var(--space-4);
}

/* Color Coding for Challenges - Red/Orange spectrum */
.challenge-card:nth-child(1) {
    border-left: 4px solid #ef4444;
}

.challenge-card:nth-child(2) {
    border-left: 4px solid #f97316;
}

.challenge-card:nth-child(3) {
    border-left: 4px solid #f59e0b;
}

.challenge-card:nth-child(4) {
    border-left: 4px solid #eab308;
}

.challenge-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.challenge-card:nth-child(1):hover {
    border-color: #ef4444;
    background: linear-gradient(135deg, #fef2f2 0%, white 100%);
}

.challenge-card:nth-child(2):hover {
    border-color: #f97316;
    background: linear-gradient(135deg, #fff7ed 0%, white 100%);
}

.challenge-card:nth-child(3):hover {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, white 100%);
}

.challenge-card:nth-child(4):hover {
    border-color: #eab308;
    background: linear-gradient(135deg, #fefce8 0%, white 100%);
}

.challenge-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-3);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    transition: all var(--transition);
}

.challenge-card h4::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0;
    transition: opacity var(--transition);
}

.challenge-card:hover h4::before {
    opacity: 1;
}

.challenge-card:hover h4 {
    transform: translateX(4px);
}

.challenge-card p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--color-text);
    margin: 0;
}

/* ========== ALGORITHM FACTORS - BLUE/GREEN THEME ========== */
.algorithm-factors {
    margin: var(--space-8) 0;
}

.algorithm-factors .col-12 {
    margin-bottom: var(--space-4);
}

.factor-card {
    background: white;
    padding: var(--space-5);
    border-radius: 16px;
    transition: all var(--transition);
    border: 2px solid transparent;
    position: relative;
    height: 100%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Color Coding for Algorithm Factors - Blue/Green spectrum */
.factor-card:nth-child(1) {
    border-left: 4px solid #3b82f6;
}

.factor-card:nth-child(2) {
    border-left: 4px solid #8b5cf6;
}

.factor-card:nth-child(3) {
    border-left: 4px solid #f59e0b;
}

.factor-card:nth-child(4) {
    border-left: 4px solid #10b981;
}

.factor-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.factor-card:nth-child(1):hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #eff6ff 0%, white 100%);
}

.factor-card:nth-child(2):hover {
    border-color: #8b5cf6;
    background: linear-gradient(135deg, #f5f3ff 0%, white 100%);
}

.factor-card:nth-child(3):hover {
    border-color: #f59e0b;
    background: linear-gradient(135deg, #fffbeb 0%, white 100%);
}

.factor-card:nth-child(4):hover {
    border-color: #10b981;
    background: linear-gradient(135deg, #ecfdf5 0%, white 100%);
}

.factor-card h4 {
    font-size: 1.125rem;
    font-weight: 600;
    margin-bottom: var(--space-3);
    color: var(--color-accent);
    display: flex;
    align-items: center;
    gap: var(--space-2);
    transition: all var(--transition);
}

.factor-card h4::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: 0;
    transition: opacity var(--transition);
}

.factor-card:hover h4::before {
    opacity: 1;
}

.factor-card:hover h4 {
    transform: translateX(4px);
}

.factor-card p {
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--color-text);
    margin: 0;
}

/* ========== TABLE - CLEAN DESIGN ========== */
.table-wrapper {
    margin: var(--space-6) 0;
    overflow-x: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--color-bg);
}

table thead {
    background: var(--color-bg-alt);
    border-bottom: 2px solid var(--color-border);
}

table th {
    padding: var(--space-3);
    text-align: left;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--color-accent);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

table td {
    padding: var(--space-3);
    border-bottom: 1px solid var(--color-border);
    font-size: 0.9375rem;
}

table tbody tr:last-child td {
    border-bottom: none;
}

table tbody tr:hover {
    background: var(--color-bg-alt);
}

table tbody tr {
    transition: background var(--transition);
}

.improvement {
    color: var(--color-success);
    font-weight: 600;
}

/* ========== IMAGE CONTAINER - CONTROLLED SIZE ========== */
.chart-container,
.image-container {
    margin: var(--space-8) 0;
    text-align: center;
}

.chart-container img,
.image-container img {
    max-width: 800px;
    width: 100%;
    height: auto;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
    display: block;
    margin: 0 auto;
    box-shadow: var(--shadow-sm);
}

.chart-caption,
.image-caption {
    font-size: 0.875rem;
    color: var(--color-text-light);
    margin-top: var(--space-3);
    font-style: italic;
}

/* ========== TESTIMONIAL - QUOTE DESIGN ========== */
.testimonial {
    background: var(--color-bg-alt);
    padding: var(--space-6);
    margin: var(--space-8) 0;
    border-radius: var(--radius-lg);
    border-left: 4px solid var(--color-accent);
    position: relative;
}

.testimonial::before {
    content: '"';
    position: absolute;
    top: var(--space-3);
    left: var(--space-5);
    font-size: 4rem;
    color: var(--color-border);
    font-family: Georgia, serif;
    line-height: 1;
}

.testimonial p {
    font-size: 1.125rem;
    line-height: 1.7;
    font-style: italic;
    margin-bottom: var(--space-4);
    color: var(--color-text);
    padding-left: var(--space-5);
}

.testimonial-author,
.testimonial .author {
    font-style: normal;
    font-weight: 600;
    font-size: 1rem;
    color: var(--color-accent);
    padding-left: var(--space-5);
    display: block;
}

/* ========== CTA SECTION - STRONG VISUAL ========== */
.cta-section {
    background: var(--color-accent);
    color: var(--color-bg);
    padding: var(--space-10) var(--space-4);
    text-align: center;
    margin: var(--space-10) 0 var(--space-6);
    border-radius: var(--radius-lg);
}

.cta-section h2 {
    color: var(--color-bg);
    margin-top: 0;
    margin-bottom: var(--space-4);
}

.cta-section p {
    color: rgba(255, 255, 255, 0.9);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    font-size: 1.125rem;
}

.cta-button {
    display: inline-block;
    background: var(--color-bg);
    color: var(--color-accent);
    padding: 1rem 2.5rem;
    border-radius: var(--radius);
    font-weight: 600;
    text-decoration: none;
    transition: all var(--transition);
    margin-top: var(--space-4);
    font-size: 1rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cta-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
    color: var(--color-accent);
}

/* ========== PRINT BUTTON ========== */
.print-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: var(--color-accent);
    color: var(--color-bg);
    padding: 0.875rem 1.75rem;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    transition: all var(--transition);
    font-family: var(--font-base);
}

.print-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.2);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 767px) {
    .stats-grid,
    .row.mb-5 {
        grid-template-columns: 1fr;
        gap: var(--space-3);
    }
    
    .stat-card {
        padding: var(--space-5) var(--space-4);
        min-height: 160px;
    }
    
    .stat-card .number,
    .stat-card .stat-number {
        font-size: 3rem;
    }
    
    .challenge-card,
    .factor-card {
        margin-bottom: var(--space-3);
    }
    
    .case-container {
        padding: var(--space-4) var(--space-2);
    }
    
    .cta-section {
        margin-left: 0;
        margin-right: 0;
        padding: var(--space-6) var(--space-3);
    }
    
    .print-btn {
        bottom: 1rem;
        right: 1rem;
        padding: 0.75rem 1.5rem;
        font-size: 0.8125rem;
    }
    
    table {
        font-size: 0.875rem;
    }
    
    table th,
    table td {
        padding: var(--space-2);
    }
}

@media (min-width: 768px) and (max-width: 991px) {
    .stats-grid,
    .row.mb-5 {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media print {
    .print-btn { display: none; }
    body { background: white; }
    .case-header { border: none; }
    
    .stat-card,
    .challenge-card,
    .factor-card {
        break-inside: avoid;
    }
}

/* Fix Bootstrap grid conflicts */
.row.mb-5 {
    display: grid !important;
}

/* ========== UTILITIES ========== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.mb-0 { margin-bottom: 0 !important; }
.mt-2 { margin-top: var(--space-2); }
.mt-4 { margin-top: var(--space-4); }
.mb-4 { margin-bottom: var(--space-4); }

/* Prevent horizontal overflow globally (reinforce mobile-first) */
html, body { overflow-x: hidden; }

/* Responsive images utility (ensure no horizontal overflow) */
.img-fluid, img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Touch target utility: ensure interactive elements meet 44x44 minimum */
.touch-target,
.btn,
.cta-button,
.cta-btn-primary,
.cta-btn-secondary,
.cta-btn-fixed,
.print-btn,
.whatsapp-bubble,
.preview-close,
.btn-whatsapp-send,
.quick-reply {
    -webkit-tap-highlight-color: rgba(0,0,0,0);
    min-height: 44px;
    min-width: 44px;
    padding: 0.5rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Preserve .stat-card flex layout while ensuring minimum touch size */
.stat-card {
    min-height: 44px;
    min-width: 44px;
    padding: var(--space-4);
    display: flex; /* keep original layout */
    align-items: center;
    justify-content: center;
}

/* Ensure readable body text on small screens (>=16px) */
@media (max-width: 767px) {
    body, p, table td, table th, .stat-card .label, .stat-card .stat-label, .highlight-box p {
        font-size: 1rem; /* 16px */
        line-height: 1.6;
    }

    /* Reduce heavy shadows/animations on mobile for performance */
    .stat-card, .challenge-card, .factor-card {
        box-shadow: var(--shadow-sm);
        transform: none !important;
    }

    /* Make sure fixed elements don't cause overflow */
    .whatsapp-preview, .cta-btn-fixed {
        right: 1rem;
        left: auto;
        width: calc(100% - 2rem);
        max-width: 420px;
    }
}

/* ========== BOTÃO FECHAR MINIMALISTA REDONDO ========== */
.btn-close-minimal {
    position: fixed;
    top: 1.5rem;
    right: 1.5rem;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--color-bg);
    border: 1.5px solid #e5e7eb; /* Cinza claro */
    border-radius: 50%;
    color: #9ca3af; /* Cinza do X */
    text-decoration: none;
    transition: all var(--transition);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    z-index: 1000;
    cursor: pointer;
}

.btn-close-minimal:hover {
    background: #f9fafb;
    color: #1a1a1a;
    border-color: #d1d5db;
    transform: scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.08);
}

.btn-close-minimal svg {
    transition: transform var(--transition);
}

.btn-close-minimal:hover svg {
    transform: rotate(90deg);
}

/* Tooltip on hover */
.btn-close-minimal::after {
    content: attr(title);
    position: absolute;
    top: 50%;
    right: calc(100% + 12px);
    transform: translateY(-50%);
    background: #1a1a1a;
    color: white;
    padding: 0.5rem 0.875rem;
    border-radius: 6px;
    font-size: 0.8125rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-weight: 500;
}

.btn-close-minimal::after::before {
    content: '';
    position: absolute;
    top: 50%;
    right: -4px;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 4px solid #1a1a1a;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
}

.btn-close-minimal:hover::after {
    opacity: 1;
}

/* Responsive */
@media (max-width: 767px) {
    .btn-close-minimal {
        top: 1rem;
        right: 1rem;
        width: 40px;
        height: 40px;
    }
    
    .btn-close-minimal svg {
        width: 18px;
        height: 18px;
    }
    
    .btn-close-minimal::after {
        display: none;
    }
}

@media print {
    .btn-close-minimal {
        display: none;
    }
}

/* ========== CTA SECTION - 2025/2026 MODERN DESIGN ========== */
.cta-section-modern {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    position: relative;
    margin: var(--space-10) 0 var(--space-6);
    margin-bottom: 0 !important;
    padding: var(--space-10) var(--space-4);
    border-radius: 0;
    overflow: hidden;
}

/* Glassmorphism Effect */
.cta-section-modern::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
}

.cta-section-modern::after {
    content: '';
    position: absolute;
    bottom: -100px;
    left: -100px;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12) 0%, transparent 70%);
    border-radius: 50%;
    filter: blur(60px);
}

.cta-container {
    max-width: 900px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
    text-align: center;
}

/* Badge de Prova Social */
.cta-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: var(--space-4);
    animation: fadeInDown 0.6s ease;
}

.cta-badge svg {
    color: #fbbf24;
}

/* Headlines */
.cta-headline {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    color: white;
    line-height: 1.2;
    margin-bottom: var(--space-3);
    letter-spacing: -0.02em;
    animation: fadeInUp 0.6s ease 0.1s backwards;
}

.cta-subheadline {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: var(--space-5);
    animation: fadeInUp 0.6s ease 0.2s backwards;
}

.cta-subheadline strong {
    color: #60a5fa;
    font-weight: 600;
}

/* Stats Inline */
.cta-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-4);
    margin-bottom: var(--space-5);
    padding: var(--space-4);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: fadeInUp 0.6s ease 0.3s backwards;
}

.cta-stat-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.cta-stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #60a5fa;
    line-height: 1;
}

.cta-stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.7);
}

.cta-stat-divider {
    width: 1px;
    height: 40px;
    background: rgba(255, 255, 255, 0.15);
}

/* Description */
.cta-description {
    font-size: 1.0625rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.75);
    margin-bottom: var(--space-6);
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    animation: fadeInUp 0.6s ease 0.4s backwards;
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    align-items: center;
    margin-bottom: var(--space-6);
    animation: fadeInUp 0.6s ease 0.5s backwards;
}

.cta-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 1.125rem 2.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1.0625rem;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
    position: relative;
    overflow: hidden;
}

.cta-btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.cta-btn-primary:hover::before {
    left: 100%;
}

.cta-btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 32px rgba(59, 130, 246, 0.5);
    color: white;
}

.cta-btn-primary svg {
    transition: transform 0.3s ease;
}

.cta-btn-primary:hover svg {
    transform: translateX(4px);
}

.cta-btn-secondary {
    display: inline-flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 500;
    font-size: 1rem;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
}

.cta-btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.3);
    color: white;
    transform: translateY(-2px);
}

/* Trust Elements */
/* Trust Elements - CORRIGIDO */
.cta-trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-5);
    animation: fadeInUp 0.6s ease 0.6s backwards;
}

.cta-trust-item {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
}

.cta-trust-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: rgba(16, 185, 129, 0.15);
    border-radius: 50%;
    color: #10b981;
    flex-shrink: 0;
    padding: 6px;
}

.cta-trust-icon svg {
    width: 16px;
    height: 16px;
    display: block;
}



/* Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive */
@media (max-width: 767px) {
    .cta-section-modern {
        padding: var(--space-8) var(--space-3);
       
        margin-left: 0;
        margin-right: 0;
    }

    .cta-stats {
        flex-direction: column;
        gap: var(--space-3);
    }

    .cta-stat-divider {
        width: 60%;
        height: 1px;
    }

    .cta-buttons {
        width: 100%;
    }

    .cta-btn-primary,
    .cta-btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .cta-trust {
        flex-direction: column;
        gap: var(--space-3);
        align-items: flex-start;
    }
    
    .cta-trust-item {
        width: 100%;
    }
}

/* Small-screen table responsiveness: avoid horizontal overflow while keeping semantics */
@media (max-width: 767px) {
    .case-container table {
        width: 100%;
        max-width: 100%;
        overflow: auto;
        display: table;
    }

    .case-container table th,
    .case-container table td {
        white-space: normal;
        word-break: break-word;
    }

    /* If tables still overflow, allow horizontal scroll inside container */
    .case-container {
        overflow-x: auto;
    }
}

@media print {
    .cta-section-modern {
        background: white;
        color: black;
        border: 2px solid black;
    }
}

/* ========================================
   MODAL CONSULTA - MODERN SAAS STYLE 2025
   Design profissional para empresas de software
======================================== */

/* Modal Overlay */
.modal-backdrop {
    background: linear-gradient(135deg, rgba(15, 23, 42, 0.85) 0%, rgba(30, 41, 59, 0.9) 100%);
    backdrop-filter: blur(8px);
}

/* Modal Dialog */
.modal-dialog {
    max-width: 520px;
}

/* Modal Content */
#modalConsulta .modal-content {
    border: none;
    border-radius: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
    box-shadow: 
        0 20px 60px rgba(15, 23, 42, 0.25),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    position: relative;
}

/* Decorative top border */
#modalConsulta .modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
}

/* Modal Header */
#modalConsulta .modal-header {
    padding: 2rem 2rem 1rem 2rem;
    background: transparent;
    border: none;
    position: relative;
}

#modalConsulta .modal-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    letter-spacing: -0.02em;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#modalConsulta .modal-title::before {
    content: '🚀';
    font-size: 1.75rem;
    line-height: 1;
}

/* Close Button */
#modalConsulta .btn-close {
    width: 36px;
    height: 36px;
    background: #f1f5f9;
    border-radius: 12px;
    opacity: 1;
    transition: all 0.2s ease;
    position: relative;
}

#modalConsulta .btn-close:hover {
    background: #e2e8f0;
    transform: rotate(90deg);
}

/* Modal Body */
#modalConsulta .modal-body {
    padding: 1.5rem 2rem 2rem 2rem;
}

/* Form Labels */
#modalConsulta .form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: #334155;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.375rem;
}



/* Form Controls */
#modalConsulta .form-control {
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 0.875rem 1rem;
    font-size: 0.9375rem;
    transition: all 0.2s ease;
    background: #ffffff;
}

#modalConsulta .form-control:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    background: #ffffff;
}

#modalConsulta .form-control::placeholder {
    color: #94a3b8;
}

/* Textarea */
#modalConsulta textarea.form-control {
    resize: vertical;
    min-height: 90px;
}

/* Alert Messages */
#modalConsulta .alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

#modalConsulta .alert::before {
    font-size: 1.25rem;
    line-height: 1;
}

#modalConsulta .alert-success {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    color: #065f46;
    border-left: 4px solid #10b981;
}

#modalConsulta .alert-success::before {
    content: '✓';
    color: #10b981;
}

#modalConsulta .alert-danger {
    background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

#modalConsulta .alert-danger::before {
    content: '⚠';
    color: #ef4444;
}

/* Submit Button */
#modalConsulta #btnSubmit {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border: none;
    border-radius: 12px;
    padding: 1rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 
        0 4px 12px rgba(59, 130, 246, 0.3),
        0 1px 3px rgba(0, 0, 0, 0.1);
}

#modalConsulta #btnSubmit::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

#modalConsulta #btnSubmit:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 8px 24px rgba(59, 130, 246, 0.4),
        0 4px 8px rgba(0, 0, 0, 0.1);
}

#modalConsulta #btnSubmit:hover::before {
    left: 100%;
}

#modalConsulta #btnSubmit:active {
    transform: translateY(0);
}

#modalConsulta #btnSubmit:disabled {
    background: #cbd5e1;
    cursor: not-allowed;
    transform: none;
}

/* Spinner */
#modalConsulta .spinner-border {
    width: 1rem;
    height: 1rem;
    border-width: 2px;
}

/* Form Footer - Trust Badges */
.modal-footer-trust {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    padding: 1.5rem 2rem;
    background: linear-gradient(180deg, transparent 0%, #f8fafc 100%);
    border-top: 1px solid #e2e8f0;
}

.modal-trust-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: #64748b;
    font-weight: 500;
}

.modal-trust-badge svg {
    width: 18px;
    height: 18px;
    color: #10b981;
}

/* Input Icons */


.input-with-icon .form-control {
    padding-left: 2.75rem;
}



.input-with-icon .form-control:focus + .input-icon {
    color: #3b82f6;
}

/* Required indicator */
#modalConsulta .form-label .required {
    color: #ef4444;
    margin-left: 2px;
}

/* Validation states */
#modalConsulta .form-control.is-valid {
    border-color: #10b981;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2310b981' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1rem;
    padding-right: 3rem;
}

#modalConsulta .form-control.is-invalid {
    border-color: #ef4444;
}

/* Animation */
@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal.show #modalConsulta .modal-dialog {
    animation: modalSlideIn 0.3s ease-out;
}

/* Mobile Responsive */
@media (max-width: 576px) {
    .modal-dialog {
        margin: 0.5rem;
        max-width: calc(100% - 1rem);
    }

    #modalConsulta .modal-header,
    #modalConsulta .modal-body {
        padding-left: 1.5rem;
        padding-right: 1.5rem;
    }

    #modalConsulta .modal-title {
        font-size: 1.25rem;
    }

    .modal-footer-trust {
        flex-direction: column;
        gap: 0.75rem;
        padding: 1rem 1.5rem;
    }

    #modalConsulta .form-control {
        padding: 0.75rem 0.875rem;
    }
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    #modalConsulta .modal-content {
        background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
    }

    #modalConsulta .modal-title {
        color: #f8fafc;
    }

    #modalConsulta .form-label {
        color: #cbd5e1;
    }

    #modalConsulta .form-control {
        background: #334155;
        border-color: #475569;
        color: #f8fafc;
    }

    #modalConsulta .form-control:focus {
        background: #334155;
        border-color: #3b82f6;
    }

    #modalConsulta .btn-close {
        background: #334155;
        filter: invert(1) brightness(2);
    }
}

/* Container do input com ícone */
.input-with-icon {
    position: relative;
}

/* Ícone SVG dentro do input */
.input-with-icon .input-icon {
    position: absolute;
    right: 12px;              /* Distância do ícone à esquerda */
    top: 50%;
    transform: translateY(-50%);
    color: #6c757d;          /* Cor semelhante ao placeholder do Bootstrap */
    pointer-events: none;    /* Evita interferir com o clique no input */
}

/* Input propriamente dito */
.input-with-icon .form-control {
    padding-left: 42px;      /* Espaço interno para afastar o texto/placeholder do ícone */
}

:root {
    --whatsapp-green: #25D366;
    --whatsapp-dark: #128C7E;
    --whatsapp-light: #DCF8C6;
}

/* === BOTÃO PRINCIPAL === */
.whatsapp-float {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9998;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    animation: floatIn 0.6s ease-out;
}

.whatsapp-float:hover {
    transform: translateY(-8px) scale(1.05);
}

.whatsapp-float:active {
    transform: translateY(-4px) scale(0.98);
}

/* Pulso animado de fundo */
.whatsapp-pulse {
    position: absolute;
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background: var(--whatsapp-green);
    opacity: 0.3;
    animation: pulse 2s infinite;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

@keyframes pulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 0.3;
    }
    50% {
        transform: translate(-50%, -50%) scale(1.2);
        opacity: 0.1;
    }
}

/* Bubble principal */
.whatsapp-bubble {
    position: relative;
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--whatsapp-green) 0%, var(--whatsapp-dark) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 
        0 8px 24px rgba(37, 211, 102, 0.35),
        0 0 0 4px rgba(255, 255, 255, 0.9),
        0 0 0 1px rgba(37, 211, 102, 0.2);
    transition: all 0.3s ease;
}

.whatsapp-float:hover .whatsapp-bubble {
    box-shadow: 
        0 12px 32px rgba(37, 211, 102, 0.45),
        0 0 0 6px rgba(255, 255, 255, 0.95),
        0 0 0 1px rgba(37, 211, 102, 0.3);
}

.whatsapp-bubble svg {
    width: 32px;
    height: 32px;
    color: white;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Notificação badge */
.whatsapp-notification {
    position: absolute;
    top: -4px;
    right: -4px;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 
        0 4px 8px rgba(239, 68, 68, 0.4),
        0 0 0 3px white;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0) scale(1);
    }
    40% {
        transform: translateY(-8px) scale(1.1);
    }
    60% {
        transform: translateY(-4px) scale(1.05);
    }
}

/* === TOOLTIP === */
.whatsapp-tooltip {
    position: absolute;
    right: calc(100% + 16px);
    top: 50%;
    transform: translateY(-50%);
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(12px);
    padding: 12px 16px;
    border-radius: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateY(-50%) translateX(-4px);
}

/* Seta do tooltip */
.whatsapp-tooltip::after {
    content: '';
    position: absolute;
    right: -6px;
    top: 50%;
    transform: translateY(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid rgba(15, 23, 42, 0.95);
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
}

.tooltip-text {
    display: block;
    color: white;
    font-size: 0.9375rem;
    font-weight: 600;
    margin-bottom: 2px;
}

.tooltip-subtext {
    display: block;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.75rem;
    font-weight: 500;
}

/* === PREVIEW CHAT === */
.whatsapp-preview {
    position: fixed;
    bottom: 7rem;
    right: 2rem;
    width: 360px;
    background: white;
    border-radius: 16px;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.15),
        0 0 0 1px rgba(0, 0, 0, 0.05);
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    pointer-events: none;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    z-index: 9997;
    overflow: hidden;
}

.whatsapp-preview.active {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: all;
}

/* Header do preview */
.preview-header {
    background: linear-gradient(135deg, var(--whatsapp-green) 0%, var(--whatsapp-dark) 100%);
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 12px;
    position: relative;
}

.preview-avatar {
    position: relative;
    width: 48px;
    height: 48px;
    flex-shrink: 0;
}

.preview-avatar img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid white;
}

.status-dot {
    position: absolute;
    bottom: 2px;
    right: 2px;
    width: 12px;
    height: 12px;
    background: #10b981;
    border: 2px solid white;
    border-radius: 50%;
    animation: statusPulse 2s infinite;
}

@keyframes statusPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.preview-info {
    flex: 1;
}

.preview-info h4 {
    color: white;
    font-size: 1rem;
    font-weight: 600;
    margin: 0 0 2px 0;
}

.status-text {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.8125rem;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.typing-indicator {
    display: inline-block;
    width: 6px;
    height: 6px;
    background: white;
    border-radius: 50%;
    animation: typing 1.4s infinite;
}

@keyframes typing {
    0%, 60%, 100% { opacity: 0.3; }
    30% { opacity: 1; }
}

.preview-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
}

.preview-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: rotate(90deg);
}

/* Body do preview */
.preview-body {
    padding: 1.25rem;
    background: #ece5dd;
    min-height: 180px;
}

.preview-message {
    background: white;
    padding: 12px 16px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    position: relative;
    margin-bottom: 1rem;
    animation: messageSlideIn 0.4s ease-out 0.2s backwards;
}

@keyframes messageSlideIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.preview-message::before {
    content: '';
    position: absolute;
    left: -8px;
    top: 12px;
    width: 0;
    height: 0;
    border-right: 8px solid white;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
}

.preview-message p {
    margin: 0 0 8px 0;
    color: #1a1a1a;
    font-size: 0.9375rem;
    line-height: 1.5;
}

.preview-message p:last-of-type {
    margin-bottom: 0;
}

.message-time {
    display: block;
    font-size: 0.6875rem;
    color: #667781;
    text-align: right;
    margin-top: 4px;
}

/* Quick Replies */
.preview-quick-replies {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quick-reply {
    background: white;
    border: 1px solid #e5e7eb;
    padding: 10px 14px;
    border-radius: 20px;
    font-size: 0.875rem;
    color: #374151;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    animation: messageSlideIn 0.4s ease-out backwards;
}

.quick-reply:nth-child(1) { animation-delay: 0.3s; }
.quick-reply:nth-child(2) { animation-delay: 0.4s; }
.quick-reply:nth-child(3) { animation-delay: 0.5s; }

.quick-reply:hover {
    background: #f3f4f6;
    border-color: var(--whatsapp-green);
    transform: translateX(4px);
}

/* Footer */
.preview-footer {
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
}

.btn-whatsapp-send {
    width: 100%;
    background: linear-gradient(135deg, var(--whatsapp-green) 0%, var(--whatsapp-dark) 100%);
    color: white;
    border: none;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
}

.btn-whatsapp-send:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.btn-whatsapp-send svg {
    width: 20px;
    height: 20px;
}

/* === ANIMAÇÕES === */
@keyframes floatIn {
    from {
        opacity: 0;
        transform: translateY(100px) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* === RESPONSIVE === */
@media (max-width: 768px) {
    .whatsapp-float {
        bottom: 20px !important;
        right: 1.5rem;
    }
    
    .whatsapp-bubble {
        width: 56px;
        height: 56px;
    }
    
    .whatsapp-bubble svg {
        width: 28px;
        height: 28px;
    }
    
    .whatsapp-pulse {
        width: 60px;
        height: 60px;
    }
    
    .whatsapp-tooltip {
        display: none; /* Esconder em mobile */
    }
    
    .whatsapp-preview {
        width: calc(100vw - 2rem);
        right: 1rem;
        bottom: 6rem;
    }
}

/* ========== MOBILE: TRANSFORM TABLE INTO STACKED CARDS ========== */
@media (max-width: 768px) {
    /* Hide table wrapper border on mobile */
    .table-wrapper {
        border: none;
        border-radius: 0;
        overflow: visible;
    }

    /* Hide table header */
    .container table thead,
    .case-container table thead {
        display: none;
    }

    /* Transform table structure */
    .container table,
    .container table tbody,
    .case-container table,
    .case-container table tbody {
        display: block;
        width: 100%;
    }

    /* Each row becomes a card */
    .container table tr,
    .case-container table tr {
        display: block;
        background: var(--color-bg);
        border-radius: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
        padding: var(--space-4);
        margin-bottom: var(--space-3);
        border: 1px solid var(--color-border);
        position: relative;
        overflow: hidden;
    }

    /* Decorative accent on card */
    .container table tr::before,
    .case-container table tr::before {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 4px;
        background: linear-gradient(180deg, #3b82f6 0%, #8b5cf6 100%);
        border-radius: 4px 0 0 4px;
    }

    /* Each cell becomes a row within the card */
    .container table td,
    .case-container table td {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        padding: var(--space-2) 0;
        padding-left: var(--space-2);
        border-bottom: 1px solid var(--color-border);
        white-space: normal;
        word-break: break-word;
        font-size: 0.9375rem;
    }

    .container table td:last-child,
    .case-container table td:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }

    .container table td:first-child,
    .case-container table td:first-child {
        padding-top: 0;
    }

    /* Labels before each cell value */
    .container table td::before,
    .case-container table td::before {
        content: attr(data-label);
        font-weight: 600;
        font-size: 0.8125rem;
        color: var(--color-text-light);
        text-transform: uppercase;
        letter-spacing: 0.03em;
        flex-shrink: 0;
        margin-right: var(--space-2);
        min-width: 80px;
    }

    /* Fallback labels via nth-child */
    .container table td:nth-child(1)::before,
    .case-container table td:nth-child(1)::before { content: "Métrica"; }
    .container table td:nth-child(2)::before,
    .case-container table td:nth-child(2)::before { content: "Antes"; }
    .container table td:nth-child(3)::before,
    .case-container table td:nth-child(3)::before { content: "Depois"; }
    .container table td:nth-child(4)::before,
    .case-container table td:nth-child(4)::before { content: "Melhoria"; }

    /* Make strong inside td prominent */
    .container table td strong,
    .case-container table td strong {
        font-weight: 700;
        color: var(--color-text);
    }

    /* Highlight improvement values */
    .container table td.improvement,
    .case-container table td.improvement,
    .container table td .improvement,
    .case-container table td .improvement {
        color: var(--color-success);
        font-weight: 700;
    }

    /* Card hover effect on mobile touch */
    .container table tr:active,
    .case-container table tr:active {
        background: var(--color-bg-alt);
    }
}

/* ========== READ MORE / LER MAIS - COLLAPSE FOR LONG TEXTS ========== */
.text-collapse-wrapper {
    position: relative;
}

.text-collapse-content {
    position: relative;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.text-collapse-content.collapsed {
    max-height: 150px;
}

.text-collapse-content.collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: linear-gradient(to bottom, transparent, var(--color-bg));
    pointer-events: none;
}

.text-collapse-content:not(.collapsed)::after {
    display: none;
}

.btn-read-more {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    margin-top: var(--space-2);
    background: transparent;
    border: 1.5px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text);
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    min-height: 44px;
}

.btn-read-more:hover {
    background: var(--color-bg-alt);
    border-color: var(--color-text-light);
}

.btn-read-more svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s ease;
}

.btn-read-more[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

/* Read More Button Text Toggle - Bootstrap Collapse */
.btn-read-more .text-more { display: inline; }
.btn-read-more .text-less { display: none; }

.btn-read-more.collapsed .text-more { display: inline; }
.btn-read-more.collapsed .text-less { display: none; }

.btn-read-more:not(.collapsed) .text-more { display: none; }
.btn-read-more:not(.collapsed) .text-less { display: inline; }

/* Arrow rotation */
.btn-read-more.collapsed svg { transform: rotate(0deg); }
.btn-read-more:not(.collapsed) svg { transform: rotate(180deg); }

/* Mobile-specific read more styles */
@media (max-width: 768px) {
    .text-collapse-content.collapsed {
        max-height: 120px;
    }

    .btn-read-more {
        width: 100%;
        justify-content: center;
        padding: 12px 16px;
    }

    /* Show read more only on mobile for specific sections */
    .mobile-read-more {
        display: block;
    }
}

@media (min-width: 769px) {
    /* Hide mobile-only read more on desktop */
    .mobile-read-more {
        display: none;
    }

    .text-collapse-content.collapsed {
        max-height: none;
    }

    .text-collapse-content.collapsed::after {
        display: none;
    }
}

/* ========== MOBILE: compact floating CTA button ========== */
@media (max-width: 768px) {
    .cta-btn-fixed {
        border-radius: 50% !important;
        padding: 1rem !important;
        width: 56px !important;
        height: 56px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        right: 20px !important;
        bottom: 85px !important; /* sit above WhatsApp */
        top: auto !important;
        transform: none !important;
    }

    .cta-btn-fixed span { display: none !important; }

    .cta-btn-fixed svg { width: 20px; height: 20px; }
}

/* ========== MOBILE ACTION BAR (STICKY FOOTER) ========== */
@media (max-width: 768px) {
    .mobile-action-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        width: 100%;
        z-index: 1100;
        background: rgba(255,255,255,0.95);
        backdrop-filter: blur(10px);
        border-top: 1px solid var(--color-border);
        padding: 8px 12px;
        box-shadow: 0 -6px 18px rgba(0,0,0,0.06);
    }

    .mobile-action-bar .mobile-action-inner {
        display: flex;
        gap: 8px;
        align-items: center;
    }

    /* WhatsApp: make compact and static inside the bar */
    .mobile-action-bar .mobile-action-left .whatsapp-float {
        position: static !important;
        bottom: auto !important;
        right: auto !important;
        width: 44px;
        height: 44px;
        padding: 0;
        margin: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, var(--whatsapp-green) 0%, var(--whatsapp-dark) 100%);
        border-radius: 12px;
        box-shadow: var(--shadow-sm);
    }

    .mobile-action-bar .mobile-action-left .whatsapp-float .whatsapp-bubble {
        width: 28px;
        height: 28px;
        box-shadow: none;
    }

    /* CTA: occupy remaining space */
    .mobile-action-bar .mobile-action-right {
        flex: 1 1 auto;
    }

    .mobile-action-bar .mobile-action-right .cta-btn-fixed {
        position: static !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        width: 100% !important;
        height: 48px !important;
        padding: 0 1rem !important;
        border-radius: 12px !important;
        box-shadow: var(--shadow-sm) !important;
        font-weight: 700;
    }

    /* Hide floating-only variants on mobile to avoid duplicates */
    .whatsapp-float:not(.mobile-action-bar .whatsapp-float) { display: none !important; }
    body .cta-btn-fixed { display: none; }
    .mobile-action-bar .cta-btn-fixed { display: inline-flex !important; }

    /* Ensure content can scroll above the bar */
    body, .container { padding-bottom: 80px !important; }
}

/* Styles for unified action wrapper (desktop floating + mobile sticky) */
.action-wrapper {
    position: relative;
}

@media (min-width: 769px) {
    /* Desktop: position WhatsApp and CTA as floating elements */
    .action-wrapper .whatsapp-float {
        position: fixed !important;
        bottom: 20px !important;
        right: 20px !important;
        z-index: 1050;
        display: inline-flex !important;
    }

    .action-wrapper .cta-btn-fixed {
        position: fixed !important;
        right: 20px !important;
        bottom: 90px !important;
        z-index: 1040;
        display: inline-flex !important;
    }
}

@media (max-width: 768px) {
    /* Mobile: turn wrapper into sticky bar */
    .action-wrapper {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 1100 !important;
        background: rgba(255,255,255,0.95);
        backdrop-filter: blur(10px);
        border-top: 1px solid var(--color-border);
        padding: 8px 12px;
        box-shadow: 0 -6px 18px rgba(0,0,0,0.06);
        display: flex !important;
        align-items: center;
        gap: 8px;
    }

    .action-wrapper .whatsapp-float {
        position: static !important;
        width: 44px !important;
        height: 44px !important;
        border-radius: 12px !important;
        margin: 0 !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }

    .action-wrapper .cta-btn-fixed {
        position: static !important;
        width: 100% !important;
        height: 48px !important;
        border-radius: 12px !important;
        padding: 0 1rem !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        font-weight: 700;
    }

    /* No empty rules; keep selectors for future use if needed */
    body, .container { padding-bottom: 0px !important; }
}

/* Read More button: visible on mobile via `d-md-none` utility, ensure touch target >=44px */
.btn-read-more {
    --btn-padding: 0.25rem;
    padding: var(--btn-padding) !important;
    font-weight: 600;
    color: var(--color-primary);
    min-width: 44px;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 768px) {
    .btn-read-more {
        padding: 0.25rem 0.5rem !important;
        font-size: 1rem;
    }
}

/* === ACESSIBILIDADE === */
@media (prefers-reduced-motion: reduce) {
    .whatsapp-float,
    .whatsapp-pulse,
    .whatsapp-notification,
    .status-dot,
    .typing-indicator,
    .preview-message,
    .quick-reply {
        animation: none !important;
        transition: none !important;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .whatsapp-preview {
        background: #1a1a1a;
        box-shadow: 
            0 20px 60px rgba(0, 0, 0, 0.5),
            0 0 0 1px rgba(255, 255, 255, 0.1);
    }
    
    .preview-body {
        background: #0a0a0a;
    }
    
    .preview-message,
    .quick-reply {
        background: #262626;
        color: #e5e7eb;
        border-color: #3f3f3f;
    }
    
    .preview-footer {
        border-color: #3f3f3f;
    }
}

/* ========== CTA BUTTON FIXED - DESKTOP ONLY ========== */
.cta-btn-fixed {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1050;

    display: flex;
    align-items: center;
    gap: .75rem;

    padding: 1rem 1.25rem;
    background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
    color: #fff;
    font-weight: 600;
    text-decoration: none;

    /* Radius apenas à esquerda */
    border-radius: 1.5rem 0 0 1.5rem;

    box-shadow: -10px 15px 35px rgba(13,110,253,.35);
    transition: all .3s ease;
}

/* Hover */
.cta-btn-fixed:hover {
    background: linear-gradient(50deg, #ec4899 0%, #8b5cf6 80%, #3b82f6 100%);
    color: #fff;
    padding-right: 1.75rem;
}

/* Ícone */
.cta-btn-fixed svg {
    transition: transform .3s ease;
}

.cta-btn-fixed:hover svg {
    transform: translateX(4px);
}

/* Mobile - HIDE the side button completely */
@media (max-width: 768px) {
    .cta-btn-fixed {
        display: none !important;
    }
}

/* ========== MOBILE STICKY ACTION BAR ========== */
.mobile-sticky-bar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-sticky-bar {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 1100;
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        border-top: 1px solid var(--color-border);
        padding: 10px 16px;
        padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.08);
        display: flex;
        align-items: center;
        gap: 10px;
    }

    /* WhatsApp button in sticky bar */
    .mobile-sticky-bar .mobile-wa-btn {
        flex-shrink: 0;
        width: 48px;
        height: 48px;
        background: linear-gradient(135deg, var(--whatsapp-green) 0%, var(--whatsapp-dark) 100%);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        color: white;
        text-decoration: none;
        box-shadow: 0 4px 12px rgba(37, 211, 102, 0.3);
        transition: all 0.2s ease;
    }

    .mobile-sticky-bar .mobile-wa-btn:hover,
    .mobile-sticky-bar .mobile-wa-btn:active {
        transform: scale(1.05);
        box-shadow: 0 6px 16px rgba(37, 211, 102, 0.4);
    }

    .mobile-sticky-bar .mobile-wa-btn svg {
        width: 24px;
        height: 24px;
    }

    /* CTA button in sticky bar */
    .mobile-sticky-bar .mobile-cta-btn {
        flex: 1;
        height: 48px;
        background: linear-gradient(90deg, #3b82f6 0%, #8b5cf6 50%, #ec4899 100%);
        border-radius: 12px;
        display: flex;
        align-items: center;
        justify-content: center;
        gap: 8px;
        color: white;
        font-weight: 600;
        font-size: 0.9375rem;
        text-decoration: none;
        box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
        transition: all 0.2s ease;
    }

    .mobile-sticky-bar .mobile-cta-btn:hover,
    .mobile-sticky-bar .mobile-cta-btn:active {
        transform: scale(1.02);
        box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4);
        color: white;
    }

    .mobile-sticky-bar .mobile-cta-btn svg {
        width: 18px;
        height: 18px;
    }

    /* Hide original WhatsApp float on mobile */
    .whatsapp-float {
        display: none !important;
    }

    /* Add padding to body for sticky bar */
    body {
        padding-bottom: 80px !important;
    }
}

#formConsulta2 .input-with-icon .form-control {
    padding-left: 16px !important;
}