@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;600;700;800&display=swap');

:root {
    --bg-dark: #0a051b;
    --bg-card: rgba(255, 255, 255, 0.03);
    --primary: #6366f1;
    --primary-glow: rgba(99, 102, 241, 0.35);
    --accent: #ee8a0d;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.1);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: 'Plus Jakarta Sans', sans-serif; background-color: var(--bg-dark); color: var(--text-main); line-height: 1.6; }

/* TOP HEADER */
/* ==================================================
   1. TOP HEADER (COR INTEGRADA + Z-INDEX ELEVADO)
   ================================================== */
.top-header {
    background: #060312; /* Tom azul/roxo escuro integrado ao TelcoAnalytics, sem o preto absoluto */
    padding: 12px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06); /* Borda sutil de integração */
    width: 100%;
    position: relative;
    z-index: 10001 !important; /* Garante que o topo fique numa camada ACIMA do sub-nav */
}

.top-header .top-logo img,
.top-header a img {
    height: 35px;
    display: block;
}

.top-header nav {
    display: flex;
    align-items: center;
    gap: 20px;
}

.top-header nav a {
    color: #ffffff;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    opacity: 0.85;
    transition: opacity 0.2s, color 0.2s;
}

.top-header nav a:hover {
    opacity: 1;
    color: var(--accent);
}

/* ==================================================
   2. DROPDOWN SUPORTE (CAMADA MAIS ALTA DA TELA)
   ================================================== */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    display: inline-flex;
    align-items: center;
    gap: 6px; /* Espaço perfeito entre a palavra Suporte e a seta */
    color: #ffffff !important;
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    opacity: 0.85;
    padding: 10px 0;
    cursor: pointer;
    transition: opacity 0.2s;
}

/* ESTILO E ANIMAÇÃO DA SETA VETORIAL */
.menu-arrow {
    transition: transform 0.3s ease, stroke 0.3s ease;
    display: inline-block;
}

/* Quando passa o mouse por cima do Suporte, a seta gira 180° e muda para a cor de destaque */
.dropdown:hover .dropdown-toggle {
    opacity: 1;
    color: var(--accent) !important;
}

.dropdown:hover .menu-arrow {
    transform: rotate(180deg); /* Gira a seta para cima suavemente */
}

.dropdown-toggle:hover {
    opacity: 1;
    color: var(--accent) !important;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    background: #11111d; /* Fundo do menu flutuante */
    min-width: 190px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.8);
    border: 1px solid var(--border);
    border-radius: 8px;
    z-index: 10002 !important; /* Camada superior que sobrepõe a barra sticky */
    padding: 8px 0;
}

.dropdown:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    color: #cbd5e1 !important;
    padding: 10px 16px;
    text-decoration: none;
    display: block;
    font-size: 13px;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
    text-align: left;
    margin: 0 !important;
}

.dropdown-menu a:hover {
    background: rgba(255, 255, 255, 0.08);
    color: var(--accent) !important;
}

/* SUB-NAV FIXO (BARRA EXTERNA FULL-WIDTH) */
.sub-nav { 
    position: -webkit-sticky !important; 
    position: sticky !important; 
    top: 0 !important; 
    z-index: 9999 !important; 
    background: rgba(10, 5, 27, 0.95); 
    backdrop-filter: blur(16px); 
    border-bottom: 1px solid var(--border); 
    padding: 12px 0; /* O padding lateral agora é controlado pelo container interno */
    width: 100%;
}

/* CONTAINER INTERNO ALINHADO COM A GRADE DO CONTEÚDO (1200px) */
.sub-nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px; /* Mesma margem do .container do texto */
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
/* FORMATAÇÃO DO LOGO SVG NO SUB-NAV */
.sub-nav .product-brand {
    display: flex;
    align-items: center;
}

