/* ======================================================
    1. RESET, FONTES E BASE
====================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #fff;
    padding-top: 105px;
}

a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

a:focus,
.btn:focus {
    outline: 2px solid #004D66;
    outline-offset: 3px;
}

/* ======================================================
    2. LAYOUT GERAL E UTILITÁRIOS
====================================================== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padding {
    padding: clamp(60px, 10vw, 120px) 0;
}

.section-dark {
    background-color: #f4f4f4;
}

h1 {
    font-size: 3em;
    font-weight: 700;
}

h2 {
    font-size: 2em;
    font-weight: 600;
    margin-bottom: 20px;
}

p {
    margin-bottom: 15px;
}

.texto-justificado {
    text-align: justify;
}

/* ======================================================
    3. BOTÕES
====================================================== */
.btn {
    display: inline-block;
    padding: 15px 30px;
    font-weight: 700;
    text-transform: uppercase;
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.btn-primary {
    background-color: #004D66;
    color: #fff;
    border: none;
}

.btn-primary:hover {
    background-color: #003344;
}

.btn-secondary {
    background-color: transparent;
    color: #004D66;
    border: 2px solid #004D66;
}

.btn-secondary:hover {
    background-color: #004D66;
    color: #fff;
}

.btn-success {
    background-color: #28a745;
    color: #fff;
    border: 2px solid #28a745;
}

.btn-success:hover {
    background-color: #1e7e34;
    border-color: #1e7e34;
}

/* ======================================================
    4. HEADER & NAV
====================================================== */
.main-header {
    background: #004D66;
    border-bottom: 1px solid #004D66;
    padding: 15px 0;
    position: fixed; /* Fixa o elemento na tela */
    top: 0;          /* Cola no topo */
    left: 0;         /* Cola na esquerda */
    width: 100%;     /* Garante que ocupe a largura total */
    box-shadow: 0 2px 10px rgba(0,0,0,0.2); /* Sombra para destacar do conteúdo */
    z-index: 1000;
}

.main-header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 70px;
    width: auto;
    display: block;
}

.main-nav ul {
    list-style: none;
    display: flex;
}

.main-nav li a {
    padding: 0 15px;
    font-weight: 600;
    transition: color 0.3s ease;
    position: relative;
    color: #fff;
}

.main-nav li a::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -5px;
    width: 0;
    height: 3px;
    background-color: #007A99;
    transition: width 0.3s ease;
}

.main-nav li a:hover {
    color: #002F42;
}

.main-nav li a:hover::after {
    width: 100%;
}

.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 5px 0;
    transition: all 0.3s ease;
}

/* ======================================================
    5. FOOTER (Menu Esq | Endereço Meio | Logo Dir)
====================================================== */
footer {
    background-color: #004D66;
    color: #fff;
    padding: 40px 0 10px;
    font-size: 0.9em;
}

.footer-nav a {
    display: block;
    color: #fff;
    transition: color 0.3s ease;
}

.footer-nav a:hover {
    color: #ccc;
}

.footer-content-reorganizado {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px 30px;
    gap: 0;
}

.footer-coluna {
    flex: 1 1 30%;
    min-width: 200px;
    padding-bottom: 30px;
}

.footer-coluna:nth-child(1) {
    order: 1;
    text-align: left;
}

.footer-coluna:nth-child(2) {
    order: 3;
    text-align: right;
}

.footer-coluna:nth-child(3) {
    order: 2;
    text-align: center;
}

.logo-footer img {
    max-height: 100px;
    margin: 0;
    display: inline-block;
    transform: none;
}

.endereco-footer a {
    color: #fff;
    text-decoration: underline;
}

.footer-copyright-text {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px 15px;
    text-align: center;
    font-size: 1em;
    font-weight: 500;
    color: #fff;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 20px;
}

/* ======================================================
    6. SEÇÕES
====================================================== */
.hero {
    background: url('../img/2-CAPA.jpeg') center/cover no-repeat;
    min-height: 65vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #fff;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
    padding: 50px 0;
}

.hero-content {
    max-width: 1200px; 
    margin: 0 auto;
    padding: 0 20px;
    width: 100%; 
    text-align: left;
}

