/**
 * Royal Aviation - Main Stylesheet
 * Updated Layout & Mobile Fixes
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
    /* Cores Padrão (Fallback caso o PHP falhe) */
    --primary-color: #1a3a5c;
    --secondary-color: #2c5f8d;
    --accent-color: #f39c12;
    --text-color: #333;
    --text-light: #666;
    --bg-light: #f5f5f5;
    --white: #ffffff;
    --border-color: #ddd;
    --royal-blue: #22459d; /* Nova cor do Menu */
    
    --font-primary: 'Roboto', sans-serif;
    --font-secondary: 'Open Sans', sans-serif;
    --transition: all 0.3s ease;
}

/* ============================================
   Reset & Base Styles
   ============================================ */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: var(--font-primary);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--white);
    overflow-x: hidden; /* Evita rolagem lateral */
}

img { max-width: 100%; height: auto; display: block; }
a { text-decoration: none; color: inherit; transition: var(--transition); }
ul { list-style: none; }

/* ============================================
   Header & Top Bar
   ============================================ */
.site-header {
    position: sticky; top: 0; z-index: 1000;
    background: var(--white);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.top-bar {
    background: var(--royal-blue); /* Azul Royal */
    color: var(--white);
    padding: 8px 0;
    font-size: 14px;
}

.top-bar .container {
    display: flex; justify-content: space-between; align-items: center;
}

/* Contatos */
.contact-info { display: flex; align-items: center; gap: 20px; }
.contact-info i { margin-right: 5px; opacity: 0.8; }
.contact-info a { color: white; }

/* Bandeiras */
.language-switcher { display: flex; gap: 10px; align-items: center; }
.lang-link { opacity: 0.8; transition: var(--transition); display: flex; }
.lang-link:hover, .lang-link.active { opacity: 1; transform: scale(1.1); }
.lang-flag { width: 22px; border-radius: 2px; box-shadow: 0 1px 3px rgba(0,0,0,0.2); }

/* ============================================
   Main Menu (Desktop)
   ============================================ */
.main-header { padding: 10px 0; background: var(--white); }

.header-content {
    display: flex; justify-content: space-between; align-items: center;
}

.logo img { height: 60px; transition: 0.3s; z-index: 1002; position: relative; }

.main-nav ul { display: flex; gap: 30px; }

.main-nav a {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.95rem;
    color: var(--royal-blue); /* Cor Azul */
    padding-bottom: 5px;
    position: relative;
}

/* Efeito Sublinhado no Hover */
.main-nav a::after {
    content: ''; position: absolute; width: 0; height: 2px; bottom: 0; left: 0;
    background-color: var(--accent-color); transition: var(--transition);
}
.main-nav a:hover { color: var(--accent-color); }
.main-nav a:hover::after { width: 100%; }

/* Botão Mobile (Hambúrguer) */
.mobile-menu-toggle {
    display: none; /* Escondido no Desktop */
    background: none; border: none; font-size: 1.8rem; 
    cursor: pointer; color: var(--royal-blue);
    z-index: 10001; position: relative;
}

/* ============================================
   RESPONSIVO / MOBILE (CORREÇÃO DO MENU INVISÍVEL)
   ============================================ */
@media (max-width: 991px) {
    /* Mostra o botão hambúrguer */
    .mobile-menu-toggle { display: block; }

    /* Ajuste da Barra Topo */
    .top-bar { padding: 10px 0; }
    
    .contact-info { 
        flex-direction: column; 
        align-items: flex-start; 
        gap: 5px; 
    }
    .contact-info span { margin: 0; font-size: 0.8rem; }

    .language-switcher { 
        flex-direction: column; 
        gap: 8px; 
    }

    /* O MENU DE GAVETA BLINDADO */
    .main-nav {
        /* Estado Fechado */
        display: none !important; 
        position: fixed;
        top: 0; 
        left: 0; 
        width: 100%; 
        height: 100vh; /* Tela Cheia */
        background-color: #ffffff !important; /* FUNDO BRANCO OBRIGATÓRIO */
        z-index: 10000;
        
        /* Garante visibilidade */
        opacity: 1 !important;
        visibility: visible !important;
        
        /* Alinhamento */
        flex-direction: column;
        align-items: center;
        justify-content: flex-start; /* Começa do topo */
        overflow-y: auto;
        padding-top: 80px; /* Espaço para não ficar em cima do logo */
    }

    /* Estado Aberto (Adicionado pelo JS) */
    .main-nav.active { 
        display: flex !important; 
    }

    /* Lista de Links */
    .main-nav ul {
        display: flex;
        flex-direction: column;
        text-align: center;
        gap: 0; 
        width: 100%;
        background-color: #ffffff !important; /* Garante fundo na lista */
    }

    .main-nav li { 
        width: 100%; 
        border-bottom: 1px solid #f0f0f0; 
    }
    
    .main-nav a {
        display: block;
        padding: 20px;
        font-size: 1.2rem;
        color: #22459d !important; /* Força cor Azul para ver o texto */
    }
    
    .main-nav a:hover {
        background-color: #f5f5f5;
        color: #f39c12 !important;
    }

    /* Remove efeitos de desktop */
    .main-nav a::after { display: none; }
}

/* ============================================
   Container Geral
   ============================================ */
.container {
    max-width: 1200px; margin: 0 auto; padding: 0 20px;
}

/* ============================================
   Hero Slider
   ============================================ */
.hero-slider { position: relative; height: 600px; overflow: hidden; }
.slide {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover; background-position: center;
    opacity: 0; transition: opacity 1s ease;
}
.slide.active { opacity: 1; }
.slide-overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(26, 58, 92, 0.5); /* Overlay mais suave */
}
.slide-content {
    position: relative; height: 100%; display: flex;
    align-items: center; justify-content: center; text-align: center;
    color: var(--white); z-index: 1;
}
.slide-title { font-size: 48px; font-weight: 700; margin-bottom: 20px; text-transform: uppercase; }
.slide-subtitle { font-size: 24px; margin-bottom: 30px; }

