/* ==========================================================================
   1. VARIÁVEIS DE TEMA E CONFIGURAÇÕES GERAIS
   ========================================================================== */
:root {
    --font-main: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;

    /* Superfícies e Fundos (Dark Mode Padrão) */
    --bg-body: #0a0a0f;
    --bg-section-alt: #0e0e15;
    --bg-card: rgba(255, 255, 255, 0.04);
    --bg-card-hover: rgba(255, 255, 255, 0.08);
    --bg-card-border: rgba(255, 255, 255, 0.08);
    --bg-navbar: rgba(10, 10, 15, 0.75);
    --bg-footer: #050508;
    --bg-marquee: #07070c;

    /* Glassmorphism Oficial & Avançado */
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-bg-hover: rgba(255, 255, 255, 0.08);
    --glass-border: rgba(255, 255, 255, 0.12);
    --glass-border-hover: rgba(255, 255, 255, 0.25);
    --glass-blur: blur(12px);
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    --glass-shadow-hover: 0 16px 44px 0 rgba(0, 0, 0, 0.55), 0 0 24px 0 rgba(229, 9, 20, 0.20);

    /* Tipografia e Contraste A11y */
    --text-main: #e2e8f0;
    --text-title: #ffffff;
    --text-dim: #94a3b8;
    --text-muted: #64748b;

    /* Cores de Identidade e Acentos */
    --red-blood: #a11f1f;
    --red-hover: #b82222;
    --red-accent: #e50914;
    --red-glow: rgba(229, 9, 20, 0.35);
    --solar-accent: #f59e0b;
    --emerald-accent: #10b981;
    --grad-line: linear-gradient(90deg, transparent 0%, #e50914 50%, transparent 100%);
    --grad-primary: linear-gradient(135deg, #e50914 0%, #a11f1f 100%);
    --grad-primary-hover: linear-gradient(135deg, #ff1a26 0%, #b82222 100%);
    --shadow-glass: var(--glass-shadow);

    /* Transições Fluidas Obrigatórias */
    --ease-smooth: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-smooth: all 0.4s var(--ease-smooth);
}

/* Tema Claro (Light Mode) */
[data-theme="light"] {
    --bg-body: #f8fafc;
    --bg-section-alt: #ffffff;
    --bg-card: rgba(255, 255, 255, 0.75);
    --bg-card-hover: rgba(255, 255, 255, 0.95);
    --bg-card-border: rgba(15, 23, 42, 0.08);
    --bg-navbar: rgba(255, 255, 255, 0.82);
    --bg-footer: #0f172a;
    --bg-marquee: #f1f5f9;

    /* Glassmorphism Modo Claro */
    --glass-bg: rgba(255, 255, 255, 0.72);
    --glass-bg-hover: rgba(255, 255, 255, 0.92);
    --glass-border: rgba(15, 23, 42, 0.08);
    --glass-border-hover: rgba(229, 9, 20, 0.32);
    --glass-shadow: 0 8px 32px 0 rgba(15, 23, 42, 0.08);
    --glass-shadow-hover: 0 16px 40px 0 rgba(15, 23, 42, 0.14), 0 0 20px 0 rgba(229, 9, 20, 0.12);

    --text-main: #334155;
    --text-title: #0f172a;
    --text-dim: #64748b;
    --text-muted: #94a3b8;
    --shadow-glass: var(--glass-shadow);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.6;
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden;
    opacity: 0;
    transition: opacity 0.4s ease-in-out, background-color 0.4s ease, color 0.4s ease;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body.page-loaded {
    opacity: 1;
}

:focus-visible {
    outline: 2px solid var(--red-accent) !important;
    outline-offset: 4px !important;
    border-radius: 4px;
}

/* Acessibilidade (A11y): Skip Link */
.skip-link {
    position: absolute;
    top: -60px;
    left: 20px;
    background: var(--red-accent);
    color: #ffffff;
    padding: 12px 20px;
    border-radius: 6px;
    z-index: 99999;
    font-weight: 700;
    font-size: 0.95rem;
    text-decoration: none;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.4);
    transition: top 0.3s ease;
}

.skip-link:focus {
    top: 20px;
}

/* Utilitários */
.text-center {
    text-align: center;
}

.mb-25 {
    margin-bottom: 25px;
}

.mt-25 {
    margin-top: 25px;
}

.container {
    max-width: 1150px;
    margin: auto;
    padding: 0 20px;
}

/* Tipografia */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-main);
    letter-spacing: -0.02em;
}

.section-title,
.service-card-clean h3,
.cta-section h2,
.video-carousel-title {
    color: var(--text-title);
    background: linear-gradient(180deg, var(--text-title) 0%, var(--text-main) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle,
.service-card-clean p,
.cta-section p {
    color: var(--text-dim);
}

.section-title-divider {
    width: 100%;
    max-width: 600px;
    height: 3px;
    margin: 10px auto 0 auto;
    background: var(--grad-line);
    border-radius: 2px;
}

/* Barra de Rolagem */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-body);
}

::-webkit-scrollbar-thumb {
    background: #333;
    border-radius: 5px;
    border: 2px solid var(--bg-body);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--red-blood);
}


