/* ===== RESET E CONFIGURAÇÕES BÁSICAS ===== */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    scroll-padding-top: 80px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #1a1a1a;
    background-color: #ffffff;
    overflow-x: hidden;
    font-display: swap;
    text-rendering: optimizeSpeed;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Otimização de performance para imagens */
img {
    max-width: 100%;
    height: auto;
    display: block;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
    will-change: auto;
}

/* ===== VARIÁVEIS CSS ===== */
:root {
    /* Cores principais */
    --primary: #2563eb;
    --primary-dark: #1d4ed8;
    --primary-light: #3b82f6;
    
    /* Cores neutras */
    --white: #ffffff;
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;
    
    /* Cores de destaque */
    --accent: #f59e0b;
    --success: #10b981;
    --error: #ef4444;
    --warning: #f59e0b;
    
    /* Tipografia */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-mono: 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    
    /* Espaçamentos */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* Bordas */
    --radius-sm: 0.25rem;
    --radius: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
    --radius-2xl: 2rem;
    --radius-full: 9999px;
    
    /* Sombras */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.1), 0 1px 2px -1px rgb(0 0 0 / 0.1);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Transições */
    --transition-fast: 150ms ease;
    --transition: 250ms ease;
    --transition-slow: 350ms ease;
    
    /* Z-index */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ===== CONTAINER ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-4);
}

@media (min-width: 640px) {
    .container {
        padding: 0 var(--space-6);
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 var(--space-8);
    }
}

/* ===== HEADER ===== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    transition: var(--transition);
    will-change: transform, background-color;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-sm);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    text-decoration: none;
    color: var(--gray-900);
    font-weight: 700;
    font-size: 1.5rem;
}

.logo-img {
    width: 120px;
    height: 60px;
    object-fit: contain;
}

.logo-text {
    color: var(--primary);
}

.nav-menu {
    display: flex;
    align-items: center;
    gap: var(--space-8);
    list-style: none;
}

.nav-link {
    position: relative;
    color: var(--gray-600);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.875rem;
    transition: var(--transition);
    will-change: color;
}

.nav-link:hover {
    color: var(--primary);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: var(--transition);
}

.nav-link:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    cursor: pointer;
    padding: var(--space-2);
    border-radius: var(--radius);
    transition: var(--transition);
}

.hamburger:hover {
    background: var(--gray-100);
}

.bar {
    width: 24px;
    height: 2px;
    background: var(--gray-700);
    transition: var(--transition);
    will-change: transform, opacity;
}

.hamburger.active .bar:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.hamburger.active .bar:nth-child(2) {
    opacity: 0;
}

.hamburger.active .bar:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* ===== HERO SECTION ===== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../images/hero-bg.jpg') center/cover;
    opacity: 0.1;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    width: 100%;
    text-align: center;
    color:#a5ebd0;
}

.hero-title {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: var(--space-6);
    letter-spacing: -0.025em;
}

.highlight {
    color: var(--accent);
}

.hero-subtitle {
    font-size: clamp(1.125rem, 2vw, 1.25rem);
    max-width: 600px;
    margin: 0 auto var(--space-8);
    opacity: 0.9;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    gap: var(--space-4);
    justify-content: center;
    flex-wrap: wrap;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ===== BOTÕES ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: var(--space-4) var(--space-6);
    font-size: 0.875rem;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition);
    will-change: transform, background-color, box-shadow;
    white-space: nowrap;
}

.btn:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

.btn-primary {
    background: var(--accent);
    color: var(--white);
}

.btn-primary:hover {
    background: #d97706;
    transform: translateY(-1px);
    box-shadow: var(--shadow-lg);
}

.btn-secondary {
    background: transparent;
    color:#a5ebd0;
    border: 2px solid #a5ebd0;
}

.btn-secondary:hover {
    background: var(--white);
    color: var(--primary);
    transform: translateY(-1px);
}

/* ===== SEÇÕES GERAIS ===== */
.section {
    padding: var(--space-20) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-16);
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color:#9ca3af;
    margin-bottom: var(--space-4);
    letter-spacing: -0.025em;
}

