/* ==========================================================================
   VARIÁVEIS SEMÂNTICAS & RESET
   ========================================================================== */
:root {
    /* Cores Corporativas */
    --primary-color: #1a365d; /* Azul Marinho Profundo */
    --secondary-color: #2c5282; /* Azul Médio */
    --accent-color: #e2e8f0; /* Cinza Claro */
    
    /* Cores de Fundo e Texto */
    --bg-color: #ffffff;
    --bg-light: #f7fafc;
    --text-color: #2d3748;
    --text-muted: #718096;
    
    /* UI Elements */
    --border-color: #e2e8f0;
    --header-height: 80px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    
    /* Tipografia */
    --font-main: 'Roboto', sans-serif;
    --transition-speed: 0.3s;
}

/* Modo Escuro - Ajustado para paleta Petroleum & Mint */
body.dark-mode {
    --primary-color: #0cc771; /* Verde do Logo */
    --secondary-color: #0fb368;
    --bg-color: #08121d; /* Azul Petróleo Profundo */
    --bg-light: #122132;
    --text-color: #e2e8f0;
    --text-muted: #a0aec0;
    --border-color: #1e2e42;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.5);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.3);
}

/* Resets */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html, body {
    overflow-x: hidden;
    scroll-behavior: smooth;
    font-family: var(--font-main);
    color: var(--text-color);
    background-color: var(--bg-color);
    line-height: 1.6;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding-top: var(--header-height);
    transition: background-color var(--transition-speed) ease, color var(--transition-speed) ease;
}

main {
    flex: 1;
}

input, textarea, select {
    font-size: 16px;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--secondary-color);
}

ul {
    list-style: none;
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: 80px 0;
}

.bg-light {
    background-color: var(--bg-light);
}

.text-center {
    text-align: center;
}

.mb-3 { margin-bottom: 1rem; }
.mt-4 { margin-top: 1.5rem; }

/* ==========================================================================
   TIPOGRAFIA & BOTÕES
   ========================================================================== */
h1, h2, h3, h4 {
    margin-bottom: 1rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-color);
}

.section-header {
    margin-bottom: 50px;
}

.section-header h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
}

.section-header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.btn {
    display: inline-block;
    padding: 12px 24px;
    border-radius: 4px;
    font-weight: 500;
    text-align: center;
    cursor: pointer;
    border: none;
    transition: all var(--transition-speed);
}

.btn-primary {
    background-color: var(--primary-color);
    color: #fff !important;
}

.btn-primary:hover {
    background-color: var(--secondary-color);
    color: #fff !important;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    color: #fff !important;
    border: 2px solid #fff;
}

.btn-secondary:hover {
    background-color: #fff;
    color: var(--primary-color) !important;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9rem;
}

/* ==========================================================================
   HEADER & NAVEGAÇÃO
   ========================================================================== */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    background-color: var(--bg-color);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: background-color var(--transition-speed);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 100%;
}

.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--primary-color);
    display: flex;
    flex-direction: column;
    line-height: 1;
}

.logo img {
    max-height: 45px;
    width: auto;
    display: block;
}

.logo-subtitle {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-top: 4px;
}

.main-nav {
    display: flex;
    align-items: center;
}

.main-nav ul {
    display: flex;
    gap: 30px;
}

.main-nav a {
    color: var(--text-color);
    font-weight: 500;
    position: relative;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--primary-color);
    transition: width var(--transition-speed);
}

.main-nav a:hover::after,
.main-nav a.active::after {
    width: 100%;
}

#theme-toggle {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--text-color);
    cursor: pointer;
    margin-left: 30px;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-color);
    cursor: pointer;
}

/* ==========================================================================
   HERO SECTION
   ========================================================================== */
.hero-section {
    height: calc(100vh - var(--header-height));
    min-height: 400px;
    position: relative;
    min-width: 0;
}