/* ==========================================================================
   2. NAVBAR & CABEÇALHO
   ========================================================================== */
.navbar {
    position: fixed;
    width: 100%;
    top: 0;
    left: 0;
    background: var(--bg-navbar);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 14px 0;
    border-bottom: 1px solid var(--bg-card-border);
    z-index: 1000;
}

.nav-content {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
}

.logo {
    display: flex;
    align-items: center;
    justify-self: start;
}

.logo a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

/* Logomarca na Barra Superior (Header) - Sincronização Dinâmica via IntersectionObserver */
.navbar-logo {
    height: 42px;
    width: auto;
    max-width: 160px;
    object-fit: contain;
    display: block;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateY(-4px);
    transition: opacity 0.35s ease, visibility 0.35s ease, transform 0.35s var(--ease-smooth);
}

.navbar-logo:hover {
    transform: scale(1.03);
}

/* Sincronização Global: Revelada suavemente quando a logomarca principal da Hero sai do ecrã */
.navbar-logo.is-scrolled,
.navbar-logo.show {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateY(0);
}

.navbar-logo.is-scrolled:hover,
.navbar-logo.show:hover {
    transform: translateY(0) scale(1.03);
}

.navbar ul.nav-links {
    display: flex;
    list-style: none;
    align-items: center;
    justify-content: center;
    justify-self: center;
    gap: clamp(14px, 1.8vw, 24px);
    margin: 0;
    padding: 0;
}

.navbar ul.nav-links li a {
    position: relative;
    text-decoration: none;
    color: var(--text-dim);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 6px 0;
    transition: color 0.3s ease;
}

.navbar ul.nav-links li a:hover,
.navbar ul.nav-links li a.active-page {
    color: var(--text-title);
    font-weight: 600;
}

.navbar ul.nav-links li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0%;
    height: 2px;
    background: var(--red-accent);
    transition: all 0.3s ease;
    transform: translateX(-50%);
    border-radius: 2px;
}

.navbar ul.nav-links li a:hover::after,
.navbar ul.nav-links li a.active-page::after {
    width: 100%;
}

.nav-btn-wrapper {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    justify-self: end;
    gap: 14px;
}

.theme-toggle-btn {
    background: var(--bg-card);
    border: 1px solid var(--bg-card-border);
    color: var(--text-main);
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    transition: all 0.3s;
}

.theme-toggle-btn:hover {
    border-color: var(--red-accent);
    color: var(--red-accent);
}

.menu-toggle {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.6rem;
    color: var(--text-title);
    cursor: pointer;
}


/* ==========================================================================
   3. BANNER HERO AVANÇADO (GLASSMORPHISM, AMBIENT MESH & MICRO-INTERAÇÕES)
   ========================================================================== */