.section-subtitle {
    font-size: 1.125rem;
    color: var(--gray-500);
    max-width: 600px;
    margin: 0 auto;
    line-height: 1.6;
    font-weight: 500;
}

/* ===== SOBRE ===== */
.sobre {
    background: var(--gray-50);
}

.sobre-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-16);
    align-items: center;
}

@media (min-width: 1024px) {
    .sobre-content {
        grid-template-columns: 1fr 1fr;
    }
}

.sobre-text h3 {
    font-size: 1.875rem;
    font-weight: 700;
    color:#9ca3af;
    margin-bottom: var(--space-6);
}

.sobre-text p {
    font-size: 1.125rem;
    color: #9ca3af;
    margin-bottom: var(--space-6);
    line-height: 1.7;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: var(--space-8);
    margin-top: var(--space-8);
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
}

.stat-label {
    font-size: 0.875rem;
    color: var(--gray-500);
    font-weight: 500;
    margin-top: var(--space-2);
}

.sobre-image {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
}

.sobre-image img {
    width: 100%;
    height: auto;
    transition: var(--transition);
    will-change: transform;
}

.sobre-image:hover img {
    transform: scale(1.02);
}

/* ===== SERVIÇOS ===== */
.servicos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-8);
}

.servico-card {
    background: var(--white);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
    will-change: transform, box-shadow;
}

.servico-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.servico-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto var(--space-6);
    background: var(--primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
}

.servico-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color:#8fa5d3;
    margin-bottom: var(--space-4);
}

.servico-card p {
    color:#9ca3af;
    line-height: 1.6;
    font-weight: 400;
}

/* ===== PORTFÓLIO ===== */
.portfolio {
    background: var(--gray-50);
}

.portfolio-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-8);
}

.portfolio-item {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    box-shadow: var(--shadow);
    background: var(--white);
    transition: var(--transition);
    will-change: transform, box-shadow;
}

.portfolio-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.portfolio-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: var(--transition);
    will-change: transform;
}

.portfolio-item:hover img {
    transform: scale(1.05);
}

.portfolio-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(37, 99, 235, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition);
}

.portfolio-item:hover .portfolio-overlay {
    opacity: 1;
}

.portfolio-overlay h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    text-align: center;
}

/* ===== DEPOIMENTOS ===== */
.depoimentos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-8);
}

.depoimento-card {
    background: var(--gray-50);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    text-align: center;
    box-shadow: var(--shadow);
    border: 1px solid var(--gray-200);
    transition: var(--transition);
}

.depoimento-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.depoimento-text {
    font-style: italic;
    font-size: 1.125rem;
    color: var(--gray-300);
    margin-bottom: var(--space-6);
    line-height: 1.6;
    font-weight: 400;
}

.depoimento-author {
    font-weight: 700;
    color: var(--primary);
    font-style: normal;
}

/* ===== CONTATO ===== */
.contato {
    background: var(--gray-50);
}

.contato-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-16);
}

@media (min-width: 1024px) {
    .contato-content {
        grid-template-columns: 1fr 1fr;
    }
}

.contato-info h3 {
    font-size: 1.875rem;
    font-weight: 700;
    color: var(--gray-900);
    margin-bottom: var(--space-8);
}

.contato-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
    margin-bottom: var(--space-6);
}

.contato-icon {
    width: 50px;
    height: 50px;
    background: var(--primary);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    flex-shrink: 0;
}

.contato-item h4 {
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: var(--space-1);
}

.contato-item p {
    color: var(--gray-500);
    font-weight: 400;
}

.contato-form {
    background: var(--white);
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--gray-200);
}

.contato-form h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color:#9ca3af
    margin-bottom: var(--space-6);
}

.form-group {
    margin-bottom: var(--space-6);
}

.form-group label {
    display: block;
    font-weight: 600;
    color:#9ca3af;
    margin-bottom: var(--space-2);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--space-3) var(--space-4);
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 1rem;
    transition: var(--transition);
    background: var(--white);
    color: #000000 !important;
    will-change: border-color, box-shadow;
}

.form-group select option {
    color: #000000 !important;
    background: var(--white);
}