/* Setas do Slider */
.slider-prev, .slider-next {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.2); border: none; color: white;
    font-size: 24px; padding: 15px; cursor: pointer; transition: var(--transition); z-index: 2;
}
.slider-prev:hover, .slider-next:hover { background: rgba(255,255,255,0.4); }
.slider-prev { left: 20px; }
.slider-next { right: 20px; }

/* ============================================
   Buttons
   ============================================ */
.btn {
    display: inline-block; padding: 12px 30px; border-radius: 4px;
    font-weight: 600; text-align: center; cursor: pointer;
    transition: var(--transition); border: none; text-decoration: none;
}
.btn-primary {
    background: var(--accent-color); color: var(--white);
}
.btn-primary:hover {
    background: #e67e22; /* Fallback */
    background: var(--btn-hover, #e67e22); /* Usa variável se existir */
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

/* ============================================
   Seções Gerais
   ============================================ */
.quote-section { padding: 60px 0; background: var(--bg-light); text-align: center; }
.quote-section h2 { color: var(--primary-color); margin-bottom: 15px; }
.quote-text { font-size: 22px; font-style: italic; color: var(--text-light); }

.company-section, .services-section, .parts-section { padding: 80px 0; }
.section-header { text-align: center; margin-bottom: 50px; }
.section-header h2 { font-size: 36px; color: var(--primary-color); text-transform: uppercase; }

/* Company Layout */
.company-content { display: grid; grid-template-columns: 2fr 1fr; gap: 40px; }
.company-sidebar .quick-nav { background: var(--bg-light); padding: 20px; border-radius: 5px; }
.quick-nav ul { display: flex; flex-direction: column; gap: 10px; }
.quick-nav a { padding: 10px; background: white; display: block; border-radius: 3px; }
.quick-nav a:hover { background: var(--primary-color); color: white; }

/* Banners Divisores */
.banner-divider {
    height: 300px; background-size: cover; background-attachment: fixed;
    display: flex; align-items: center; justify-content: center; position: relative;
}
.services-banner { background-image: url('/public/images/services-banner.jpg'); }
.parts-banner { background-image: url('/public/images/parts-banner.jpg'); }
.banner-overlay { position: absolute; top:0; left:0; width:100%; height:100%; background: rgba(26,58,92,0.7); }
.banner-divider h2 { position: relative; z-index: 1; color: white; font-size: 40px; text-transform: uppercase; }

/* Parts Grid */
.parts-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.part-card { background: white; border-radius: 5px; overflow: hidden; box-shadow: 0 2px 10px rgba(0,0,0,0.1); transition: var(--transition); }
.part-card:hover { transform: translateY(-5px); box-shadow: 0 10px 20px rgba(0,0,0,0.15); }
.part-image { height: 200px; overflow: hidden; }
.part-image img { width: 100%; height: 100%; object-fit: cover; }
.part-content { padding: 20px; }
.part-content h3 { color: var(--primary-color); margin-bottom: 10px; }

/* Forms */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 12px; border: 1px solid var(--border-color); border-radius: 4px;
}

/* Footer */
.site-footer { background: var(--primary-color); color: white; padding: 60px 0 20px; }
.footer-content { display: grid; grid-template-columns: repeat(4, 1fr); gap: 40px; }
.footer-bottom { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid rgba(255,255,255,0.1); font-size: 0.9rem; }

/* WhatsApp */
.whatsapp-float {
    position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px;
    background: #25d366; border-radius: 50%; display: flex; align-items: center; justify-content: center;
    color: white; font-size: 32px; box-shadow: 0 4px 10px rgba(0,0,0,0.3); z-index: 999;
}
.whatsapp-float.pulse { animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.7); } 70% { box-shadow: 0 0 0 15px rgba(37, 211, 102, 0); } 100% { box-shadow: 0 0 0 0 rgba(37, 211, 102, 0); } }