.page-home header.hero {
    position: relative;
    width: 100%;
    min-height: 86vh;
    padding: 125px 0 60px 0;
    overflow: hidden;
    background: var(--bg-body);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Envoltório de Multimídia e Fundo Abstrato */
.hero-media-wrapper {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

@keyframes kenBurns {
    0% {
        transform: translate(-50%, -50%) scale(1);
    }

    50% {
        transform: translate(-50%, -50%) scale(1.06);
    }

    100% {
        transform: translate(-50%, -50%) scale(1);
    }
}

.page-home header.hero .hero-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    object-fit: cover;
    z-index: 1;
    opacity: 0.48;
    animation: kenBurns 28s ease-in-out infinite alternate;
    will-change: transform;
}

/* Overlay Dinâmico de Profundidade */
.hero .hero-overlay {
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 75% 40%, rgba(10, 10, 15, 0.4) 0%, rgba(10, 10, 15, 0.85) 60%, var(--bg-body) 100%),
        linear-gradient(180deg, rgba(10, 10, 15, 0.6) 0%, transparent 40%, rgba(10, 10, 15, 0.9) 85%, var(--bg-body) 100%);
    z-index: 2;
    transition: background 0.4s var(--ease-smooth);
}

[data-theme="light"] .hero .hero-overlay {
    background:
        radial-gradient(circle at 75% 40%, rgba(248, 250, 252, 0.5) 0%, rgba(248, 250, 252, 0.85) 60%, var(--bg-body) 100%),
        linear-gradient(180deg, rgba(248, 250, 252, 0.7) 0%, transparent 40%, rgba(248, 250, 252, 0.9) 85%, var(--bg-body) 100%);
}

/* Fundo Dinâmico com Orbes Luminosos (Ambient Mesh Gradient) */
.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(85px);
    opacity: 0.55;
    z-index: 2;
    pointer-events: none;
    will-change: transform;
}

.hero-orb-crimson {
    width: 460px;
    height: 460px;
    background: radial-gradient(circle, rgba(229, 9, 20, 0.45) 0%, rgba(161, 31, 31, 0.1) 70%, transparent 100%);
    top: 15%;
    right: 8%;
    animation: floatOrbCrimson 16s ease-in-out infinite alternate;
}

.hero-orb-indigo {
    width: 480px;
    height: 480px;
    background: radial-gradient(circle, rgba(37, 99, 235, 0.32) 0%, rgba(30, 58, 138, 0.08) 70%, transparent 100%);
    bottom: 5%;
    left: 5%;
    animation: floatOrbIndigo 20s ease-in-out infinite alternate;
}

.hero-orb-amber {
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.25) 0%, transparent 70%);
    top: 50%;
    right: 38%;
    animation: floatOrbAmber 14s ease-in-out infinite alternate;
}

@keyframes floatOrbCrimson {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-30px, 40px) scale(1.1);
    }
}

@keyframes floatOrbIndigo {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(40px, -30px) scale(1.08);
    }
}

@keyframes floatOrbAmber {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(-25px, -20px) scale(1.15);
    }
}

/* Estrutura Principal da Hero */
.page-home .hero-container {
    position: relative;
    z-index: 3;
    width: 100%;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.15fr 0.95fr;
    gap: 48px;
    align-items: center;
}

.hero-content {
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

/* Animações Fluídas de Entrada (Keyframes com Bezier Refinado) */
@keyframes heroFadeInUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.page-home .hero-content>* {
    animation: heroFadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.page-home .hero-title {
    animation-delay: 0.08s;
}

.page-home .hero-desc {
    animation-delay: 0.18s;
}

.page-home .hero-cta-group {
    animation-delay: 0.28s;
}

.page-home .hero-panel-wrapper {
    animation: heroFadeInUp 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.15s both;
}

/* Scroll Reveal Suave para Elementos e Cards ao Rolar */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

.reveal-on-scroll.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

@media (prefers-reduced-motion: reduce) {

    .reveal-on-scroll,
    .page-home .hero-content>*,
    .page-home .hero-panel-wrapper {
        animation: none !important;
        transition: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Logomarca Flutuante Centralizada Acima do Card (Sem Fundo/Transparente) */
.hero-floating-brand {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-bottom: 24px;
    background: transparent !important;
    border: none !important;
    box-shadow: none !important;
    padding: 0;
    transition: transform 0.35s var(--ease-smooth);
}

.hero-floating-brand a {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    background: transparent;
}

.hero-floating-logo-img {
    width: 220px;
    max-width: 220px;
    height: auto;
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.08));
    transition: transform 0.35s var(--ease-smooth), filter 0.35s ease;
}

.hero-floating-logo-img:hover {
    transform: translateY(-2px) scale(1.03);
}

[data-theme="dark"] .hero-floating-logo-img {
    filter: drop-shadow(0 2px 16px rgba(0, 0, 0, 0.55));
}


/* Título e Subtítulo */
.page-home .hero-title {
    font-size: clamp(2.2rem, 3.8vw, 3.3rem);
    line-height: 1.18;
    margin-bottom: 18px;
    color: var(--text-title);
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero-title-highlight {
    background: linear-gradient(135deg, #ff4d4d 0%, #e50914 50%, #f97316 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline;
}

.page-home .hero-desc {
    font-size: clamp(1rem, 1.2vw, 1.12rem);
    line-height: 1.65;
    color: var(--text-dim);
    margin-bottom: 34px;
    max-width: 580px;
}

/* Grupo de Botões CTA */
.hero-cta-group {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.hero-btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--grad-primary);
    color: #ffffff;
    padding: 15px 30px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.35);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    min-height: 52px;
}

.hero-btn-primary:hover {
    transform: scale(1.02);
    background: var(--grad-primary-hover);
    box-shadow: 0 8px 28px rgba(229, 9, 20, 0.55), 0 0 16px rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.35);
    color: #ffffff;
}

.hero-btn-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    color: var(--text-title);
    padding: 15px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    min-height: 52px;
}

