/* CSS Crítico - Above the Fold - Zurcad Transportes */
/* Otimizado para carregamento rápido da primeira visualização */

/* ===========================================
   RESET E BASE
   =========================================== */
* {
    box-sizing: border-box;
}

html {
    font-size: 16px;
    line-height: 1.6;
}

body {
    font-family: "Montserrat", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background: #fff;
    overflow-x: hidden;
}

/* ===========================================
   HEADER CRÍTICO
   =========================================== */
.header-area {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-100%);
}

.header-area.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.header-area.home-page {
    background: transparent;
}

.main-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0;
    max-width: 1200px;
    margin: 0 auto;
    padding-left: 15px;
    padding-right: 15px;
}

.logo {
    display: block;
    width: 200px;
    height: 60px;
    background: url('../img/logo-zurcad.png') no-repeat center;
    background-size: contain;
    text-indent: -9999px;
    overflow: hidden;
}

.nav {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 30px;
}

.nav a {
    color: #324673;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav a:hover {
    color: #2a3d5f;
}

/* ===========================================
   BANNER CRÍTICO
   =========================================== */
.banner-area {
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #324673 0%, #2a3d5f 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.banner-area::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('../img/img-comp-zurcad.png') no-repeat center right;
    background-size: contain;
    opacity: 0.1;
    z-index: 1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
    position: relative;
    z-index: 2;
}

.header-text {
    max-width: 600px;
}

.header-text h1 {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 20px;
    line-height: 1.2;
}

.header-text h2 {
    font-size: 1.5rem;
    font-weight: 400;
    margin-bottom: 30px;
    opacity: 0.9;
}

/* ===========================================
   BOTÕES CRÍTICOS
   =========================================== */
.btn-primary {
    background: #ff6b35;
    color: white;
    padding: 15px 30px;
    border: none;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary:hover {
    background: #e55a2b;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 53, 0.4);
}

.btn-secondary {
    background: transparent;
    color: white;
    border: 2px solid white;
    padding: 13px 28px;
    border-radius: 5px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    margin-left: 15px;
}

.btn-secondary:hover {
    background: white;
    color: #324673;
}

/* ===========================================
   FORMULÁRIO CRÍTICO
   =========================================== */
.form-container {
    background: white;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    margin-top: 30px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #324673;
}

/* ===========================================
   RESPONSIVIDADE CRÍTICA
   =========================================== */
@media (max-width: 768px) {
    .header-text h1 {
        font-size: 2rem;
    }
    
    .header-text h2 {
        font-size: 1.2rem;
    }
    
    .nav {
        display: none;
    }
    
    .btn-secondary {
        margin-left: 0;
        margin-top: 10px;
        display: block;
    }
    
    .form-container {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .header-text h1 {
        font-size: 1.8rem;
    }
    
    .btn-primary,
    .btn-secondary {
        width: 100%;
        text-align: center;
    }
}

/* ===========================================
   ANIMAÇÕES CRÍTICAS
   =========================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.header-text {
    animation: fadeInUp 0.8s ease-out;
}

/* ===========================================
   LOADING STATES
   =========================================== */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #324673;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* ===========================================
   UTILITÁRIOS CRÍTICOS
   =========================================== */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }

.mb-20 { margin-bottom: 20px; }
.mb-30 { margin-bottom: 30px; }
.mb-40 { margin-bottom: 40px; }

.mt-20 { margin-top: 20px; }
.mt-30 { margin-top: 30px; }
.mt-40 { margin-top: 40px; }

.d-none { display: none; }
.d-block { display: block; }
.d-flex { display: flex; }

.w-100 { width: 100%; }
.h-100 { height: 100%; }

/* ===========================================
   PERFORMANCE CRÍTICA
   =========================================== */
/* Evitar reflow/repaint desnecessários */
.header-area,
.banner-area,
.container {
    will-change: transform;
}

/* Otimizar fontes */
@font-face {
    font-family: 'Montserrat';
    font-display: swap;
    src: url('https://fonts.gstatic.com/s/montserrat/v25/JTUHjIg1_i6t8kCHKm4532VJOt5-QNFgpCtr6Hw5aXpsog.woff2') format('woff2');
    font-weight: 400;
    font-style: normal;
}

/* Preload de recursos críticos */
.preload-critical {
    position: absolute;
    top: -9999px;
    left: -9999px;
    visibility: hidden;
}