/* 2. Logo do TelcoAnalytics (Barra Roxa Sticky) */
.sub-nav .product-brand img,
.sub-nav .product-brand svg {
    height: 42px !important; /* Tamanho proporcional aos botões da direita */
    width: auto;
    display: block;
    /* EFEITO NEON GLOW: Cria um brilho roxo/azul suave em volta do ícone no fundo escuro */
    filter: drop-shadow(0 0 10px rgba(129, 140, 248, 0.45));
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Efeito ao passar o mouse no Logo TelcoAnalytics */
.sub-nav .product-brand a:hover img,
.sub-nav .product-brand a:hover svg {
    transform: scale(1.04);
    /* Intensifica o brilho neon no hover */
    filter: drop-shadow(0 0 18px rgba(129, 140, 248, 0.8));
}

.sub-nav .product-brand a {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.sub-nav-links { display: flex; gap: 10px; align-items: center; }
.sub-nav-links a { color: var(--text-muted); text-decoration: none; padding: 8px 16px; border-radius: 20px; font-size: 13px; font-weight: 600; transition: all 0.3s; }
.sub-nav-links a:hover, .sub-nav-links a.active { color: #fff; background: var(--bg-card); border: 1px solid var(--border); }
.btn-nav-cta { background: var(--accent) !important; color: #fff !important; padding: 8px 20px !important; border-radius: 20px; font-weight: 700 !important; box-shadow: 0 4px 15px rgba(238, 138, 13, 0.3); }

/* IDIOMA */
.lang-switch { display: inline-flex; gap: 5px; background: rgba(255,255,255,0.05); padding: 4px 10px; border-radius: 15px; border: 1px solid var(--border); font-size: 12px; font-weight: bold; margin-left: 10px; }
.lang-switch a { color: var(--text-muted); text-decoration: none; padding: 0 !important; }
.lang-switch a.active { color: var(--accent) !important; }

/* LAYOUT E COMPONENTES */
.container { max-width: 1200px; margin: 0 auto; padding: 60px 20px; }
.page-header { text-align: center; margin-bottom: 60px; }
.page-header h1 { font-size: 38px; font-weight: 800; margin-bottom: 15px; }
.page-header p { color: var(--text-muted); max-width: 700px; margin: 0 auto; font-size: 16px; }

.hero { display: flex; align-items: center; gap: 50px; flex-wrap: wrap; margin-bottom: 80px; }
.hero-text { flex: 1; min-width: 320px; }
.hero-text h1 { font-size: 44px; font-weight: 800; line-height: 1.3; margin-bottom: 20px; background: linear-gradient(135deg, #fff 0%, #94a3b8 100%); -webkit-background-clip: text; -webkit-text-fill-color: transparent; }
.hero-text p { font-size: 17px; color: var(--text-muted); margin-bottom: 30px; }
.hero-media { flex: 1.2; min-width: 320px; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 14px; border-radius: 20px; background: rgba(99, 102, 241, 0.1); border: 1px solid var(--primary-glow); color: #818cf8; font-size: 12px; font-weight: 700; margin-bottom: 20px; }

.feature-box { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 40px; margin-bottom: 40px; display: flex; gap: 40px; align-items: center; flex-wrap: wrap; }
.feature-box.reverse { flex-direction: row-reverse; }
.feature-box-text { flex: 1; min-width: 300px; }
.feature-box-text h2 { font-size: 24px; color: #fff; margin-bottom: 15px; }
.feature-box-text p { color: var(--text-muted); font-size: 15px; margin-bottom: 20px; }
.feature-box-media { flex: 1.2; min-width: 320px; }

[data-showcase-video] .feature-box-media {
    overflow: hidden;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #05020d;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
}

.feature-box-video {
    display: block;
    width: 100%;
    aspect-ratio: 128 / 69;
    border: 0;
    border-radius: 0;
    background: #05020d;
    box-shadow: none;
    cursor: zoom-in;
    opacity: 0;
    object-fit: contain;
    object-position: center;
    touch-action: manipulation;
    transition: opacity 180ms ease;
}

.feature-box-video.is-video-ready {
    opacity: 1;
}

.video-preview-trigger {
    cursor: zoom-in;
}

@media (hover: hover) and (pointer: fine) {
    .video-preview-surface {
        transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
    }

    .video-preview-surface.is-video-hovered {
        border-color: rgba(129, 140, 248, 0.58);
        box-shadow: 0 18px 38px rgba(0, 0, 0, 0.5), 0 0 24px rgba(99, 102, 241, 0.12);
        transform: scale(1.008);
    }
}

[data-showcase-video] .feature-box-media:focus-within {
    outline: 2px solid #818cf8;
    outline-offset: 4px;
}

.feature-box-video:focus-visible {
    outline: none;
}

.feature-box-details {
    margin-top: -10px;
    color: var(--text-muted);
    font-size: 14px !important;
}

.feature-reveal-enabled .feature-box {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 450ms ease, transform 500ms ease;
}

.feature-reveal-enabled .feature-box.is-revealed {
    opacity: 1;
    transform: translateY(0);
}

body.video-preview-open {
    overflow: hidden;
}

.video-preview-modal {
    position: fixed;
    z-index: 9998;
    top: var(--video-preview-header-offset, 0px);
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(20px, 4vw, 56px);
    opacity: 0;
    background: rgba(5, 2, 13, 0.88);
    backdrop-filter: blur(6px);
    transition: opacity 180ms ease;
}

.video-preview-modal[hidden] {
    display: none;
}

.video-preview-modal.is-open {
    opacity: 1;
}

.video-preview-modal__dialog {
    position: relative;
    width: min(88vw, 1500px);
    max-width: 1500px;
    max-height: calc(100dvh - var(--video-preview-header-offset, 0px) - 40px);
    aspect-ratio: 128 / 69;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 16px;
    background: #05020d;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.7), 0 0 40px rgba(99, 102, 241, 0.16);
    transform: scale(0.98);
    transition: transform 180ms ease;
    touch-action: pan-y;
}

.video-preview-modal.is-open .video-preview-modal__dialog {
    transform: scale(1);
}

.video-preview-modal__video {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: inherit;
    background: #05020d;
    opacity: 0;
    object-fit: contain;
    object-position: center;
    transition: opacity 160ms ease;
}

.video-preview-modal__video.is-video-ready {
    opacity: 1;
}

.video-preview-modal__close,
.video-carousel__control {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.video-preview-modal__close {
    position: absolute;
    z-index: 2;
    top: 10px;
    right: 10px;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.28);
    border-radius: 50%;
    background: rgba(10, 5, 27, 0.86);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.45);
    color: #fff;
    font: inherit;
    cursor: pointer;
}

.video-preview-modal__close svg {
    display: block;
    width: 20px;
    height: 20px;
    flex: 0 0 auto;
    stroke: currentColor;
}

.video-preview-modal__close:hover,
.video-preview-modal__close:focus-visible {
    border-color: var(--accent);
    background: var(--accent);
    outline: none;
}

.protected-img { width: 100%; border-radius: 10px; border: 1px solid var(--border); box-shadow: 0 15px 30px rgba(0,0,0,0.4); pointer-events: none; user-select: none; -webkit-user-drag: none; filter: blur(0.3px); transition: filter 0.3s ease; }
.feature-box:hover .protected-img, .glass-card:hover .protected-img { filter: blur(0.3px); }

.tag-list { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 15px; }
.tag { background: rgba(99, 102, 241, 0.15); color: #a5b4fc; padding: 4px 12px; border-radius: 12px; font-size: 12px; font-weight: 600; }
.glass-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 12px; backdrop-filter: blur(12px); box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); }

/* HOME VIDEO CAROUSEL */
.video-carousel-card {
    overflow: hidden;
}

.video-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 128 / 69;
    overflow: hidden;
    isolation: isolate;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: radial-gradient(circle at center, #11152c 0%, #05020d 100%);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    touch-action: pan-y;
}

.video-carousel:focus-visible {
    outline: 2px solid #818cf8;
    outline-offset: 4px;
}

.video-carousel__video {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    object-position: center center;
}

.video-carousel__video {
    z-index: 1;
    opacity: 0;
    object-fit: contain;
    background: #05020d;
    transform: scale(1.015);
    transition: opacity 700ms ease, transform 900ms ease;
}

.video-carousel.is-ready .video-carousel__video.is-active {
    z-index: 2;
    opacity: 1;
    transform: scale(1);
}

.video-carousel__status {
    position: absolute;
    z-index: 4;
    right: 18px;
    bottom: 18px;
    left: 18px;
    padding: 10px 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: rgba(10, 5, 27, 0.82);
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
    backdrop-filter: blur(8px);
}

.video-carousel__status[hidden],
.video-carousel__controls[hidden],
.video-carousel__indicators[hidden] {
    display: none;
}

.video-carousel__controls {
    position: absolute;
    z-index: 6;
    inset: 50% 14px auto;
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    transform: translateY(-50%);
}

.video-carousel__control {
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255, 255, 255, 0.24);
    border-radius: 50%;
    background: rgba(10, 5, 27, 0.76);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
    color: #fff;
    font: inherit;
    font-size: 22px;
    cursor: pointer;
    pointer-events: auto;
    backdrop-filter: blur(8px);
    transition: color 200ms ease, background 200ms ease, border-color 200ms ease, transform 200ms ease;
}

.video-carousel__control svg {
    display: block;
    width: 22px;
    height: 22px;
    flex: 0 0 auto;
    stroke: currentColor;
}

.video-carousel__control:hover,
.video-carousel__control:focus-visible {
    border-color: rgba(238, 138, 13, 0.8);
    background: rgba(238, 138, 13, 0.9);
    color: #fff;
    outline: none;
    transform: scale(1.06);
}

.video-carousel__control:disabled {
    cursor: wait;
    opacity: 0.45;
}

.video-preview-modal__nav {
    position: absolute;
    z-index: 3;
    top: 50%;
    transform: translateY(-50%);
}

.video-preview-modal__nav--previous {
    left: -58px;
}

.video-preview-modal__nav--next {
    right: -58px;
}

.video-preview-modal__nav:hover,
.video-preview-modal__nav:focus-visible {
    transform: translateY(-50%) scale(1.06);
}

.video-preview-modal__indicators {
    position: absolute;
    z-index: 3;
    right: 16px;
    bottom: -32px;
    left: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.video-preview-modal__nav[hidden],
.video-preview-modal__indicators[hidden] {
    display: none;
}

.video-carousel__indicators {
    position: absolute;
    z-index: 5;
    right: 16px;
    bottom: 14px;
    left: 16px;
    display: flex;
    justify-content: center;
    gap: 7px;
}

.video-carousel__indicator {
    display: block;
    width: 7px;
    height: 7px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.5);
    cursor: pointer;
    transition: width 300ms ease, border-radius 300ms ease, background 300ms ease;
}

.video-carousel__indicator:hover,
.video-carousel__indicator:focus-visible,
.video-carousel__indicator.is-active {
    width: 22px;
    border-radius: 5px;
    background: var(--accent);
}

.video-carousel__indicator:focus-visible {
    outline: 2px solid #fff;
    outline-offset: 3px;
}

.video-carousel__indicator.is-unavailable {
    display: none;
}

.modules-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 30px; margin-top: 40px; }
.module-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; padding: 30px; display: flex; flex-direction: column; justify-content: space-between; }
.module-card h3 { font-size: 22px; margin-bottom: 12px; color: #fff; }
.module-card p { color: var(--text-muted); font-size: 14px; margin-bottom: 20px; }
.link-arrow { color: var(--accent); font-weight: 700; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; }
.capabilities { background: #f8f9fa; border-left: 5px solid #341b8c; padding: 35px; border-radius: 0 10px 10px 0; margin-bottom: 50px; color: #333; }
.capabilities h2 { color: #341b8c; font-size: 24px; margin-bottom: 20px; }
.capabilities ul { list-style: none; padding: 0; margin: 0; }
.capabilities li { position: relative; padding-left: 30px; margin-bottom: 12px; font-size: 15px; color: #444; }
.capabilities li::before { content: "✓"; position: absolute; left: 0; top: 0; color: var(--accent); font-weight: bold; font-size: 18px; }
.cta-bottom { background: linear-gradient(135deg, #1c0d5a 0%, #0a051b 100%); border: 1px solid var(--border); border-radius: 16px; padding: 40px; text-align: center; margin-top: 60px; }

footer { background: #05020d; border-top: 1px solid var(--border); padding: 40px; text-align: center; color: var(--text-muted); font-size: 13px; margin-top: 80px; }

/* ==================================================
   RESPONSIVIDADE PARA CELULARES E TABLETS (MOBILE)
   ================================================== */
@media (max-width: 768px) {

    /* 1. Top Header (Telcomanager) no Celular */
    .top-header {
        padding: 10px 15px !important;
        gap: 10px;
    }

    .top-header .top-logo img,
    .top-header a img {
        height: 28px !important;
    }

    .top-header nav.top-nav {
        gap: 12px !important;
    }

    .top-header nav.top-nav a,
    .dropdown-toggle {
        font-size: 12px !important;
    }

    .dropdown-menu {
        min-width: 160px;
        right: -10px;
    }

    /* 2. Sub-Nav (TelcoAnalytics) - Layout Tátil Deslizante */
    .sub-nav {
        padding: 8px 0 !important;
    }

    .sub-nav-container {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 10px !important;
        padding: 0 15px !important;
    }

    .sub-nav .product-brand img,
    .sub-nav .product-brand svg {
        height: 30px !important;
    }

    .sub-nav-links {
        width: 100% !important;
        overflow-x: auto !important;
        white-space: nowrap !important;
        padding-bottom: 5px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        display: flex !important;
        gap: 8px !important;
    }

    .sub-nav-links::-webkit-scrollbar {
        display: none;
    }

    .sub-nav-links a {
        font-size: 12px !important;
        padding: 6px 14px !important;
        flex-shrink: 0;
    }

    .btn-nav-cta {
        padding: 6px 14px !important;
        font-size: 12px !important;
    }

    .lang-switch {
        padding: 2px 8px !important;
        font-size: 11px !important;
    }

    /* 3. Ajuste do Conteúdo das Páginas no Celular */
    .container {
        padding: 30px 15px !important;
    }

    .hero {
        flex-direction: column !important;
        gap: 30px !important;
        margin-bottom: 40px !important;
    }

    .hero-text,
    .hero-media {
        width: 100%;
        min-width: 0 !important;
    }

    .hero-text h1 {
        font-size: 28px !important;
        line-height: 1.3 !important;
    }

    .hero-text p {
        font-size: 15px !important;
    }

    .video-carousel__controls {
        right: 10px;
        left: 10px;
    }

    .video-carousel__control {
        width: 42px;
        height: 42px;
        background: rgba(10, 5, 27, 0.84);
    }

    .feature-box,
    .feature-box.reverse {
        flex-direction: column !important;
        padding: 20px !important;
        gap: 20px !important;
    }

    .feature-box-text,
    .feature-box-media {
        width: 100%;
        min-width: 0;
    }

    .feature-box-text h2 {
        font-size: 20px !important;
    }

    .page-header {
        margin-bottom: 30px !important;
    }

    .page-header h1 {
        font-size: 26px !important;
    }

    .capabilities {
        padding: 20px !important;
    }

    .capabilities h2 {
        font-size: 20px !important;
    }

    .cta-bottom {
        padding: 25px 15px !important;
    }

    .cta-bottom h2 {
        font-size: 20px !important;
    }

    .video-preview-modal {
        padding: 12px;
    }

    .video-preview-modal__dialog {
        width: calc(100vw - 24px);
        max-height: calc(100dvh - var(--video-preview-header-offset, 0px) - 24px);
        border-radius: 12px;
    }

    .video-preview-modal__close {
        top: 6px;
        right: 6px;
        width: 44px;
        height: 44px;
    }
}

@media (max-width: 900px) {
    .video-preview-modal__nav--previous {
        left: 10px;
    }

    .video-preview-modal__nav--next {
        right: 10px;
    }

    .video-preview-modal__indicators {
        bottom: 10px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .video-carousel__video,
    .video-carousel__indicator,
    .feature-box-video,
    .feature-reveal-enabled .feature-box,
    .video-preview-modal,
    .video-preview-modal__dialog,
    .video-preview-modal__video,
    .video-preview-surface {
        transition: none;
    }

    .feature-reveal-enabled .feature-box {
        opacity: 1;
        transform: none;
    }

    .video-preview-surface.is-video-hovered {
        transform: none;
    }
}