.hero-btn-secondary:hover {
    transform: scale(1.02);
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-hover);
    color: var(--text-title);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.35);
}

/* ==========================================================================
   PAINEL DE VIDRO (HERO GLASSMORPHISM CARD MOCKUP)
   ========================================================================== */
.hero-panel-wrapper {
    position: relative;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding-top: 6px;
}

.hero-glass-card {
    background: var(--glass-bg);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 20px;
    padding: 30px 28px 26px 28px;
    position: relative;
    width: 100%;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform, box-shadow, border-color;
}

/* Micro-interação Hover no Card de Vidro Obrigatória */
.hero-glass-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--glass-shadow-hover);
    border-color: rgba(255, 255, 255, 0.25);
    background: var(--glass-bg-hover);
}

[data-theme="light"] .hero-glass-card:hover {
    border-color: var(--glass-border-hover);
}

/* Grid Estruturado em Colunas Limpas (Whitespace & Respiro Visual) */
.glass-metrics-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}

.glass-metric-card {
    background: rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 16px 18px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .glass-metric-card {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(15, 23, 42, 0.08);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.03);
}

.glass-metric-card:hover {
    transform: translateY(-3px);
    border-color: rgba(229, 9, 20, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .glass-metric-card:hover {
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

.metric-card-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.metric-icon-box {
    width: 36px;
    height: 36px;
    border-radius: 9px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
}

.solar-color {
    background: rgba(245, 158, 11, 0.15);
    color: #f59e0b;
}

.scada-color {
    background: rgba(37, 99, 235, 0.15);
    color: #3b82f6;
}

.ai-color {
    background: rgba(229, 9, 20, 0.15);
    color: #e50914;
}

.shield-color {
    background: rgba(16, 185, 129, 0.15);
    color: #10b981;
}

/* Pílulas de Status Refinadas */
.metric-pill {
    font-size: 0.68rem;
    font-weight: 700;
    padding: 3px 8px;
    border-radius: 999px;
    letter-spacing: 0.02em;
    white-space: nowrap;
}

.success-pill {
    background: rgba(16, 185, 129, 0.12);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.25);
}

.alert-pill {
    background: rgba(59, 130, 246, 0.12);
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.25);
}

.ai-pill {
    background: rgba(229, 9, 20, 0.12);
    color: #e50914;
    border: 1px solid rgba(229, 9, 20, 0.25);
}

.security-pill {
    background: rgba(168, 85, 247, 0.12);
    color: #a855f7;
    border: 1px solid rgba(168, 85, 247, 0.25);
}

[data-theme="light"] .ai-pill {
    background: rgba(229, 9, 20, 0.1);
    color: #dc2626;
    border-color: rgba(229, 9, 20, 0.25);
}

[data-theme="light"] .security-pill {
    background: rgba(147, 51, 234, 0.1);
    color: #7e22ce;
    border-color: rgba(147, 51, 234, 0.25);
}

[data-theme="light"] .success-pill {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
    border-color: rgba(16, 185, 129, 0.25);
}

[data-theme="light"] .alert-pill {
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    border-color: rgba(37, 99, 235, 0.25);
}

/* Valores e Títulos das Métricas */
.metric-card-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.metric-value {
    font-size: 1.55rem;
    font-weight: 800;
    color: var(--text-title);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.metric-label {
    font-size: 0.78rem;
    color: var(--text-dim);
    font-weight: 600;
}

/* Botão de Ação Centralizado em Glassmorphism */
.glass-card-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-align: center;
    padding: 13px 20px;
    background: rgba(229, 9, 20, 0.08);
    border: 1px solid rgba(229, 9, 20, 0.25);
    border-radius: 10px;
    color: var(--text-title);
    text-decoration: none;
    font-size: 0.86rem;
    font-weight: 700;
    margin-bottom: 18px;
    transition: all 0.35s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-theme="light"] .glass-card-cta {
    background: rgba(229, 9, 20, 0.06);
    border-color: rgba(229, 9, 20, 0.2);
}

.glass-card-cta:hover {
    background: var(--red-blood);
    color: #ffffff;
    border-color: var(--red-accent);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.35);
}

