/* ==========================================================================
   CSS Variables & Custom Properties
   ========================================================================== */
   :root {
    /* Colors */
    --clr-white: #ffffff;
    --clr-gray: #a0a0a0;
    --clr-gray-light: #f4f4f4;
    --clr-chumbo: #2B2A2B;
    --clr-dark: #363435;
    --clr-laser: #34FAFF;

    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;

    /* Spacing & Layout */
    --section-padding: 5rem 0;
    --container-width: 1200px;
    
    /* Transitions */
    --transition-fast: 0.3s ease;
    --transition-slow: 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================================================
   Reset & Base Styles
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    overflow-x: hidden;
    width: 100%;
    font-family: var(--font-body);
    color: var(--clr-chumbo);
    background-color: var(--clr-white);
    line-height: 1.6;
    scroll-behavior: smooth;
    scroll-padding-top: 100px; /* Compensa a altura do header fixo ao clicar nas âncoras */
    /* Prevent overflow on long words */
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--clr-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--clr-chumbo);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--clr-laser);
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1rem;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color var(--transition-fast);
}

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

/* ==========================================================================
   Layout & Utility Classes
   ========================================================================== */
.container {
    width: 90%;
    max-width: var(--container-width);
    margin: 0 auto;
}

.section {
    padding: var(--section-padding);
}

.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 3rem;
    position: relative;
    color: var(--clr-chumbo);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 4px;
    background-color: var(--clr-laser);
    border-radius: 2px;
}

.section-subtitle {
    text-align: center;
    margin-top: -2rem;
    margin-bottom: 3rem;
    color: var(--clr-gray);
    font-size: 1.1rem;
}

.bg-dark {
    background-color: var(--clr-dark);
    color: var(--clr-white);
}

.bg-dark .section-title {
    color: var(--clr-white);
}

/* ==========================================================================
   Preloader (Laser Cut Effect)
   ========================================================================== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    pointer-events: none; /* Let clicks pass through after hidden */
}

/* Ocultar a barra de rolagem enquanto o preloader está ativo */
body.preloading {
    overflow: hidden;
}

.preloader-half {
    width: 100%;
    height: 50vh;
    background-color: var(--clr-dark);
    position: absolute;
    left: 0;
    display: flex;
    justify-content: center;
    overflow: hidden;
    transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1);
}

.preloader-top {
    top: 0;
    align-items: flex-end;
}

.preloader-bottom {
    bottom: 0;
    align-items: flex-start;
}

.preloader-content {
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    color: var(--clr-white);
    letter-spacing: 10px;
    opacity: 0.2;
}

.preloader-top .preloader-content {
    transform: translateY(50%);
}

.preloader-bottom .preloader-content {
    transform: translateY(-50%);
}

.preloader-laser {
    position: absolute;
    top: 50%;
    left: -100%;
    width: 100%;
    height: 4px;
    background-color: var(--clr-laser);
    box-shadow: 0 0 20px var(--clr-laser), 0 0 40px var(--clr-laser);
    transform: translateY(-50%);
    animation: laserCut 1.5s ease-in-out forwards;
    z-index: 10;
}

@keyframes laserCut {
    0% { left: -100%; }
    50% { left: 0; width: 100%; opacity: 1; }
    80% { left: 0; width: 100%; opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

/* Classes applied by JS when animation ends */
.preloader.loaded .preloader-top {
    transform: translateY(-100%);
}

.preloader.loaded .preloader-bottom {
    transform: translateY(100%);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
    font-family: var(--font-heading);
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all var(--transition-fast);
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.btn i {
    flex-shrink: 0; /* Prevents icon from squishing */
}

.btn-primary {
    background-color: var(--clr-laser);
    color: var(--clr-chumbo);
}

.btn-primary:hover {
    background-color: var(--clr-white);
    box-shadow: 0 0 15px rgba(52, 250, 255, 0.5);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1rem;
}

/* ==========================================================================
   Header & Navbar
   ========================================================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: rgba(20, 20, 20, 0.98); /* Cor mais escura */
    backdrop-filter: blur(10px);
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: padding var(--transition-fast);
}

.navbar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 90px; /* Aumentado para acomodar logo maior */
}

.logo img {
    height: 60px; /* Logo maior */
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a {
    color: var(--clr-white);
    font-weight: 500;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: var(--clr-laser);
}

.nav-links a.btn-nav {
    color: var(--clr-chumbo);
    font-weight: 800;
}

.nav-links a.btn-nav:hover {
    color: var(--clr-chumbo);
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--clr-white);
    font-size: 1.5rem;
    cursor: pointer;
}

/* Mobile Nav Overlay */
.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background-color: var(--clr-chumbo);
    z-index: 2000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: right var(--transition-slow);
}

