/* ============================================
   FULL VISION SECURITY - MODERN STYLES 2025
   ============================================ */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    /* --- CORES PRINCIPAIS (MANTIDAS) --- */
    --primary-blue: #2B5392;
    --secondary-blue: #1e3a66;
    --brand-black: #1A1A1A;
    --accent-cyan: #60a5fa;
    --text-main: #ffffff;
    --bg-body: rgba(221, 221, 221, 0.53);
    
    /* --- MELHORIAS --- */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --glass-border: rgba(255, 255, 255, 0.4);
    --shadow-soft: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-medium: 0 8px 32px rgba(0, 0, 0, 0.12);
    --shadow-heavy: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --transition-smooth: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* ============================================
   RESET & BASE
   ============================================ */

*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    scroll-behavior: smooth;
    font-family: 'Poppins', sans-serif;
    background: var(--bg-body);
    min-height: 100vh;
    color: var(--text-main);
    -webkit-tap-highlight-color: transparent;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

/* ============================================
   NAVBAR (MANTIDA EXATAMENTE COMO ESTÁ)
   ============================================ */

.navbar {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    background: rgba(184, 184, 184, 0.418);
    border: 1px solid rgba(122, 122, 122, 0.137);
    width: 95%;
    margin: 0 auto;
    left: 0;
    right: 0;
    position: fixed;
    z-index: 50;
    box-shadow: 0 4px 6px -1px rgba(255, 255, 255, 0.1);
}

.navbar.scrolled {
    background: rgba(205, 206, 211, 0.459);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.342);
    border-bottom: 1px solid rgba(255, 255, 255, 0.541);
    box-shadow: 0 8px 32px 0 rgba(255, 255, 255, 0.205);
    width: 98%;
}

.navbar-logo {
    height: 40px;
    margin-left: 75px;
    width: auto;
    transition: all 0.4s ease;
}

.navbar.scrolled .navbar-logo {
    transform: scale(0.80);
}

.nav-link {
    position: relative;
    transition: all 0.3s ease;
    padding: 8px 18px;
    text-decoration: none;
    color: var(--brand-black) !important;
    font-weight: 600;
    font-size: 0.95rem;
    display: block;
}

.nav-link:hover {
    color: var(--primary-blue) !important;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 50px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Mobile Menu */
#mobile-menu {
    transition: all 0.3s ease;
}

#mobile-menu:not(.hidden) {
    animation: slideDown 0.3s ease;
}

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

/* ============================================
   HERO SECTION (MANTIDA COM MELHORIAS SUTIS)
   ============================================ */

.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 0;
    pointer-events: none;
}

.hero-video-bg video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    top: 0;
    left: 0;
}

.hero-video-bg::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(31, 31, 31, 0.8);
    z-index: 1;
}

.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 1rem 4rem;
    z-index: 1;
}

.hero-content {
    text-align: center;
    z-index: 10;
    max-width: 1000px;
    width: 100%;
    position: relative;
}

.hero-content h1 {
    color: white !important;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    letter-spacing: -0.02em;
}

.hero-content p {
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Hero CTA Buttons */
.btn-modern {
    position: relative;
    background: var(--primary-blue);
    border: none;
    padding: 14px 36px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
    box-shadow: 0 4px 15px rgba(43, 83, 146, 0.3);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.btn-modern::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;
}

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

.btn-modern:hover {
    transform: translateY(-3px);
    background: var(--secondary-blue);
    box-shadow: 0 8px 25px rgba(43, 83, 146, 0.4);
}

.btn-outline {
    background: transparent;
    border: 2px solid white;
    padding: 12px 34px;
    border-radius: 50px;
    color: white;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition-smooth);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
    position: relative;
    overflow: hidden;
}

.btn-outline:hover {
    background: white;
    color: var(--primary-blue);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 255, 255, 0.2);
}

/* ============================================
   SCROLL REVEAL ANIMATIONS
   ============================================ */

.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1), transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

.fade-in {
    opacity: 0;
    transition: opacity 0.8s ease;
}

.fade-in.visible {
    opacity: 1;
}

/* ============================================
   SERVICES SECTION
   ============================================ */