.hero-swiper {
    width: 100%;
    height: 100%;
}

.hero-slide {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: #fff;
}

.hero-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    background: rgba(0, 0, 0, 0.6);
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
}

/* Correção de legibilidade: Texto sempre claro no banner */
.hero-content h1 {
    font-size: 3rem;
    color: #fff !important;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.2rem;
    color: #fff !important;
    margin-bottom: 30px;
}

/* ==========================================================================
   CLIENTES (GRID DE LOGOS)
   ========================================================================== */
.clients-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 30px;
    align-items: center;
    justify-items: center;
}

.clients-grid img {
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all var(--transition-speed) ease;
}

.clients-grid img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

body.dark-mode .clients-grid img {
    filter: grayscale(100%) brightness(1.5);
}
body.dark-mode .clients-grid img:hover {
    filter: grayscale(0%) brightness(1.2);
}

/* ==========================================================================
   SERVIÇOS (TABS INTERATIVAS & ACORDEÃO)
   ========================================================================== */
.tabs-container {
    background-color: var(--bg-light);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

.tabs-nav {
    display: flex;
    background-color: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    flex: 1;
    padding: 20px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-color);
    cursor: pointer;
    transition: all var(--transition-speed);
}

.tab-btn:hover {
    background-color: var(--bg-light);
}

.tab-btn.active {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
    background-color: var(--bg-light);
}

.tabs-content {
    padding: 40px;
}

.tab-pane {
    display: none;
    animation: fadeIn 0.5s ease;
}

.tab-pane.active {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.sticky-img {
    position: sticky;
    top: calc(var(--header-height) + 40px);
    border-radius: 8px;
    box-shadow: var(--shadow-sm);
}

.tab-text h3 {
    color: var(--primary-color);
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.tab-intro {
    font-size: 1.05rem;
    color: var(--text-color);
    margin-bottom: 25px;
    line-height: 1.6;
}

.accordion-group details {
    background-color: var(--bg-color);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    margin-bottom: 12px;
    transition: all 0.3s ease;
}

.accordion-group details summary::-webkit-details-marker {
    display: none;
}

.accordion-group summary {
    padding: 16px 20px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    list-style: none;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--primary-color);
    background-color: var(--bg-light);
    border-radius: 6px;
    transition: background-color var(--transition-speed);
}

.accordion-group summary i {
    color: var(--secondary-color);
    font-size: 1.2rem;
}

.accordion-group summary:hover {
    background-color: #e2e8f0;
}

.accordion-group details[open] summary {
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--primary-color);
    color: #fff;
}

.accordion-group details[open] summary i {
    color: #fff;
}

.details-content {
    padding: 20px;
    font-size: 0.95rem;
    color: var(--text-muted);
    line-height: 1.7;
    animation: fadeDown 0.3s ease-in-out;
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ==========================================================================
   POR QUE CERTIFICAR
   ========================================================================== */
.certificar-text {
    max-width: 800px;
    margin: 0 auto 50px;
    text-align: center;
    font-size: 1.15rem;
    color: var(--text-color);
}

.certificar-text p {
    margin-bottom: 20px;
}

.certificar-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
}

.cert-card {
    background: var(--bg-color);
    padding: 40px 30px;
    border-radius: 8px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: transform var(--transition-speed);
    border-top: 4px solid var(--primary-color);
}

.cert-card:hover {
    transform: translateY(-8px);
}

.cert-card i {
    font-size: 3rem;
    color: var(--primary-color);
    margin-bottom: 20px;
}

.cert-card h4 {
    margin-bottom: 15px;
    color: var(--primary-color);
    font-size: 1.3rem;
}

.cert-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* ==========================================================================
   CONTATO & FOOTER
   ========================================================================== */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 20px;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-top: 5px;
}

.map-link {
    display: inline-block;
    margin-top: 8px;
    font-size: 0.9rem;
    color: var(--secondary-color);
    font-weight: 500;
}