.hero-content h1 {
    font-size: 3.5em;
    margin: 0; 
    line-height: 1.1;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0px 0px 5px rgba(0,0,0,0.8);
}

.hero-content h1:first-of-type {
    margin-bottom: 10px; 
}

.hero-content h1:last-of-type {
    margin-bottom: 25px;
}

.hero-content p {
    font-size: 1.3em;
    margin-bottom: 40px; 
    line-height: 1.7; 
    font-weight: 600;
    text-shadow: -1px -1px 0 #000, 1px -1px 0 #000, -1px 1px 0 #000, 1px 1px 0 #000, 0px 0px 5px rgba(0,0,0,0.9);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-top: 40px;
}

.service-card {
    background-color: #fff;
    color: #004D66;
    padding: 40px 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    height: 100%;
}

.about-us h2 {
    font-size: 2em;
    margin-bottom: 25px;
}

.about-us p {
    font-size: 1.15em;
    line-height: 1.7;
    margin-bottom: 30px;
}

/* ======================================================
    7. COMPLIANCE / DOCUMENTOS
====================================================== */
.compliance-documentos {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.documento-card {
    background-color: #f4f4f4;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.documento-card h3 {
    color: #004D66;
    margin-top: 0;
    font-size: 1.3em;
}

.documento-card p {
    flex-grow: 1;
    margin-bottom: 20px;
}

.pdf-viewer {
    width: 100%;
    height: 600px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-top: 20px;
    display: none; 
}

/* ======================================================
    8. FORMULÁRIO DE CONTATO
====================================================== */
.contact-layout {
    display: flex;
    gap: 40px;
    margin-top: 40px;
}

.contact-info,
.contact-form-area {
    flex: 1;
}

.map-container {
    margin-top: 20px;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    border: 1px solid #eee;
}

.map-container iframe {
    display: block;
    width: 100%;
    height: 250px;
    border: 0;
}

#formContato,
#nota-explicativa {
    display: none; 
    animation: fadeIn 0.5s ease-in-out;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.toggle-container {
    display: flex;
    gap: 15px; 
    margin-bottom: 20px;
}

.toggle-container .btn {
    flex: 1; 
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px;
    font-size: 0.95em;
    border-radius: 8px;
    white-space: nowrap;
    opacity: 1 !important;
}

.toggle-container .btn-secondary {
    opacity: 0.7;
    border-color: #ccc;
    color: #555;
    background-color: transparent;
}

.toggle-container .btn-secondary:hover {
    opacity: 1;
    border-color: #004D66;
    color: #004D66;
    background-color: rgba(0, 77, 102, 0.1) !important; 
}

.form-group {
    margin-bottom: 20px;
}

.contact-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
}

.contact-form input,
.contact-form textarea,
.contact-form select {
    width: 100%;
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
    transition: background-color 0.3s, border-color 0.3s; 
}

.contact-form input:disabled,
.contact-form select:disabled {
    background-color: #f0f0f0;
    cursor: not-allowed;
    border-color: #ddd;
}

.contact-form textarea {
    resize: vertical;
}

.nota-anonimato {
    background-color: #f0f8ff;
    border-left: 5px solid #004D66;
    padding: 15px;
    margin-bottom: 25px;
    font-size: 0.95em;
    color: #333;
}

#modo-anonimo-status {
    margin-left: 10px;
    font-size: 0.9em;
}

.modo-anonimo-ativo {
    color: #cc0000;
    font-weight: 700;
}
.modo-anonimo-inativo {
    color: transparent;
}

/* ======================================================
    9: PÁGINA TRABALHE CONOSCO
====================================================== */

/* Fundo da página levemente cinza para destacar o formulário */
.bg-light {
    background-color: #f0f4f8;
}