.section-bg {
    background: var(--bg-body);
    position: relative;
    z-index: 1;
}

.section-divider {
    height: 4px;
    background: var(--primary-blue);
    margin: 40px 0;
    border-radius: 4px;
    width: 80px !important;
}

.services-grid-wrapper {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem 2rem;
    padding: 2rem 0;
    align-items: start;
}

@media (min-width: 1400px) {
    .services-grid-wrapper { grid-template-columns: repeat(3, 1fr); }
}

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

.service-card-modern {
    position: relative;
    cursor: pointer;
}

/* Service Image Container */
.service-image-container {
    position: relative;
    width: 100%;
    height: 300px;
    margin: 0;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
    z-index: 10;
    background: white;
    transition: transform 0.4s ease, border-radius 0.4s ease, box-shadow 0.4s ease;
    opacity: 0;
}

.service-image-container:hover {
    box-shadow: var(--shadow-heavy);
}

@media (min-width: 1024px) {
    .service-card-modern:hover .service-image-container {
        transform: translateY(-5px);
        border-radius: 16px 16px 0 0;
    }
}

.service-card-modern.active .service-image-container {
    transform: translateY(-5px);
    border-radius: 16px 16px 0 0;
}

.service-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.service-image-container:hover img {
    transform: scale(1.05);
}

.service-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(43, 83, 146, 0.2));
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    padding: 1.5rem;
    color: white;
}

/* Card Icons */
.card-icon {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    color: var(--accent-cyan);
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.5));
    transition: transform 0.3s ease;
}

.service-card-modern:hover .card-icon {
    transform: scale(1.1);
}

/* Button inside card */
.btn-card-more {
    background-color: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    text-decoration: none;
    transition: var(--transition-smooth);
    display: inline-block;
    white-space: nowrap;
}

.btn-card-more:hover {
    background-color: var(--primary-blue);
    border-color: var(--primary-blue);
    transform: translateY(-2px);
}

/* Hand gesture for mobile */
.hand-gesture {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 20;
    color: rgba(255, 255, 255, 0.9);
    font-size: 3rem;
    pointer-events: none;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.6);
    animation: tap-animation 2s infinite;
}

@keyframes tap-animation {
    0% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
    50% { transform: translate(-50%, -50%) scale(0.8); opacity: 1; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 0; }
}

@media (max-width: 768px) {
    .hand-gesture { display: block; }
}

.service-card-modern.active .hand-gesture {
    display: none !important;
}

/* Service Details (sliding card) */
.service-details {
    background-color: var(--secondary-blue);
    color: #f3f4f6;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 0.6s ease-in-out, opacity 0.4s ease-in-out, padding 0.4s ease;
    border-radius: 0 0 16px 16px;
    margin-top: -5px;
    position: relative;
    z-index: 5;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
}

@media (min-width: 1024px) {
    .service-card-modern:hover .service-details {
        max-height: 400px;
        opacity: 1;
        padding: 1.5rem;
    }
}

.service-card-modern.active .service-details {
    max-height: 400px;
    opacity: 1;
    padding: 1.5rem;
}

.service-details h4 {
    color: var(--accent-cyan);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.8rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
}

.service-details ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-details li {
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-details li i {
    color: var(--accent-cyan);
    font-size: 0.8rem;
}

/* ============================================
   CLIENTS CAROUSEL (INFINITE LOOP)
   ============================================ */

.clients-section {
    background: var(--bg-body);
    padding: 3rem 0;
    overflow: hidden;
}

.clients-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: hidden;
    mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(to right, transparent, black 10%, black 90%, transparent);
}

.clients-track {
    display: flex;
    gap: 3rem;
    animation: scroll-left 30s linear infinite;
    width: max-content;
}

.clients-track:hover {
    animation-play-state: paused;
}

@keyframes scroll-left {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.client-logo {
    display: block;
    height: 45px;
    width: auto;
    object-fit: contain;
    filter: grayscale(10%);
    opacity: 0.6;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.client-logo:hover {
    transform: scale(1.1);
    filter: grayscale(0%);
    opacity: 1;
}

.linha-clientes {
    width: 100px;
    height: 4px;
    margin: 10px auto;
    border-radius: 99px;
    background: var(--primary-blue);
}

/* ============================================
   ABOUT SECTION
   ============================================ */

.glass-card {
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.1);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 1);
    backdrop-filter: blur(10px);
}

.stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 20px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: var(--shadow-soft);
    text-align: center;
    transition: var(--transition-smooth);
}

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

.stat-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-blue);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.85rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Parallax Elements */
.parallax-layer {
    will-change: transform;
    transition: transform 0.05s linear;
}

/* ============================================
   FOOTER
   ============================================ */

.modern-footer {
    background: var(--brand-black);
    color: #d1d5db;
    padding: 5rem 0 1rem;
}

.footer-logo {
    max-width: 160px;
    margin-bottom: 1.5rem;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

.social-icons {
    display: flex;
    gap: 1rem;
}

.social-icon {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    transition: var(--transition-smooth);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon:hover {
    transform: translateY(-5px);
    background: var(--primary-blue);
    border-color: var(--primary-blue);
}

.footer-title {
    color: white;
    font-size: 1.125rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    position: relative;
    padding-left: 1rem;
}

.footer-title::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 20px;
    background: var(--primary-blue);
    border-radius: 2px;
}

.footer-link {
    color: #9ca3af;
    transition: color 0.3s ease;
}

.footer-link:hover {
    color: white;
}

/* ============================================
   POPUP
   ============================================ */

.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(26, 26, 26, 0.8);
    z-index: 999;
    backdrop-filter: blur(6px);
}

.popup-overlay.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.contact-popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: white;
    padding: 2.5rem;
    border-radius: 24px;
    box-shadow: var(--shadow-heavy);
    z-index: 1000;
    max-width: 450px;
    width: 90%;
    border-top: 6px solid var(--primary-blue);
}

.contact-popup.active {
    display: block;
    animation: popupFadeIn 0.3s ease;
}