.map-link i {
    font-size: 0.9rem !important;
    margin-top: 0 !important;
    margin-right: 4px;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-color);
    color: var(--text-color);
}

.main-footer {
    background-color: #1a202c;
    color: #e2e8f0;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: #a0aec0;
}

.footer-col ul li a:hover {
    color: #fff;
}

.footer-bottom {
    border-top: 1px solid #4a5568;
    padding-top: 20px;
    color: #a0aec0;
    font-size: 0.9rem;
}

/* ==========================================================================
   UTILITIES (BOTÕES FLUTUANTES, BANNER)
   ========================================================================== */
.whatsapp-float {
    position: fixed;
    left: 20px;
    bottom: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: #25d366;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    z-index: 999;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    transition: transform var(--transition-speed);
}

.whatsapp-float:hover {
    transform: scale(1.1);
    color: #fff;
}

.back-to-top {
    position: fixed;
    right: 20px;
    bottom: 20px;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    z-index: 999;
    box-shadow: 0 4px 6px rgba(0,0,0,0.2);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s, transform var(--transition-speed);
}

.back-to-top.visible {
    opacity: 1;
    pointer-events: auto;
}

.back-to-top:hover {
    transform: translateY(-5px);
    color: #fff;
}

/* ==========================================================================
   RESPONSIVIDADE (MOBILE)
   ========================================================================== */
@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .main-nav {
        position: fixed;
        top: var(--header-height);
        left: -100%;
        width: 100%;
        height: calc(100vh - var(--header-height));
        background-color: var(--bg-color);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 40px;
        transition: left var(--transition-speed) ease;
        overflow-y: auto;
    }

    .main-nav.active {
        left: 0;
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .main-nav ul li {
        width: 100%;
        text-align: center;
    }

    .main-nav ul li a {
        display: block;
        padding: 15px;
        font-size: 1.2rem;
    }

    #theme-toggle {
        margin: 20px 0 0 0;
    }

    .hero-content h1 {
        font-size: 2rem;
    }

    .tabs-nav {
        flex-direction: column;
    }
    
    .tab-btn {
        border-bottom: none;
        border-left: 3px solid transparent;
        text-align: left;
    }

    .tab-btn.active {
        border-left-color: var(--primary-color);
    }

    .tab-pane.active {
        grid-template-columns: 1fr;
    }

    .sticky-img {
        position: static;
        margin-bottom: 20px;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }
}

/* ==========================================================================
   FIXO: CABEÇALHO SEMPRE CLARO (Mesmo em Dark Mode)
   ========================================================================== */
.main-header {
    background-color: #ffffff !important;
    color: #0f3050 !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
}

.main-header .main-nav a {
    color: #0f3050 !important;
}

.main-header #theme-toggle {
    color: #0f3050 !important;
}

.main-header .main-nav a:hover {
    color: #0cc771 !important;
}
/* ==========================================================================
   FIX DE USABILIDADE: Previne o Auto-Zoom no iOS ao focar no formulário
   ========================================================================== */
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    font-size: 16px !important; /* Trava o zoom da Apple */
    -webkit-appearance: none; /* Remove o estilo padrão engessado do iOS */
}

/* ==========================================================================
   FIX DE ACESSIBILIDADE: Cor do Menu Mobile no Dark Mode
   ========================================================================== */
@media (max-width: 768px) {
    body.dark-mode .main-header .main-nav a {
        color: #ffffff !important; /* Deixa o texto branco para dar leitura */
    }
    
    body.dark-mode .main-header .main-nav a:hover,
    body.dark-mode .main-header .main-nav a:focus {
        color: var(--primary-color) !important; /* Fica verde ao tocar/focar */
    }
    
    /* Opcional: pinta o ícone de fechar (X) ou o toggle também de verde/branco */
    body.dark-mode .mobile-toggle {
        color: var(--primary-color) !important;
    }
}