.job-section {
    padding: 80px 0;
    min-height: 80vh; /* Garante que ocupe boa parte da tela */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* O Cartão Centralizado */
.job-card {
    background-color: #fff;
    max-width: 700px; /* Largura ideal para leitura */
    margin: 0 auto;
    padding: 50px;
    border-radius: 15px;
    box-shadow: 0 15px 35px rgba(0, 77, 102, 0.1); /* Sombra azulada suave */
    border-top: 6px solid #004D66; /* Detalhe da marca no topo */
}

/* Cabeçalho do Cartão */
.job-header {
    text-align: center;
    margin-bottom: 40px;
}

.job-header h1 {
    font-size: 2.5em;
    color: #004D66;
    margin-bottom: 10px;
}

.job-header p {
    color: #666;
    font-size: 1.1em;
}

/* Inputs mais modernos */
.job-card input[type="text"],
.job-card input[type="email"],
.job-card input[type="tel"],
.job-card textarea {
    background-color: #f9f9f9;
    border: 1px solid #e1e1e1;
    padding: 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.job-card input:focus,
.job-card textarea:focus {
    background-color: #fff;
    border-color: #004D66;
    box-shadow: 0 0 0 3px rgba(0, 77, 102, 0.1);
    outline: none;
}

.job-card label {
    font-size: 0.9em;
    color: #444;
    margin-bottom: 8px;
    font-weight: 700;
}

/* Upload de Arquivo Diferenciado */
.file-input-container input[type="file"] {
    border: 2px dashed #004D66;
    background-color: #f0f8ff;
    padding: 20px;
    width: 100%;
    text-align: center;
    border-radius: 8px;
    color: #004D66;
    font-weight: 600;
}

.file-input-container input[type="file"]:hover {
    background-color: #e0f0ff;
}

/* Botão de Envio Full Width */
.btn-block {
    width: 100%;
    padding: 18px;
    font-size: 1.1em;
    margin-top: 10px;
    border-radius: 8px;
    box-shadow: 0 8px 20px rgba(0, 77, 102, 0.25);
}

.btn-block:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(0, 77, 102, 0.35);
}

/* Layout de colunas para Nome e Email no Desktop */
.form-row {
    display: flex;
    gap: 20px;
}

.form-row .form-group {
    flex: 1;
}

/* Responsividade para Celular */
@media (max-width: 768px) {
    .job-card {
        padding: 30px 20px;
        width: 95%;
        margin: 0 auto;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .job-header h1 {
        font-size: 2em;
    }
}

/* ======================================================
    10. CARROSSEL DE SERVIÇOS
====================================================== */
.slider-container {
    position: relative;
    overflow: visible;
    padding: 20px 0;
    margin: 0 70px;
}

.slider-container::before,
.slider-container::after {
    content: "";
    position: absolute;
    top: 0;
    width: 60px;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.slider-container::before {
    left: 0;
    background: linear-gradient(to right, #f4f4f4 0%, transparent 100%);
}

.slider-container::after {
    right: 0;
    background: linear-gradient(to left, #f4f4f4 0%, transparent 100%);
}

.services-slider {
    display: flex;
    overflow-x: scroll;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
    scroll-behavior: smooth;
    cursor: grab;
    gap: 20px;
}

.services-slider.active-drag {
    cursor: grabbing;
}

.services-slider::-webkit-scrollbar {
    display: none;
}

.slide-item {
    flex: 0 0 calc((100% - 40px) / 3);
    margin-right: 0;
    scroll-snap-align: start;
    transition: transform 0.5s ease, box-shadow 0.5s ease;
    background-color: #fff;
    color: #004D66;
    padding: 40px 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    height: 100%;
}

.slide-item img {
    width: 100%;
    height: 220px; /* altura fixa que padroniza todas as imagens */
    object-fit: cover;
    border-radius: 4px;
    margin-bottom: 15px;
}


.slide-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
}

.slider-button {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    font-size: 1.8em;
    background-color: #ffffff;
    color: #004D66;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
}

.slider-button:hover {
    background-color: #004D66;
    color: #fff;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 15px 35px rgba(0, 77, 102, 0.4);
}

.slider-button:disabled {
    opacity: 0.5;
    cursor: default;
    background-color: #e0e0e0;
    color: #aaaaaa;
    transform: translateY(-50%) scale(1);
    box-shadow: none;
}

.slider-button.prev { left: -80px; }
.slider-button.next { right: -80px; }

/* ======================================================
    11. ANIMAÇÕES
====================================================== */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

body {
    opacity: 0;
    transition: opacity 0.8s ease-in-out;
}

body.page-loaded {
    opacity: 1;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.65, 0, 0.35, 1);
}

/* =====================================================
    12. VISUALIZADOR DE IMAGEM (MODAL/LIGHTBOX) - CORREÇÃO ZOOM
====================================================== */
.pdf-modal-oculto { display: none; }

.pdf-modal-ativo {
    display: flex;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
    overflow-y: auto !important; 
    overflow-x: hidden;
    align-items: flex-start;
    justify-content: center;
    padding: 40px 0;
}

.pdf-modal-conteudo {
    position: relative;
    margin: auto;
    width: 100%;
    min-height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.image-viewer-content {
    display: block;
    max-height: 90vh; 
    max-width: 95vw;
    width: auto;
    height: auto;
    object-fit: contain;
    background-color: #fff;
    box-shadow: 0 0 30px rgba(0,0,0,0.8);
    cursor: zoom-in; 
    transition: width 0.3s ease, max-width 0.3s ease;
}

.image-viewer-content.zoom-ativo {
    cursor: zoom-out;
    max-height: none !important; 
    width: 90% !important; 
    max-width: 1200px !important; 
    height: auto !important;
    margin-top: 50px;
    margin-bottom: 50px;
    z-index: 20;
}

.pdf-fechar {
    position: fixed; 
    top: 20px; 
    right: 30px;
    width: 50px;
    height: 50px;
    background-color: #004D66;
    color: #fff;
    border: 3px solid #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
}

.pdf-fechar:hover {
    transform: scale(1.1);
    background-color: #003344;
}

.carousel-container {
    display: contents;
}

.carousel-control {
    cursor: pointer;
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: bold;
    font-size: 35px;
    background-color: transparent;
    border: none;
    outline: none;
    user-select: none;
    z-index: 10001;
}

.prev-btn { left: 20px; }
.next-btn { right: 20px; }

.carousel-control:hover {
    color: #00a8cc;
    transform: translateY(-50%) scale(1.2);
}

.page-indicator {
    position: fixed;
    bottom: 10px; 
    left: 50%;
    transform: translateX(-50%);
    color: #fff;
    background-color: rgba(0,0,0,0.5);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 16px;
    pointer-events: none;
    z-index: 10001;
}

/* Fundo escuro */
.modal-popup-overlay {
    display: none; 
    position: fixed;
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85); /* Escureci um pouco mais o fundo */
    align-items: center;
    justify-content: center;
}

/* Caixa onde a imagem fica */
.modal-popup-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Garante que o container não seja maior que a tela */
    max-width: 90vw; 
    max-height: 80vh; 
}

/* Estilo da imagem - AQUI ESTÁ A MÁGICA */
.img-popup {
    max-width: 100%;  /* Não deixa a imagem ser maior que o container */
    max-height: 80vh; /* Não deixa a imagem ser maior que 80% da altura da tela */
    width: auto;      /* Mantém a proporção */
    height: auto;     /* Mantém a proporção */
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border: 3px solid #fff; /* Adiciona uma bordinha branca para destacar */
}

/* Botão de fechar (X) mais visível */
.close-popup {
    position: absolute;
    top: -45px;
    right: 0;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close-popup:hover {
    color: #ff4d4d; /* Fica vermelhinho ao passar o mouse */
}

/* ======================================================
    13. LAYOUT DE MANUAIS
====================================================== */
.manuais-container {
    display: flex;
    justify-content: center;
    align-items: stretch;
    flex-wrap: wrap;
    gap: 30px;
    margin-top: 50px;
}

.manuais-container .single-document-view {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1 1 300px;
    max-width: 400px;
    background-color: #004D66; 
    color: #fff;
    padding: 40px 30px;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 77, 102, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    text-align: center;
}

.manuais-container .single-document-view:hover {
    transform: translateY(-7px);
    box-shadow: 0 15px 35px rgba(0, 77, 102, 0.4);
    background-color: #005a75;
}

.document-title {
    color: #fff; 
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.manuais-container .single-document-view p {
    color: #e0e0e0; 
    font-size: 1em;
    line-height: 1.6;
    margin-bottom: 30px;
    flex-grow: 1;
}

#btn-manual-conduta, #btn-manual-anticorrupcao {
    background-color: #fff; 
    color: #004D66; 
    border: none;
    padding: 15px 25px;
    border-radius: 50px; 
    font-weight: 700;
    font-size: 0.95em;
    transition: all 0.3s ease;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    width: 100%;
}

#btn-manual-conduta:hover, #btn-manual-anticorrupcao:hover {
    background-color: #f0f0f0; 
    transform: scale(1.02);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.3);
}

/* ======================================================
    ESTILO DA TIMELINE (LINHA DO TEMPO)
====================================================== */
.timeline-container {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
    border-left: 3px solid #004D66;
}

.timeline-block {
    position: relative;
    margin-bottom: 40px;
    padding-left: 40px;
}

.timeline-block:last-child {
    margin-bottom: 0;
}

.timeline-marker {
    position: absolute;
    top: 0;
    left: -11px;
    width: 20px;
    height: 20px;
    background: #fff;
    border: 4px solid #004D66;
    border-radius: 50%;
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.5);
}