.mobile-nav.active {
    right: 0;
}

.close-menu-btn {
    position: absolute;
    top: 25px;
    right: 5%;
    background: none;
    border: none;
    color: var(--clr-white);
    font-size: 2rem;
    cursor: pointer;
}

.mobile-nav-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.mobile-nav-content a {
    color: var(--clr-white);
    font-size: 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
}

.mobile-nav-content a:hover {
    color: var(--clr-laser);
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    position: relative;
    height: 100svh; /* Perfect mobile height */
    display: flex;
    align-items: center;
    background-color: var(--clr-chumbo);
    color: var(--clr-white);
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: var(--clr-dark);
    /* Fallback linear gradient if no image */
    background-image: linear-gradient(135deg, rgba(43,42,43,0.9) 0%, rgba(54,52,53,0.8) 100%), url('../images/fundo-hero.jpg');
    background-size: cover;
    background-position: center;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding-top: 80px; /* Offset for navbar */
}

.hero h1 {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

.hero h1 span {
    color: var(--clr-laser);
}

.hero p {
    font-size: 1.2rem;
    color: var(--clr-gray-light);
    margin-bottom: 2.5rem;
    max-width: 600px;
}

.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    color: var(--clr-laser);
    font-size: 2rem;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-20px) translateX(-50%); }
    60% { transform: translateY(-10px) translateX(-50%); }
}

/* ==========================================================================
   About Section
   ========================================================================== */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h2 {
    font-size: 2.5rem;
    color: var(--clr-chumbo);
    margin-bottom: 1.5rem;
}

.about-text p {
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #444;
}

.about-img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* ==========================================================================
   Cards Shared Styles (Services & Differentials)
   ========================================================================== */
.card {
    background-color: var(--clr-white);
    padding: 2.5rem 2rem;
    border-radius: 8px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform var(--transition-fast), box-shadow var(--transition-fast);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    height: 100%; /* Important for flex-stretch parent */
}

.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0,0,0,0.1);
}

.card i {
    font-size: 2.5rem;
    color: var(--clr-laser);
    margin-bottom: 1.5rem;
    flex-shrink: 0;
}

.card h3 {
    color: var(--clr-chumbo);
    font-size: 1.3rem;
    margin-bottom: 1rem;
}

.card p {
    color: #555;
    flex-grow: 1; /* Pushes content evenly */
}

/* Serviços */
.services {
    background-image: linear-gradient(rgba(54,52,53,0.92), rgba(54,52,53,0.92)), url('../images/servicos-bg.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed; /* Efeito Parallax */
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 2rem;
    align-items: stretch; /* Cards have same height */
}

.services .card {
    background-color: var(--clr-chumbo);
    box-shadow: none;
    border: 1px solid rgba(255,255,255,0.05);
}

.services .card h3 {
    color: var(--clr-white);
}

.services .card p {
    color: var(--clr-gray);
}

.services .card:hover {
    border-color: var(--clr-laser);
}

/* Diferenciais */
.differentials-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    align-items: stretch;
}

.differentials {
    background-color: var(--clr-gray-light);
}

/* ==========================================================================
   Gallery
   ========================================================================== */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.gallery-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    background-color: var(--clr-chumbo);
}

.gallery-item img, .gallery-item video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-slow);
}

.gallery-item:hover img, .gallery-item:hover video {
    transform: scale(1.05);
}

.gallery-item::after {
    content: '\f0b2'; /* FontAwesome expand icon */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--clr-white);
    font-size: 2rem;
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(43, 42, 43, 0.7);
    opacity: 0;
    transition: opacity var(--transition-fast);
    pointer-events: none;
}