@keyframes popupFadeIn {
    from { opacity: 0; transform: translate(-50%, -45%); }
    to { opacity: 1; transform: translate(-50%, -50%); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.popup-btn {
    width: 100%;
    padding: 16px 20px;
    margin: 0.8rem 0;
    border-radius: 16px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    cursor: pointer;
    transition: var(--transition-smooth);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.popup-btn.consultor,
.popup-btn.tecnico {
    background: var(--primary-blue);
    color: white;
    box-shadow: 0 8px 20px rgba(43, 83, 146, 0.25);
}

.popup-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(43, 83, 146, 0.35);
}

/* ============================================
   SERVICE PAGES (cftv.html, automacao.html etc)
   ============================================ */

.page-navbar {
    background: rgba(205, 206, 211, 0.459);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255, 255, 255, 0.342);
    border-bottom: 1px solid rgba(255, 255, 255, 0.541);
    box-shadow: 0 8px 32px 0 rgba(255, 255, 255, 0.205);
    width: 95%;
    margin: 0 auto;
    position: fixed;
    top: 20px;
    left: 0;
    right: 0;
    z-index: 50;
}

.page-navbar-logo {
    height: 40px;
    margin-left: 20px;
    transition: transform 0.3s ease;
}

.page-navbar-logo:hover {
    transform: scale(1.05);
}

.page-nav-link {
    color: #1a1a1a;
    font-weight: 600;
    margin: 0 15px;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 50px;
    transition: var(--transition-smooth);
    position: relative;
}

.page-nav-link:hover {
    color: var(--primary-blue);
    background: rgba(255, 255, 255, 0.6);
}

.big-card {
    min-height: 600px;
    box-shadow: var(--shadow-heavy);
    transition: box-shadow 0.4s ease;
}

.big-card:hover {
    box-shadow: 0 30px 60px -10px rgba(0, 0, 0, 0.3);
}

.big-card img {
    transition: transform 0.7s ease;
}

.big-card:hover img {
    transform: scale(1.03);
}

.footer-strip {
    background: var(--brand-black);
    width: 100%;
    padding: 1.5rem 0;
    margin-top: auto;
}

.footer-logo-strip {
    height: 35px;
    filter: brightness(0) invert(1);
    opacity: 0.9;
}

/* Mobile menu for service pages */
.mobile-menu-page {
    display: none;
    position: fixed;
    top: 90px;
    left: 2.5%;
    right: 2.5%;
    background: white;
    border-radius: 16px;
    box-shadow: var(--shadow-heavy);
    z-index: 49;
    padding: 1.5rem;
    animation: slideDown 0.3s ease;
}

.mobile-menu-page.active {
    display: block;
}

.mobile-menu-page a {
    display: block;
    padding: 1rem;
    text-align: center;
    color: var(--brand-black);
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 12px;
    transition: all 0.3s ease;
}

.mobile-menu-page a:hover {
    background: rgba(43, 83, 146, 0.1);
    color: var(--primary-blue);
}

/* Hamburger animation */
.hamburger {
    cursor: pointer;
    width: 30px;
    height: 24px;
    position: relative;
}

.hamburger span {
    display: block;
    position: absolute;
    height: 3px;
    width: 100%;
    background: var(--brand-black);
    border-radius: 3px;
    transition: all 0.3s ease;
}

.hamburger span:nth-child(1) { top: 0; }
.hamburger span:nth-child(2) { top: 10px; }
.hamburger span:nth-child(3) { top: 20px; }

.hamburger.active span:nth-child(1) {
    top: 10px;
    transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    top: 10px;
    transform: rotate(-45deg);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

/* Large screens */
@media (min-width: 1536px) {
    .container {
        max-width: 1400px;
    }
}

/* Tablets */
@media (max-width: 1024px) {
    .hero-content h1 {
        font-size: 3.5rem !important;
    }
    
    .services-grid-wrapper {
        gap: 2rem 1.5rem;
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .navbar {
        width: 95%;
        top: 0.8rem;
    }
    
    .navbar-logo {
        margin-left: 20px;
        height: 35px;
    }
    
    .hero-content h1 {
        font-size: 2.5rem !important;
        line-height: 1.2 !important;
    }
    
    .hero-content p {
        font-size: 1.125rem !important;
    }
    
    .hero-section {
        padding: 6rem 1rem 3rem;
        min-height: auto;
        padding-bottom: 4rem;
    }
    
    .btn-modern, .btn-outline {
        padding: 12px 28px;
        font-size: 14px;
        width: 100%;
        max-width: 280px;
    }
    
    .services-grid-wrapper {
        gap: 2rem 1rem;
        padding: 1rem 0;
    }
    
    .service-image-container {
        height: 240px;
    }
    
    .service-overlay h3 {
        font-size: 1.5rem !important;
    }
    
    .section-title {
        font-size: 2rem !important;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .glass-card {
        padding: 2rem !important;
    }
    
    .clients-track {
        gap: 2rem;
        animation-duration: 20s;
    }
    
    .client-logo {
        height: 35px;
    }
    
    .modern-footer {
        padding: 3rem 0 1rem;
    }
    
    .footer-title {
        margin-bottom: 1rem;
    }
    
    .popup-btn {
        padding: 14px 16px;
    }
    
    .page-navbar-logo {
        margin-left: 10px;
        height: 35px;
    }
    
    .big-card {
        min-height: auto;
    }
    
    .big-card > div:first-child {
        padding: 2rem !important;
    }
}

/* Small mobile */
@media (max-width: 480px) {
    .hero-content h1 {
        font-size: 2rem !important;
    }
    
    .hero-content p {
        font-size: 1rem !important;
    }
    
    .service-overlay h3 {
        font-size: 1.25rem !important;
    }
    
    .service-image-container {
        height: 200px;
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
    
    .stat-card {
        padding: 1rem;
    }
    
    .contact-popup {
        padding: 1.5rem;
        border-radius: 20px;
    }
    
    .glass-card {
        padding: 1.5rem !important;
    }
}

/* ============================================
   UTILITY CLASSES
   ============================================ */

.text-gradient {
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-cyan));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-dark {
    background: linear-gradient(180deg, rgba(221, 221, 221, 0.62) 0%, #1b1a1a 100%);
}

/* Smooth scroll offset for fixed header */
html {
    scroll-padding-top: 100px;
}

/* Loading state for images */
img[loading="lazy"] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

img[loading="lazy"].loaded {
    opacity: 1;
}
