/* Estilos otimizados para Napoleon Host - Mobile First e Core Web Vitals */

/* Estilos críticos para renderização inicial */
:root {
    --primary-color: #1d4ed8;
    --secondary-color: #fcd34d;
    --text-color: #1f2937;
    --background-color: #f9fafb;
    --border-color: #e5e7eb;
}

/* Estilos base com content-visibility para melhorar LCP */
html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    line-height: 1.5;
    color: var(--text-color);
    margin: 0;
    padding: 0;
    visibility: hidden; /* Será definido como visible via JavaScript para evitar FOUC */
    overflow-x: hidden;
}

/* Otimizações para Core Web Vitals */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Evitar Layout Shifts */
.image-container {
    position: relative;
    height: 0;
    overflow: hidden;
}

.image-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Indicador de carregamento */
#loading-indicator {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ffffff;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.spinner {
    width: 48px;
    height: 48px;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Otimizações para tabelas responsivas */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-bottom: 1rem;
}

table {
    width: 100%;
    border-collapse: collapse;
    border-spacing: 0;
}

th, td {
    border: 1px solid #e5e7eb;
    padding: 0.75rem;
    text-align: left;
}

th {
    background-color: #f3f4f6;
    font-weight: 600;
}

/* FAQ Estilos */
.faq-question {
    cursor: pointer;
    padding: 1rem;
    background-color: #f9fafb;
    border-radius: 0.5rem;
    margin-bottom: 0.5rem;
    font-weight: 500;
    transition: background-color 0.2s ease;
}

.faq-question:hover {
    background-color: #f3f4f6;
}

.faq-answer {
    display: none;
    padding: 1rem 1rem 1rem 1.5rem;
    border-left: 2px solid #3b82f6;
    margin-left: 0.5rem;
    margin-bottom: 1.5rem;
}

/* Estilos específicos para mobile */
@media (max-width: 768px) {
    .container {
        width: 100%;
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    h1 {
        font-size: 1.875rem;
        line-height: 2.25rem;
    }
    
    h2 {
        font-size: 1.5rem;
        line-height: 2rem;
    }
    
    .py-20 {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
    
    .py-16 {
        padding-top: 2.5rem;
        padding-bottom: 2.5rem;
    }
    
    .py-12 {
        padding-top: 2rem;
        padding-bottom: 2rem;
    }
    
    /* Melhorar espaçamento em dispositivos móveis */
    .mb-10 {
        margin-bottom: 1.5rem;
    }
    
    .mb-12 {
        margin-bottom: 2rem;
    }
    
    /* Ajustes para cards em mobile */
    .grid {
        gap: 1rem;
    }
}

/* Animações otimizadas */
@media (prefers-reduced-motion: no-preference) {
    .transition-transform {
        transition-property: transform;
        transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
        transition-duration: 300ms;
    }
    
    .hover\:scale-105:hover {
        transform: scale(1.05);
    }
}

/* Otimizações para acessibilidade */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Melhorias para contraste e legibilidade */
.text-gray-600 {
    color: #4b5563;
}

.text-blue-700 {
    color: #1d4ed8;
}

.bg-blue-700 {
    background-color: #1d4ed8;
}

.text-white {
    color: #ffffff;
}

/* Otimizações para botões */
.btn {
    display: inline-block;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    line-height: 1.5;
    border-radius: 0.375rem;
    transition: color 0.15s ease-in-out, background-color 0.15s ease-in-out, border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.btn:focus {
    outline: 0;
    box-shadow: 0 0 0 0.2rem rgba(59, 130, 246, 0.25);
}

.btn-primary {
    color: #ffffff;
    background-color: #3b82f6;
    border-color: #3b82f6;
}

.btn-primary:hover {
    background-color: #2563eb;
    border-color: #2563eb;
}

.btn-secondary {
    color: #1d4ed8;
    background-color: #fcd34d;
    border-color: #fcd34d;
}

.btn-secondary:hover {
    background-color: #fbbf24;
    border-color: #fbbf24;
}