.glass-card-cta i {
    transition: transform 0.3s ease;
}

.glass-card-cta:hover i {
    transform: translateX(4px);
}

/* Rodapé do Card de Vidro */
.glass-card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    flex-wrap: wrap;
    font-size: 0.74rem;
    color: var(--text-dim);
    border-top: 1px solid var(--glass-border);
    padding-top: 14px;
}

.footer-telemetry-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--glass-border);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.74rem;
    font-weight: 500;
}

[data-theme="light"] .footer-telemetry-tag {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(15, 23, 42, 0.06);
}

.footer-telemetry-tag i {
    color: var(--red-accent);
    font-size: 0.8rem;
}

/* Fallback Sólido para Navegadores sem suporte a backdrop-filter */
@supports not (backdrop-filter: blur(12px)) {

    .hero-glass-card,
    .glass-metric-card,
    .hero-btn-secondary,
    .navbar {
        background: rgba(18, 18, 24, 0.95) !important;
    }

    [data-theme="light"] .hero-glass-card,
    [data-theme="light"] .glass-metric-card,
    [data-theme="light"] .hero-btn-secondary,
    [data-theme="light"] .navbar {
        background: rgba(255, 255, 255, 0.96) !important;
    }
}


/* ==========================================================================
   4. ESTATÍSTICAS / KPIS
   ========================================================================== */
.stats-section {
    padding: 60px 20px;
    background: var(--bg-body);
}

.page-home .stats-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.page-home .stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--bg-card-border);
    box-shadow: var(--shadow-glass);
    border-radius: 12px;
    padding: 30px 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, background 0.35s ease;
}

.page-home .stat-card:hover {
    transform: translateY(-6px);
    border-color: rgba(229, 9, 20, 0.4);
    background: var(--bg-card-hover);
}

.page-home .stat-number {
    display: block;
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--red-accent);
    margin-bottom: 6px;
}

.page-home .stat-label {
    display: block;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
}


/* ==========================================================================
   5. SERVIÇOS & PLAYERS
   ========================================================================== */
.services-section {
    padding: 75px 20px;
    background: var(--bg-section-alt);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 28px;
    margin-top: 65px;
}

.service-card-clean {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--bg-card-border);
    box-shadow: var(--shadow-glass);
    border-radius: 12px;
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.35s ease, background 0.35s ease, box-shadow 0.35s ease;
}

.service-card-clean::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 0;
    background: var(--red-accent);
    transition: height 0.35s ease;
}

.service-card-clean:hover {
    transform: translateY(-8px);
    border-color: rgba(229, 9, 20, 0.6);
    box-shadow: 0 12px 30px rgba(229, 9, 20, 0.15), var(--shadow-glass);
    background: var(--bg-card-hover);
}

.service-card-clean:hover::before {
    height: 100%;
}

.service-card-clean .card-icon {
    color: var(--red-accent);
    font-size: 2rem;
    margin-bottom: 18px;
    transition: transform 0.3s ease;
}

.service-card-clean:hover .card-icon {
    transform: scale(1.1);
}