.timeline-content h3 {
    margin-top: 0;
    color: #004D66;
    font-size: 1.4em;
    margin-bottom: 10px;
    font-weight: 700;
}

.timeline-content p {
    color: #555;
    font-size: 1.05em;
    line-height: 1.8;
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-left: 4px solid transparent;
    transition: all 0.3s ease;
}

.timeline-block:hover .timeline-marker {
    background: #004D66;
    transform: scale(1.2);
    transition: all 0.3s ease;
}

.timeline-block:hover .timeline-content p {
    border-left: 4px solid #004D66;
    transform: translateX(5px);
}

@media (max-width: 480px) {
    .timeline-content p {
        padding: 15px;
        font-size: 0.95em;
    }
}

/* ======================================================
    ESTILOS QUEM SOMOS (MODERNO & CLEAN)
====================================================== */
.hero-simples {
    background-color: #f4f8fb;
    padding: 100px 0 80px;
    text-align: center;
    border-bottom: 1px solid #e1e8ed;
}

.hero-simples h1 {
    color: #004D66;
    margin: 0 0 15px 0;
    font-size: 3.5em;
    font-weight: 800;
    letter-spacing: -1px;
}

.hero-simples h1::after {
    content: '';
    display: block;
    width: 80px;
    height: 5px;
    background-color: #007A99;
    margin: 20px auto 0;
    border-radius: 5px;
}