.gallery-item:hover .gallery-overlay {
    opacity: 1;
}

.gallery-loading, .gallery-empty {
    text-align: center;
    padding: 3rem;
    color: var(--clr-gray);
    font-size: 1.2rem;
}

/* Lightbox Modal */
.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(43, 42, 43, 0.95);
    z-index: 3000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}

.lightbox.active {
    opacity: 1;
    pointer-events: auto;
}

.lightbox-content {
    max-width: 90%;
    max-height: 90vh;
    border-radius: 4px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lightbox-close {
    position: absolute;
    top: 30px;
    right: 30px;
    background: none;
    border: none;
    color: var(--clr-white);
    font-size: 2rem;
    cursor: pointer;
    transition: color var(--transition-fast);
}

.lightbox-close:hover {
    color: var(--clr-laser);
}

/* ==========================================================================
   Contact
   ========================================================================== */
.contact-box {
    background-color: var(--clr-white);
    padding: 4rem;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
    text-align: center;
    max-width: 800px;
    margin: 0 auto;
}

.contact-box p {
    font-size: 1.2rem;
    color: #555;
    margin-bottom: 3rem;
}

.contact-methods {
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Alinha os ícones pelo topo */
    gap: 2rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}

.contact-item {
    flex: 1; /* Força que ambos ocupem 50% do espaço, garantindo simetria perfeita */
    min-width: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    color: var(--clr-chumbo);
}

.contact-item i {
    font-size: 2rem;
    color: var(--clr-laser);
    background-color: var(--clr-dark);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform var(--transition-fast);
}

.contact-item:hover i {
    transform: scale(1.1);
}

.cta-final {
    width: 100%;
    max-width: 400px;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--clr-chumbo);
    color: var(--clr-gray);
    padding: 4rem 0 2rem;
    border-top: 5px solid var(--clr-laser);
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 3rem;
    flex-wrap: wrap;
    gap: 2rem;
}

.footer-brand .footer-logo {
    height: 40px;
    margin-bottom: 1rem;
    filter: brightness(0) invert(1); /* Makes logo white if it's dark */
}

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

.footer-social a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: rgba(255,255,255,0.1);
    color: var(--clr-white);
    transition: all var(--transition-fast);
}

.footer-social a:hover {
    background-color: var(--clr-laser);
    color: var(--clr-chumbo);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

/* ==========================================================================
   Media Queries (Responsiveness)
   ========================================================================== */

/* Tablet (max-width: 1024px) */
@media (max-width: 1024px) {
    .services-grid, .gallery-grid {
        grid-template-columns: repeat(2, 1fr); /* 4 -> 2 */
    }
    
    .differentials-grid {
        grid-template-columns: repeat(2, 1fr); /* 3 -> 2 */
    }
}

/* Mobile Landscape & Small Tablets (max-width: 768px) */
@media (max-width: 768px) {
    .nav-links, .btn-nav {
        display: none;
    }
    
    .mobile-menu-btn {
        display: block;
    }
    
    .about-grid {
        grid-template-columns: 1fr;
    }
    
    .hero h1 {
        font-size: 3rem;
    }
    
    .hero-content {
        text-align: center;
        padding-bottom: 80px; /* Padding extra na hero para evitar sobreposição de elementos mobile */
    }
    
    .scroll-indicator.desktop-only {
        display: none; /* Hide on mobile */
    }
    
    .contact-box {
        padding: 2rem;
    }
    
    .contact-methods {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .contact-item {
        flex-direction: row;
        text-align: left;
    }
}

/* Mobile Portrait (max-width: 576px) */
@media (max-width: 576px) {
    .services-grid, .gallery-grid, .differentials-grid {
        grid-template-columns: 1fr; /* 2 -> 1 */
    }
    
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .btn {
        width: 100%; /* CTAs ocupam 100% da largura no mobile */
        line-height: 1.5; /* Altura de linha maior para o CTA mobile */
        padding: 1.2rem 1.5rem; /* Tap-area maior */
    }
    
    .btn i {
        font-size: 1.2rem; /* Aumentar proporção do ícone no mobile */
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
}