.form-group textarea::placeholder,
.form-group input::placeholder {
    color: var(--gray-500);
}

/* Garantir texto preto em todos os estados */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    color: #000000 !important;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgb(37 99 235 / 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

/* ===== FOOTER ===== */
.footer {
    background: var(--gray-900);
    color: #9ca3af;
    padding: var(--space-16) 0 var(--space-8);
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--space-8);
    margin-bottom: var(--space-8);
}

.footer-section h3 {
    font-weight: 700;
    margin-bottom: var(--space-4);
    color: var(--white);
}

.footer-section p {
    color:#9ca3af;
    line-height: 1.6;
    margin-bottom: var(--space-4);
}

.footer-section ul {
    list-style: none;
}

.footer-section ul li {
    margin-bottom: var(--space-2);
}

.footer-section ul li a {
    color:#9ca3af;
    text-decoration: none;
    transition: var(--transition);
}

.footer-section ul li a:hover {
    color: var(--white);
}

.social-links {
    display: flex;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.social-link {
    width: 40px;
    height: 40px;
    background: var(--gray-800);
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    transition: var(--transition);
    will-change: transform, background-color;
}

.social-link:hover {
    background: var(--primary);
    transform: translateY(-2px);
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-8);
    border-top: 1px solid var(--gray-800);
    color: var(--gray-400);
}

/* ===== WHATSAPP FLUTUANTE ===== */
.whatsapp-float {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    z-index: var(--z-fixed);
}

.whatsapp-btn {
    width: 60px;
    height: 60px;
    background: #25d366;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-decoration: none;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
    will-change: transform, box-shadow;
}

.whatsapp-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

/* ===== SKIP LINK ===== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary);
    color: var(--white);
    padding: var(--space-2) var(--space-3);
    text-decoration: none;
    border-radius: var(--radius);
    z-index: var(--z-tooltip);
    font-weight: 600;
    transition: var(--transition);
}

.skip-link:focus {
    top: 6px;
}

/* ===== RESPONSIVIDADE ===== */
@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        left: -100%;
        top: 80px;
        flex-direction: column;
        background: var(--white);
        width: 100%;
        text-align: center;
        transition: var(--transition);
        box-shadow: var(--shadow-lg);
        padding: var(--space-8) 0;
        gap: var(--space-6);
    }

    .nav-menu.active {
        left: 0;
    }

    .hamburger {
        display: flex;
    }

    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }

    .btn {
        width: 100%;
        max-width: 300px;
    }

    .section {
        padding: var(--space-12) 0;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 var(--space-4);
    }

    .section {
        padding: var(--space-8) 0;
    }

    .servicos-grid,
    .portfolio-grid,
    .depoimentos-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* ===== OTIMIZAÇÕES DE PERFORMANCE ===== */

/* Reduzir repaints e reflows */
* {
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
}

/* Otimização para animações */
.animate {
    animation-duration: 0.6s;
    animation-fill-mode: both;
    will-change: transform, opacity;
}

/* Otimização para hover */
@media (hover: hover) {
    .nav-link:hover::after {
        width: 100%;
    }
    
    .btn:hover {
        transform: translateY(-1px);
    }
    
    .servico-card:hover {
        transform: translateY(-4px);
    }
    
    .portfolio-item:hover .portfolio-overlay {
        opacity: 1;
    }
}

/* Otimização para touch */
@media (hover: none) {
    .nav-link:active::after {
        width: 100%;
    }
    
    .btn:active {
        transform: translateY(0);
    }
    
    .servico-card:active {
        transform: translateY(-2px);
    }
}

/* Modo reduzido de movimento */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Foco visível para acessibilidade */
.btn:focus,
.nav-link:focus,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Melhorias para Touch Devices */
@media (hover: none) and (pointer: coarse) {
    .btn:hover,
    .nav-link:hover,
    .portfolio-item:hover,
    .servico-card:hover,
    .depoimento-card:hover {
        transform: none;
    }
    
    .portfolio-overlay {
        opacity: 1;
        background: rgba(37, 99, 235, 0.8);
    }
}