.hero-simples .subtitle {
    font-size: 1.3em;
    color: #666;
    font-weight: 500;
    max-width: 600px;
    margin: 0 auto;
}

.historia-layout {
    display: flex;
    gap: 80px; 
    align-items: flex-start; 
}

.historia-img-wrapper {
    flex: 1;
    max-width: 500px;
    position: -webkit-sticky;
    position: sticky;
    top: 140px; 
    align-self: flex-start; 
    z-index: 10;
    margin-bottom: 50px;
}

.image-frame {
    position: relative;
    z-index: 1;
}

.image-frame::before {
    content: '';
    position: absolute;
    top: 30px;
    left: -30px;
    width: 100%;
    height: 100%;
    border-radius: 15px;
    z-index: -1;
    opacity: 0.3;
}

.img-fluid {
    width: 100%;
    height: auto;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    display: block;
}

.historia-texto {
    flex: 1.2;
}

.texto-intro {
    font-size: 1.25em;
    color: #004D66;
    margin-bottom: 30px;
    line-height: 1.6;
    border-left: 4px solid #28a745;
    padding-left: 20px;
}

.historia-texto p {
    margin-bottom: 20px;
    line-height: 1.8;
    color: #555; 
    font-size: 1.05em;
    text-align: justify;
}

.destaque-final {
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-left: 5px solid #004D66;
    padding: 25px;
    color: #333;
    font-weight: 500;
    border-radius: 8px;
    margin-top: 40px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

@media (max-width: 900px) {
    .historia-layout {
        flex-direction: column;
    }

    .historia-img-wrapper {
        position: relative !important; 
        top: 0 !important;
        max-width: 100%;
        width: 100%;
        margin-bottom: 40px;
        padding-left: 15px;
    }
    
    .image-frame::before {
        left: -10px;
        top: 10px;
    }
    
    .hero-simples h1 {
        font-size: 2.2em;
    }
}

/* ======================================================
    15. MOBILE (até 768px) - COMPLETO E CORRIGIDO
====================================================== */
@media (max-width: 768px) {
    
    /* --- TIPOGRAFIA --- */
    h1 { font-size: 2.2em; }
    h2 { font-size: 1.6em; margin-bottom: 15px; }
    .hero-simples h1 { font-size: 2.2em; }

    .texto-justificado { text-align: left; }
    .main-header .container { padding: 0 20px; }
    .logo img { height: 50px; }

    /* --- MENU HAMBURGER --- */
    .hamburger { 
        display: block !important; 
        z-index: 1001;
    }

    .main-nav {
        position: fixed;
        top: 0;
        left: -250px !important; 
        width: 250px;
        height: 100vh;
        background: #004D66; 
        box-shadow: 2px 0 5px rgba(0,0,0,0.5);
        z-index: 999; 
        transition: left 0.3s ease;
        display: block !important; 
    }

    .main-nav.active { left: 0 !important; }

    .main-nav ul {
        flex-direction: column !important; 
        display: block !important; 
        padding-top: 80px; 
        width: 100%;
    }

    .main-nav li a {
        padding: 15px 20px;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        display: block;
        color: #fff;
    }
    
    .hamburger.active span:nth-child(2) { opacity: 0; }
    .hamburger.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .hamburger.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

    /* --- EMPILHAMENTO GERAL --- */
    .hero { min-height: 45vh; padding: 30px 0; }

    .services-grid,
    .compliance-documentos,
    .contact-layout,
    .historia-conteudo,
    .manuais-container,
    .historia-layout { 
        flex-direction: column;
        gap: 30px;
    }

    /* --- SLIDER RESPONSIVO (CORREÇÃO) --- */
    .slider-container {
        margin: 0; /* Remove margem lateral */
        padding: 20px 0;
    }
    
    /* Remove gradiente lateral no mobile para limpar a visão */
    .slider-container::before,
    .slider-container::after {
        display: none;
    }

    .services-slider {
        gap: 15px;
        padding: 0 20px; /* Padding para o card não colar na borda */
        scroll-padding-left: 20px; /* Ajuste para o snap ficar alinhado */
    }

    .slide-item {
        flex: 0 0 85%; /* 85% da largura = 1 card + pedacinho do próximo */
        width: 85%;
        margin-right: 0;
        min-height: auto; 
    }

    .slide-item img {
        height: 200px; /* Altura padronizada para mobile */
        width: 100%;
        object-fit: cover;
    }

    .slider-button { display: none !important; } /* Esconde setas */

    /* --- AJUSTE QUEM SOMOS --- */
    .historia-img-wrapper {
        position: relative !important; 
        top: 0 !important;
        width: 100%;
        max-width: 100%;
        margin-bottom: 20px;
        padding-left: 15px;
    }

    .image-frame::before {
        left: -10px;
        top: 10px;
    }

    /* --- OUTROS AJUSTES --- */
    .manuais-container { align-items: center; }
    .manuais-container .single-document-view {
        width: 100%;
        max-width: 100%;
        padding: 30px 20px;
    }

    .missao-valores { margin-top: 30px; padding-left: 15px; }

    /* --- RODAPÉ --- */
    .footer-content-reorganizado {
        flex-direction: column;
        gap: 30px;
        text-align: center;
        padding-bottom: 20px;
    }

    .footer-coluna:nth-child(1) {
        order: 1;
        width: 100%;
        border-bottom: 1px solid rgba(255,255,255,0.1);
        padding-bottom: 20px;
    }

    .footer-coluna:nth-child(3) { order: 2; padding-bottom: 10px; }
    .footer-coluna:nth-child(2) { order: 3; margin-top: 10px; }

    .logo-footer img {
        transform: none;
        margin: 0 auto;
        max-height: 60px;
        display: block;
    }

    /* --- MODAL E FORM --- */
    .toggle-container { flex-direction: column; gap: 10px; }
    .pdf-fechar { top: 10px; right: 10px; font-size: 24px; width: 40px; height: 40px; }
    .carousel-control { font-size: 20px; padding: 10px; width: auto; height: auto; background-color: rgba(0,0,0,0.3); }
    .prev-btn { left: 5px; }
    .next-btn { right: 5px; }
    .pdf-modal-conteudo { width: 95%; }
    .image-viewer-content { max-height: 80vh; } 
    .map-container iframe { height: 300px; }
}