/* Global Styles */
:root {
    --primary-color: #009999;
    --secondary-color: #6c757d;
    --dark-bg: #121212;
    --light-bg: #f8f9fa;
    --font-main: 'Outfit', sans-serif;
    --bs-primary: #009999;
    --bs-primary-rgb: 0, 153, 153;
    --bs-link-color: #009999;
    --bs-link-hover-color: #007777;
}

html {
    scroll-padding-top: 80px;
    /* Offset for fixed navbar */
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    overflow-x: hidden;
}

/* Navbar */
/* Navbar */
.navbar {
    transition: all 0.4s ease-in-out;
    background-color: #ffffff;
    padding: 0;
    /* Removed padding to match logo height */
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    align-items: center;
}

.btn-custom-action {
    background-color: #cc3300 !important;
    color: #ffffff !important;
    border: none !important;
}

.btn-custom-action:hover {
    background-color: #b32d00 !important;
    color: #ffffff !important;
}

.navbar-brand img {
    max-height: 80px;
    width: auto;
    border-radius: 0 !important;
}

/* Nav Link overrides for white background */
.nav-link {
    font-weight: 500;
    margin-left: 1rem;
    position: relative;
    padding-bottom: 5px;
    color: #333 !important;
    /* Dark text */
}

.nav-link:hover,
.nav-link.active {
    color: var(--primary-color) !important;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 0;
    background-color: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 100%;
}

/* Mobile Toggler override */
.navbar-toggler {
    border-color: rgba(0, 0, 0, 0.1);
}

.navbar-toggler-icon {
    /* Reverted to dark stroke for white background */
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='rgba(0, 0, 0, 0.55)' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* Hero Section */
.hero-section {
    height: 100vh;
    background: url('img/back2.png') no-repeat center center/cover;
    position: relative;
    margin-top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 0;
}

.overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Updated gradient to use teal tones */
    background: linear-gradient(135deg, rgba(0, 0, 0, 0.9) 0%, rgba(0, 60, 60, 0.7) 100%);
}

.z-index-1 {
    position: relative;
    z-index: 1;
}

/* Animations */
.animate-up {
    opacity: 0;
    transform: translateY(30px);
    animation: fadeInUp 0.8s forwards;
}

.delay-100 {
    animation-delay: 0.1s;
}

.delay-200 {
    animation-delay: 0.2s;
}

.delay-300 {
    animation-delay: 0.3s;
}

.delay-400 {
    animation-delay: 0.4s;
}

/* Hero Badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    background: rgba(0, 153, 153, 0.25);
    border: 1px solid rgba(0, 220, 220, 0.4);
    color: #00dddd;
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.45rem 1.2rem;
    border-radius: 50px;
    letter-spacing: 0.03em;
    backdrop-filter: blur(6px);
}

/* Hero Highlight */
.hero-highlight {
    color: #ffffff;
    position: relative;
}

/* Hero Lead */
.hero-lead {
    font-size: 1.3rem;
    line-height: 1.8;
    color: rgba(255, 255, 255, 0.82);
    font-weight: 300;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.stat-number {
    font-size: 2.2rem;
    font-weight: 700;
    color: #00cccc;
    line-height: 1;
}

.stat-label {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.65);
    margin-top: 0.3rem;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.hero-stat-divider {
    width: 1px;
    height: 50px;
    background: rgba(255, 255, 255, 0.2);
}

@keyframes fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Services */
.service-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-radius: 1rem;
    overflow: hidden;
    background-color: #fff;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, .175) !important;
}

.icon-box {
    width: 80px;
    height: 80px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    /* Updated rgba base to teal-ish */
    background-color: rgba(0, 153, 153, 0.1);
    transition: background-color 0.3s ease;
}

.service-card:hover .icon-box {
    background-color: var(--primary-color);
    color: white !important;
}

.service-card:hover .icon-box i {
    color: white !important;
}

/* About Section */
.pattern-dots {
    width: 100px;
    height: 100px;
    /* Updated rgba base to teal-ish */
    background-image: radial-gradient(rgba(0, 153, 153, 0.3) 2px, transparent 2px);
    background-size: 15px 15px;
    z-index: 0;
}

