/* =====================================================
   MAIN.CSS - ABRITEC
   CSS Principal para layout e componentes base
   ===================================================== */

/* =====================================================
   RESET E CONFIGURAÇÕES BASE
   ===================================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    /* Cores Principais */
    --primary-color: #1e40af;
    --primary-light: #3b82f6;
    --secondary-color: #0ea5e9;
    --accent-color: #f59e0b;
    --success-color: #10b981;
    
    /* Cores de Texto */
    --text-dark: #1f2937;
    --text-medium: #64748b;
    --text-light: #9ca3af;
    
    /* Cores de Fundo */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --border-color: #e2e8f0;
    
    /* Sombras */
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Transições */
    --transition: all 0.3s ease;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
    line-height: 1.6;
    color: var(--text-dark);
    background: var(--bg-primary);
    font-size: 16px;
    overflow-x: hidden;
}

/* =====================================================
   HEADER E NAVEGAÇÃO
   ===================================================== */

.header {
    background: var(--bg-primary);
    box-shadow: var(--shadow);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 70px;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

.logo:hover {
    color: var(--primary-light);
}

.nav-menu {
    display: flex;
    justify-content: flex-end;
    list-style: none;
    gap: 2rem;
}

.nav-menu a {
    text-decoration: none;
    color: var(--text-dark);
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

.nav-menu a:hover::after {
    width: 100%;
}

/* =====================================================
   HERO SECTION
   ===================================================== */

.hero {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grid" width="10" height="10" patternUnits="userSpaceOnUse"><path d="M 10 0 L 0 0 0 10" fill="none" stroke="rgba(255,255,255,0.1)" stroke-width="0.5"/></pattern></defs><rect width="100" height="100" fill="url(%23grid)"/></svg>');
    opacity: 0.3;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    position: relative;
    z-index: 2;
}

.hero-content {
    max-width: 600px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.8s ease;
}

.hero p {
    font-size: 1.2rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.9;
    animation: fadeInUp 0.8s ease 0.2s both;
}

.cta-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent-color);
    color: white;
    text-decoration: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition);
    box-shadow: var(--shadow-lg);
    animation: fadeInUp 0.8s ease 0.4s both;
}

.cta-button:hover {
    background: #d97706;
    transform: translateY(-2px);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

/* =====================================================
   SEÇÕES GERAIS
   ===================================================== */

.section {
    padding: 5rem 0;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.section-title {
    text-align: center;
    margin-bottom: 3rem;
}

.section-title h2 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.section-title p {
    font-size: 1.1rem;
    color: var(--text-medium);
    max-width: 600px;
    margin: 0 auto;
}

/* =====================================================
   GRID DE SERVIÇOS
   ===================================================== */

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: white;
    font-size: 1.5rem;
}

.service-card h3 {
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.service-card p {
    color: var(--text-medium);
    line-height: 1.6;
}

/* =====================================================
   FOOTER
   ===================================================== */

.footer {
    background: var(--text-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer h3 {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--accent-color);
}

.footer p, 
.footer a {
    color: #d1d5db;
    text-decoration: none;
    line-height: 1.6;
}

.footer a:hover {
    color: white;
    transition: var(--transition);
}

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid #374151;
    color: var(--text-light);
}

/* =====================================================
   ANIMAÇÕES
   ===================================================== */

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease forwards;
}

/* =====================================================
   UTILITÁRIOS
   ===================================================== */

.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.p-1 { padding: 0.5rem; }
.p-2 { padding: 1rem; }
.p-3 { padding: 1.5rem; }
.p-4 { padding: 2rem; }

/* =====================================================
   RESPONSIVIDADE
   ===================================================== */

/* Tablets */
@media (max-width: 1024px) {
    .hero h1 {
        font-size: 3rem;
    }
    
    .section-title h2 {
        font-size: 2.2rem;
    }
    
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
        gap: 1.5rem;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .nav-menu {
        display: none;
    }
    
    .hero {
        padding: 2rem 0;
        min-height: 90vh;
    }
    
    .hero h1 {
        font-size: 2.5rem;
        margin-bottom: 1rem;
    }
    
    .hero p {
        font-size: 1.1rem;
        margin-bottom: 1.5rem;
    }
    
    .section {
        padding: 3rem 0;
    }
    
    .section-title h2 {
        font-size: 2rem;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .service-card {
        padding: 1.5rem;
    }
    
    .footer-content {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* Mobile pequeno */
@media (max-width: 480px) {
    .nav-container {
        padding: 0 0.5rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .container {
        padding: 0 0.5rem;
    }
    
    .cta-button {
        padding: 0.8rem 1.5rem;
        font-size: 1rem;
    }
    
    .service-icon {
        width: 50px;
        height: 50px;
        font-size: 1.2rem;
    }
}

/* =====================================================
   ESTADOS ESPECIAIS
   ===================================================== */

/* Header transparente no scroll */
.header.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
}

/* Elementos com animação de entrada */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.animate-on-scroll.animated {
    opacity: 1;
    transform: translateY(0);
}

/* Estados de foco melhorados */
a:focus,
button:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* =====================================================
   PRINT STYLES
   ===================================================== */

@media print {
    .header,
    .footer {
        display: none;
    }
    
    .hero {
        background: none !important;
        color: black !important;
        min-height: auto;
        padding: 2rem 0;
    }
    
    .service-card {
        box-shadow: none;
        border: 1px solid #ccc;
        page-break-inside: avoid;
    }
}

/* =====================================================
   ACESSIBILIDADE
   ===================================================== */

/* Alto contraste */
@media (prefers-contrast: high) {
    :root {
        --shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.3);
        --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3);
    }
}

/* Movimento reduzido */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
}

/* =====================================================
   DARK MODE (preparado para futuro)
   ===================================================== */

@media (prefers-color-scheme: dark) {
    /* Implementar dark mode aqui se necessário */
}


/* Logo da AbriTec */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.05);
}

.logo-img {
    height: 45px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

/* Responsivo */
@media (max-width: 768px) {
    .logo-img {
        height: 35px;
        max-width: 150px;
    }
}

/* Remover outline laranja dos links */
.nav-menu a:focus,
.logo:focus {
    outline: none;
    box-shadow: none;
}

/* Globalmente para todos os links */
a:focus {
    outline: none;
}

/* =====================================================
   FIM DO MAIN.CSS
   ===================================================== */