/* ═══════════════════════════════════════════ */
/* ClinicalOS — Premium Styling (Optimized)   */
/* ═══════════════════════════════════════════ */

/* ─── Base ─── */
body {
    font-family: 'Inter', sans-serif;
    background-color: #0A192F;
    color: #F8FAFC;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Playfair Display', serif;
}

html {
    scroll-behavior: smooth;
}

/* GPU Acceleration for smooth scrolling & interactions */
* {
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

/* Otimização de Renderização de Seções */
section {
    content-visibility: auto;
    /* Renderiza apenas quando visível */
    contain-intrinsic-size: 1px 800px;
    /* Estimativa de altura */
}

/* ─── Custom Scrollbar ─── */
::-webkit-scrollbar {
    width: 5px;
}

::-webkit-scrollbar-track {
    background: #0A192F;
}

::-webkit-scrollbar-thumb {
    background: #1e293b;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #00D2FF;
}

/* ─── Glassmorphism Otimizado ─── */
.glass-panel {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* ─── Text Gradient ─── */
.text-gradient {
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    background-image: linear-gradient(135deg, #ffffff, #00D2FF);
    transform: translateZ(0);
}

/* ─── Hero Content Stagger ─── */
.hero-content>* {
    will-change: opacity, transform;
}

/* ═══════════════════════════════════════════ */
/* ANIMATIONS (Lightweight)                   */
/* ═══════════════════════════════════════════ */

@keyframes gradient-shift {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

.animate-gradient-text {
    background-size: 200% auto;
    animation: gradient-shift 6s ease-in-out infinite;
    will-change: background-position;
    transform: translateZ(0);
}

@keyframes vs-pulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.vs-badge {
    animation: vs-pulse 3s ease-in-out infinite;
    will-change: transform;
}

@keyframes glow-pulse {

    0%,
    100% {
        box-shadow: 0 0 15px rgba(0, 210, 255, 0.1);
    }

    50% {
        box-shadow: 0 0 25px rgba(0, 210, 255, 0.3);
    }
}

.animate-glow-pulse {
    animation: glow-pulse 3s ease-in-out infinite;
    will-change: box-shadow;
}

@keyframes border-shimmer {

    0%,
    100% {
        border-color: rgba(0, 210, 255, 0.2);
    }

    50% {
        border-color: rgba(0, 210, 255, 0.4);
    }
}

.pricing-card.main {
    animation: border-shimmer 3s ease-in-out infinite;
    will-change: border-color;
}

.cta-button {
    position: relative;
    overflow: hidden;
    transform: translateZ(0);
}

.cta-button::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent 40%, rgba(255, 255, 255, 0.1) 50%, transparent 60%);
    transform: rotate(45deg) translateX(-150%);
    transition: transform 0.7s ease;
    pointer-events: none;
    will-change: transform;
}

.cta-button:hover::after {
    transform: rotate(45deg) translateX(150%);
}

/* ═══════════════════════════════════════════ */
/* FAQ ACCORDION                              */
/* ═══════════════════════════════════════════ */

.faq-item {
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.faq-item:hover {
    border-color: rgba(0, 210, 255, 0.25);
}

.faq-item .faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    opacity: 0;
    will-change: max-height, opacity;
}

.faq-item.active .faq-answer {
    max-height: 300px;
    opacity: 1;
}

.faq-item .faq-chevron {
    transition: transform 0.3s ease;
}

.faq-item.active .faq-chevron {
    transform: rotate(180deg);
}

/* ═══════════════════════════════════════════ */
/* CARD INTERACTIONS                          */
/* ═══════════════════════════════════════════ */

.workflow-card,
.agent-card {
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
    will-change: transform;
}

/* ═══════════════════════════════════════════ */
/* BENTO CAROUSEL (MOBILE)                    */
/* ═══════════════════════════════════════════ */

.bento-scroll {
    -ms-overflow-style: none;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x mandatory;
}

.bento-scroll::-webkit-scrollbar {
    display: none;
}

.from-deep-navy {
    --tw-gradient-from: #0A192F var(--tw-gradient-from-position);
    --tw-gradient-to: rgb(10 25 47 / 0) var(--tw-gradient-to-position);
    --tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to);
}

/* ═══════════════════════════════════════════ */
/* CAROUSEL CARD SIZING                       */
/* ═══════════════════════════════════════════ */

.carousel-card {
    width: calc(100vw - 3rem);
    min-width: calc(100vw - 3rem);
    max-width: calc(100vw - 3rem);
    flex-shrink: 0;
    overflow: hidden;
    scroll-snap-align: center;
}

@media (min-width: 768px) {
    .carousel-card {
        width: auto;
        min-width: 44vw;
        max-width: none;
        overflow: visible;
    }
}

@media (min-width: 1024px) {
    .carousel-card {
        min-width: 0;
        max-width: none;
        flex-shrink: 1;
        scroll-snap-align: start;
    }
}

/* ═══════════════════════════════════════════ */
/* SECTION DIVIDERS                           */
/* ═══════════════════════════════════════════ */

.section-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(0, 210, 255, 0.15), transparent);
    border: none;
    margin-top: 2rem;
    margin-bottom: 2rem;
}

/* ═══════════════════════════════════════════ */
/* CARD PERFORMANCE OPTIMIZATIONS (Desktop)   */
/* ═══════════════════════════════════════════ */

.agent-card {
    transform: translateZ(0);
    /* Força Layer GPU */
    will-change: transform, opacity;
    backface-visibility: hidden;
    perspective: 1000px;

    /* Blur reduzido para desktop para evitar custo excessivo */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);

    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.agent-card:hover {
    transform: translateY(-4px) translateZ(0);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    border-color: rgba(255, 255, 255, 0.2);
    /* Sem filtros pesados no hover */
}

/* ═══════════════════════════════════════════ */
/* MOBILE PERFORMANCE OPTIMIZATIONS (Aggressive) */
/* ═══════════════════════════════════════════ */

@media (max-width: 1023px) {

    .hero-blob-1,
    .hero-blob-2,
    .glass-panel,
    .bg-glass-bg,
    .backdrop-blur-xl,
    .backdrop-blur-md,
    .backdrop-blur-sm,
    .agent-card,
    .pricing-card {
        backdrop-filter: none !important;
        -webkit-backdrop-filter: none !important;
        background: rgba(10, 25, 47, 0.95);
    }

    .agent-card,
    .workflow-card {
        background: #0d1f3a;
        border: 1px solid rgba(255, 255, 255, 0.05);
    }

    .hero-blob-1,
    .hero-blob-2 {
        opacity: 0.3;
        will-change: transform;
    }

    .shadow-2xl,
    .shadow-glow,
    .shadow-lg {
        box-shadow: none !important;
        border: 1px solid rgba(255, 255, 255, 0.1) !important;
    }

    .workflow-card:hover,
    .agent-card:hover,
    .transform,
    .hover\:-translate-y-1:hover,
    .hover\:scale-105:hover {
        transform: none !important;
        transition: none !important;
    }

    .animate-glow-pulse {
        animation: none !important;
    }

    .animate-float,
    .animate-pulse-slow {
        animation-duration: 8s !important;
    }
}

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}