/* WhatsApp Float */
.whatsapp-float {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 40px;
    right: 40px;
    background-color: #25d366;
    color: #FFF;
    border-radius: 50px;
    text-align: center;
    font-size: 30px;
    box-shadow: 2px 2px 3px #999;
    z-index: 100;
    transition: transform 0.3s;
}

.whatsapp-float:hover {
    transform: scale(1.1);
}

.whatsapp-float img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

/* Contact Form */
.form-control:focus {
    box-shadow: none;
    border-color: var(--primary-color);
    background-color: #fff !important;
}

/* Bootstrap Overrides for Primary Color */
.text-primary {
    color: var(--primary-color) !important;
}

.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-primary:hover {
    background-color: #007777 !important;
    border-color: #007777 !important;
}

.btn-outline-primary {
    color: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
}

.btn-outline-primary:hover {
    background-color: var(--primary-color) !important;
    color: #fff !important;
}

/* ── Destaque Título Sistemas ── */
.sistemas-title-box {
    width: 100%;
    background: #f4f5f6;
    border-radius: 1rem;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.10), 0 1px 4px rgba(0, 0, 0, 0.06);
    padding: 2.8rem 2rem;
    text-align: center;
    margin-bottom: 3.5rem;
}

.sistemas-title-label {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.2em;
    text-transform: uppercase;
    color: var(--primary-color);
    margin-bottom: 0.6rem;
}

.sistemas-title-text {
    font-size: 3.4rem;
    font-weight: 800;
    color: #0d1f4c;
    margin: 0;
    letter-spacing: -0.02em;
    line-height: 1;
}

/* Sistemas Section - imagens padronizadas */
#sistemas .card img {
    width: 100%;
    height: 280px;
    object-fit: cover;
    object-position: top;
}

/* Video Cards */
.video-thumb-wrapper {
    position: relative;
    width: 100%;
    height: 280px;
    cursor: pointer;
    overflow: hidden;
    background: #000;
}

.video-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    display: block;
    transition: opacity 0.2s ease;
}

.video-thumb-wrapper:hover .video-thumb {
    opacity: 0.75;
}

.video-play-btn {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 4rem;
    opacity: 0.85;
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}

.video-thumb-wrapper:hover .video-play-btn {
    opacity: 1;
    transform: scale(1.1);
}

/* Video Lightbox */
.video-lightbox-content {
    width: 90vw;
    max-width: 1100px;
}

.lightbox-video {
    width: 100%;
    max-height: 85vh;
    border-radius: 0.75rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.7);
    display: block;
    background: #000;
}

@media (max-width: 767.98px) {
    .video-thumb-wrapper {
        height: 180px;
    }
}

/* Lightbox */
.lightbox-img {
    cursor: zoom-in;
    transition: opacity 0.2s ease;
}

.lightbox-img:hover {
    opacity: 0.88;
}

.lightbox-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.88);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    backdrop-filter: blur(6px);
    animation: lightboxFadeIn 0.25s ease;
}

.lightbox-overlay.active {
    display: flex;
}

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

.lightbox-content {
    position: relative;
    max-width: 92vw;
    max-height: 92vh;
    animation: lightboxZoomIn 0.3s ease;
}

@keyframes lightboxZoomIn {
    from { transform: scale(0.85); opacity: 0; }
    to   { transform: scale(1);    opacity: 1; }
}

.lightbox-content img {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 0.75rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    display: block;
    object-fit: contain;
}

.lightbox-caption {
    color: rgba(255, 255, 255, 0.8);
    text-align: center;
    margin-top: 0.75rem;
    font-size: 0.95rem;
    margin-bottom: 0;
}

.lightbox-close {
    position: fixed;
    top: 1.25rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #fff;
    font-size: 2rem;
    line-height: 1;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease, transform 0.2s ease;
    z-index: 10000;
}

.lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Responsive */
@media (max-width: 991.98px) {
    .hero-section h1 {
        font-size: 2.5rem;
    }

    .navbar {
        background-color: #ffffff;
        /* White background on mobile */
        height: auto;
    }

    .navbar .nav-link {
        color: #333 !important;
        /* Dark text for white background */
    }
}

@media (max-width: 767.98px) {
    #sistemas .card img {
        height: 180px;
    }
}