.service-card-clean .card-link {
    color: var(--red-accent);
    text-decoration: none;
    font-weight: 700;
    transition: color 0.3s ease;
}

.service-card-clean .card-link:hover {
    color: var(--text-title);
}

.video-main-container {
    max-width: 850px;
    margin: 0 auto 60px auto;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    padding: 12px;
    border-radius: 14px;
    border: 1px solid var(--bg-card-border);
    box-shadow: var(--shadow-glass);
}

.video-iframe-wrapper {
    position: relative;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 8px;
}

.video-iframe-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-carousel-section {
    max-width: 1000px;
    margin: 0 auto 65px auto;
    text-align: center;
}

.video-carousel-wrapper {
    display: flex;
    align-items: center;
    gap: 15px;
    position: relative;
    width: 100%;
}

.video-carousel-track {
    display: flex;
    gap: 16px;
    overflow-x: auto;
    scroll-behavior: smooth;
    padding: 10px 5px;
    width: 100%;
}

.video-carousel-track::-webkit-scrollbar {
    display: none;
}

.video-card {
    min-width: 260px;
    max-width: 260px;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    border: 1px solid var(--bg-card-border);
    padding: 10px;
    cursor: pointer;
    flex-shrink: 0;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.video-card:hover {
    transform: translateY(-4px);
}

.video-card.active {
    border-color: var(--red-accent);
}

.carousel-nav-btn {
    width: 42px;
    height: 42px;
    min-width: 42px;
    border-radius: 50%;
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--bg-card-border);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.3s, border-color 0.3s;
}

.carousel-nav-btn:hover {
    border-color: var(--red-accent);
    color: var(--red-accent);
}


/* ==========================================================================
   6. CARROSSEL MARQUEE CLIENTES (LOOP INFINITO PERFEITO)
   ========================================================================== */
.marquee-section {
    padding: 55px 0;
    background: var(--bg-marquee);
    border-top: 1px solid var(--bg-card-border);
    overflow: hidden;
}

.marquee-title {
    color: var(--text-dim);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
    margin-bottom: 40px;
    text-align: center;
}

.marquee-container {
    width: 100%;
    overflow: hidden;
    position: relative;
}

.marquee-track {
    display: flex;
    gap: 60px;
    width: max-content;
    animation: scrollMarquee 120s linear infinite;
}

.marquee-track:hover {
    animation-play-state: paused;
}

@keyframes scrollMarquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(calc(-50% - 30px));
    }
}

.marquee-item {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 50px;
    /* Cria um respiro de 50px de distância entre uma logo e outra */
    flex-shrink: 0;
    /* Garante que o item não diminua de tamanho */
}

.cliente-logo {
    max-height: 45px;
    max-width: 140px;
    object-fit: contain;
    filter: grayscale(100%) opacity(0.5);
    transition: filter 0.35s ease;
}

.cliente-logo:hover {
    filter: grayscale(0%) opacity(1);
}


/* ==========================================================================
   7. BOTÕES E COMPONENTES
   ========================================================================== */
.view-all-link {
    color: var(--red-accent);
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    transition: color 0.3s ease;
}

.view-all-link:hover {
    color: var(--text-title);
}

.btn-cta {
    background: var(--red-blood);
    color: #fff;
    padding: 12px 28px;
    border-radius: 6px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 700;
    display: inline-block;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 15px rgba(161, 31, 31, 0.4);
}