/* ============================================
   RESPONSIVO GERAL
   ============================================ */
@media (max-width: 992px) {
    .parts-grid { grid-template-columns: repeat(2, 1fr); }
    .company-content { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .parts-grid, .form-row, .footer-content { grid-template-columns: 1fr; }
    .slide-title { font-size: 32px; }
}

/* ============================================
   MELHORIAS VISUAIS (ISO & TEXTO)
   ============================================ */

/* Fundo suave para a seção */
.company-section {
    background-color: #fff;
    padding: 100px 0;
    position: relative;
}

/* Título com linha decorativa */
.title-with-line {
    position: relative;
    display: inline-block;
    padding-bottom: 15px;
    margin-bottom: 10px;
    color: var(--primary-color);
    font-weight: 800;
    font-size: 2.5rem;
}
.title-with-line::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 80px;
    height: 4px;
    background: var(--accent-color);
    border-radius: 2px;
}
.section-subtitle {
    color: #888;
    font-size: 1.1rem;
    margin-bottom: 50px;
}

/* Melhoria na Leitura do Texto */
.text-highlight {
    font-size: 1.1rem;
    line-height: 1.9;
    color: #444;
    text-align: justify;
    padding-left: 20px;
    border-left: 4px solid #eee; /* Linha sutil na esquerda */
}

/* Estatísticas rápidas (Anos, Global) */
.stats-row {
    display: flex;
    gap: 40px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
}
.stat-item {
    display: flex;
    flex-direction: column;
}
.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    line-height: 1;
}
.stat-label {
    font-size: 0.9rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 5px;
}

/* --- O CARD ISO PREMIUM (Destaque Dourado) --- */
.iso-premium-card {
    background: linear-gradient(135deg, #ffffff 0%, #f9f9f9 100%);
    border: 1px solid #e0e0e0;
    border-top: 5px solid #d4af37; /* Dourado */
    padding: 30px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.iso-premium-card:hover {
    transform: translateY(-5px);
}

.iso-icon-wrapper {
    font-size: 3rem;
    color: #d4af37; /* Cor Ouro */
    margin-bottom: 15px;
    text-shadow: 0 2px 5px rgba(212, 175, 55, 0.3);
}

.iso-content h3 {
    color: var(--primary-color);
    font-weight: 800;
    margin-bottom: 10px;
}

.iso-line {
    width: 40px;
    height: 2px;
    background: #d4af37;
    margin: 10px auto;
}

.iso-content p {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 20px;
}

.iso-badge-text {
    background: #d4af37;
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Menu Rápido Lateral */
.quick-nav-modern {
    margin-top: 30px;
    background: #f4f6f9;
    padding: 25px;
    border-radius: 8px;
}
.quick-nav-modern h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
}
.quick-nav-modern ul {
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.quick-nav-modern a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #555;
    font-weight: 500;
    transition: 0.2s;
}
.quick-nav-modern a i { color: var(--accent-color); font-size: 0.8rem; }
.quick-nav-modern a:hover { color: var(--primary-color); transform: translateX(5px); }

/* Responsivo */
@media (max-width: 991px) {
    .company-content { grid-template-columns: 1fr; }
    .title-with-line { font-size: 2rem; }
}
/* ============================================
   AJUSTES INSTITUCIONAIS - ROYAL AVIATION
   ============================================ */

/* [18] Subtítulo em Negrito */
.section-subtitle {
    color: #444;
    font-size: 1.1rem;
    font-weight: 700 !important; /* Negrito solicitado */
    margin-bottom: 50px;
}

/* [23, 675f22] Alinhamento à Esquerda e Espaçamento entre Trechos */
.company-description {
    text-align: left !important; /* Força alinhamento à esquerda */
    padding-left: 0;
    margin-left: 0;
}

/* Espaçamento para gerar os 3 parágrafos finais */
.company-description p {
    margin-bottom: 25px !important;
    line-height: 1.9;
    color: #444;
}

/* [22] Negrito para palavras em Caixa Alta (Ex: CONFIANÇA) */
.company-description strong, 
.company-description b {
    font-weight: 800;
    color: var(--primary-color);
}

/* [24] Ajuste dos Quadros de Certificação Laterais */
.iso-card-mini {
    background: #fff;
    border: 1px solid #eee;
    border-top: 4px solid #d4af37;
    padding: 20px;
    text-align: center;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    transition: transform 0.3s ease;
}

.iso-card-mini:hover {
    transform: translateY(-5px);
}

/* [66] Ajuste do 20+ Anos (Sem ícone) */
.stat-item-new span:first-child {
    font-size: 2.2rem;
    font-weight: 800;
    color: var(--primary-color);
    display: block;
    line-height: 1;
}

/* Grade de Peças - Melhora no Layout */
.parts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.part-card {
    background: white;
    border-radius: 8px;
    border: 1px solid #eee;
    transition: all 0.3s ease;
    overflow: hidden;
}

.part-card:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}