.btn-cta:hover {
    background: var(--red-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(229, 9, 20, 0.5);
}

.footer-btn {
    background: var(--red-blood);
    color: #fff;
    padding: 10px 20px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    margin-bottom: 20px;
    transition: background 0.3s ease, box-shadow 0.3s ease;
}

.footer-btn:hover {
    background: var(--red-hover);
    color: #fff;
    box-shadow: 0 4px 12px rgba(229, 9, 20, 0.4);
}

.cta-section {
    padding: 75px 20px;
    background: var(--bg-card);
    text-align: center;
    border-top: 1px solid var(--bg-card-border);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    transition: background 0.4s var(--ease-smooth);
}

.cta-section h2 {
    color: var(--text-title);
    margin-bottom: 16px;
    font-size: clamp(1.6rem, 2.5vw, 2.1rem);
    font-weight: 800;
}

.cta-section p {
    color: var(--text-dim);
    margin-bottom: 30px;
    font-size: 1.05rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}


/* ==========================================================================
   8. RODAPÉ E BOTÃO FLUTUANTE
   ========================================================================== */
.site-footer {
    background-color: var(--bg-footer);
    border-top: 1px solid var(--bg-card-border);
    padding: 60px 0 25px 0;
    color: var(--text-dim);
    font-size: 0.9rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 1.2fr 1fr;
    gap: 40px;
    margin-bottom: 45px;
    align-items: start;
}

.footer-col {
    display: flex;
    flex-direction: column;
}

.footer-logo {
    height: 40px !important;
    width: auto !important;
    max-width: 100%;
    object-fit: contain;
    margin-bottom: 18px;
    margin-left: 0 !important;
    display: block;
}

.footer-about {
    align-items: flex-start !important;
    text-align: left !important;
}

.footer-heading {
    color: var(--red-accent);
    font-size: 1.05rem;
    font-weight: 700;
    margin-bottom: 16px;
}

.footer-info-block {
    margin-top: 15px;
}

.footer-info-block .footer-heading {
    margin-bottom: 4px;
    font-size: 0.95rem;
}

.footer-info-block p a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-info-block p a:hover {
    color: var(--red-accent);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-main);
    text-decoration: none;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: var(--red-accent);
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.footer-socials a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--bg-card);
    backdrop-filter: blur(8px);
    border: 1px solid var(--bg-card-border);
    color: var(--text-title);
    display: flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    transition: border-color 0.3s;
}

.footer-socials a:hover {
    border-color: var(--red-accent);
    color: var(--red-accent);
}

.footer-bottom {
    border-top: 1px solid var(--bg-card-border);
    padding-top: 25px;
    text-align: center;
    font-size: 0.85rem;
}

.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25d366;
    color: white;
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    z-index: 1000;
    font-size: 2rem;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    text-decoration: none;
    transition: transform 0.3s, box-shadow 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 25px rgba(37, 211, 102, 0.5);
}


/* ==========================================================================
   9. RESPONSIVIDADE (MOBILE & TABLET)
   ========================================================================== */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 44px;
    }

    .hero-content {
        align-items: center;
        text-align: center;
    }

    .hero-desc {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta-group {
        justify-content: center;
    }

    .hero-panel-wrapper {
        max-width: 580px;
        margin: 0 auto;
        width: 100%;
        align-items: center;
        padding-top: 0;
    }

    .hero-floating-brand {
        justify-content: center;
        margin-bottom: 20px;
    }
}

@media (max-width: 900px) {
    .footer-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .nav-content {
        display: flex;
        justify-content: space-between;
        align-items: center;
    }

    .menu-toggle {
        display: block;
    }

    .page-home header.hero {
        padding: 105px 0 55px 0;
        min-height: auto;
    }

    .hero-orb-crimson {
        width: 280px;
        height: 280px;
        filter: blur(60px);
    }

    .hero-orb-indigo {
        width: 260px;
        height: 260px;
        filter: blur(60px);
    }

    .hero-orb-amber {
        display: none;
    }

    .hero-glass-card {
        padding: 24px 20px;
        border-radius: 16px;
    }

    .navbar ul.nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--bg-body);
        flex-direction: column;
        justify-content: center;
        gap: 30px;
        transition: left 0.3s ease;
        box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    }

    .navbar ul.nav-links.active {
        left: 0;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 480px) {
    .hero-floating-brand {
        margin-bottom: 16px;
        justify-content: center;
    }

    .hero-floating-logo-img {
        width: 180px;
        max-width: 190px;
        height: auto;
    }

    .hero-glass-card {
        padding: 20px 16px;
    }

    .hero-cta-group {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }

    .hero-btn-primary,
    .hero-btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .glass-metrics-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .glass-card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .footer-telemetry-tag {
        width: 100%;
        justify-content: center;
    }
}

/* Classe para ajustar logos escuras em fundos escuros */
.cliente-logo.logo-light {
    filter: brightness(0) invert(1);
    opacity: 0.45;
    transition: opacity 0.3s ease;
}

.cliente-logo.logo-light:hover {
    opacity: 1;
}