/* PALETA DE CORES QRS ENGENHARIA (Extraída da Logo) */
:root {
    --color-primary-dark: #111D40;
    /* Azul Marinho da Logo */
    --color-primary-medium: #1B2B5A;
    /* Variação para profundidade */
    --color-accent: #FCC156;
    /* Amarelo Ouro da Logo */
    --color-accent-dark: #e5af4d;
    /* Amarelo mais escuro para hover */
    --color-gray-industrial: #4A5568;
    --color-bg: #F8FAFC;
    --color-text-main: #1E293B;
    --color-text-secondary: #64748B;
    --color-white: #FFFFFF;
    --color-black: #000000;
    --color-success: #25D366;
    /* Cor do WhatsApp */
}

/* Reset & Global */
html {
    scroll-behavior: smooth;
}

body {
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background-color: var(--color-bg);
    color: var(--color-text-main);
    padding-top: 76px;
    /* Compensa a navbar fixa */
}

/* --- NAVBAR --- */
.navbar {
    background-color: var(--color-primary-dark) !important;
    /* Força a cor de fundo */
    transition: all 0.3s ease;
    padding: 1rem 0;
}

.navbar.scrolled {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    padding: 0.6rem 0;
}

.nav-link {
    color: rgba(255, 255, 255, 0.85) !important;
    /* Um pouco mais claro */
    font-weight: 500;
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-accent) !important;
}

.navbar-brand {
    color: var(--color-white) !important;
}

.brand-suffix {
    color: var(--color-accent);
}

/* Estilo do botão CTA na navbar - CORREÇÃO FINAL COM BORDA ARREDONDADA */
.btn-cta {
    background-color: transparent !important;
    color: white !important;
    border: 1px solid #FCC156 !important;
    border-radius: 30px !important;
    /* ALTERADO PARA 30PX */
    padding: 0.5rem 1.2rem !important;
    margin-left: 10px;
    font-weight: 700 !important;
    transition: all 0.3s ease !important;
}

.btn-cta:hover {
    background-color: #FCC156 !important;
    color: #111D40 !important;
    border-color: #FCC156 !important;
}

/* Garantir que nenhum outro estilo sobrescreva */
.nav-link.btn-cta:hover,
.navbar-nav .nav-link.btn-cta:hover {
    color: #111D40 !important;
    background-color: #FCC156 !important;
}

/* Estilo do botão toggler no mobile */
.navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.navbar-toggler-icon {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3e%3cpath stroke='white' stroke-linecap='round' stroke-miterlimit='10' stroke-width='2' d='M4 7h22M4 15h22M4 23h22'/%3e%3c/svg%3e");
}

/* --- HERO SECTION --- */
.hero {
    background-image: url('../img/hero-placa.jpg');
    /* Certifique-se de que a imagem existe */
    background-size: cover;
    background-position: center;
    min-height: 85vh;
    margin-top: -76px;
    position: relative;
    background-color: var(--color-primary-dark);
    /* Fallback caso a imagem não carregue */
}

.hero-lead {
    max-width: 700px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(17, 29, 64, 0.9) 0%, rgba(27, 43, 90, 0.8) 100%);
    z-index: 1;
}

.hero .container {
    position: relative;
    z-index: 2;
}

/* --- BOTÕES GERAIS --- */
.btn-primary-custom {
    background-color: var(--color-accent);
    border: none;
    color: var(--color-primary-dark);
    font-weight: 700;
    padding: 0.8rem 2rem;
    transition: all 0.2s ease;
    border-radius: 30px;
    /* Padronizando com o botão CTA */
}

.btn-primary-custom:hover {
    background-color: var(--color-accent-dark);
    color: var(--color-primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(252, 193, 86, 0.4);
}

.btn-outline-light {
    border-radius: 30px;
    border-width: 2px;
}

.btn-outline-light:hover {
    background-color: var(--color-white);
    color: var(--color-primary-dark) !important;
}

/* --- SERVIÇOS --- */
.section-padding {
    padding: 80px 0;
}

.section-title h2 {
    font-weight: 700;
    color: var(--color-primary-dark);
}

.service-card {
    background: white;
    border-radius: 12px;
    /* Mais arredondado */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border-top: 5px solid var(--color-accent);
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

.icon-box {
    color: var(--color-accent);
}

.icon-box svg {
    width: 64px;
    /* Ícones um pouco maiores */
    height: 64px;
}

.divider {
    height: 4px;
    width: 70px;
    background-color: var(--color-accent);
    margin-top: 15px;
    border-radius: 2px;
}

/* --- PROCESSO --- */
.bg-light {
    background-color: var(--color-bg) !important;
}

.process-step {
    position: relative;
    margin-bottom: 30px;
}

.step-number {
    width: 65px;
    height: 65px;
    background-color: var(--color-primary-dark);
    color: var(--color-accent);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 auto 20px;
    position: relative;
    z-index: 2;
    border: 3px solid var(--color-accent);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.process-step h4 {
    font-weight: 600;
    color: var(--color-primary-dark);
}

.process-step .small {
    font-size: 0.9rem;
    color: var(--color-text-secondary) !important;
}

/* Linha conectora entre steps (para desktop) */
@media (min-width: 768px) {
    .process-row {
        position: relative;
    }

    .process-step:not(.last)::after {
        content: '';
        position: absolute;
        top: 32px;
        right: -15%;
        width: 70%;
        height: 2px;
        background: linear-gradient(90deg, var(--color-primary-medium) 0%, var(--color-accent) 100%);
        z-index: 1;
        opacity: 0.5;
    }
}

/* --- PORTFOLIO --- */
.portfolio-item {
    height: 250px;
    background: linear-gradient(145deg, var(--color-primary-dark), var(--color-primary-medium));
    /* Gradiente de fallback */
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.portfolio-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.45, 0.45, 0.95);
}

.portfolio-item:hover img {
    transform: scale(1.1);
}

.portfolio-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(17, 29, 64, 0.95);
    padding: 20px;
    color: white;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    border-top: 3px solid var(--color-accent);
    z-index: 2;
}

.portfolio-item:hover .portfolio-overlay {
    transform: translateY(0);
}

.portfolio-overlay h5 {
    margin-bottom: 5px;
    font-weight: 700;
    color: var(--color-accent);
}

.portfolio-overlay p {
    margin-bottom: 0;
    font-size: 0.9rem;
    opacity: 0.9;
}

/* --- TECNOLOGIAS --- */
.bg-dark {
    background-color: var(--color-primary-dark) !important;
    /* Usando o azul escuro da paleta */
}

.tech-badge {
    background-color: rgba(252, 193, 86, 0.1);
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    padding: 10px 20px;
    border-radius: 40px;
    /* Mais arredondado */
    font-size: 0.9rem;
    font-weight: 600;
    display: inline-block;
    transition: all 0.2s ease;
    margin: 0 5px 10px 0;
}

.tech-badge:hover {
    background-color: var(--color-accent);
    color: var(--color-primary-dark);
    transform: translateY(-2px);
}

.text-accent {
    color: var(--color-accent) !important;
}

/* Card de Segmentos */
.card.bg-secondary {
    background-color: rgba(255, 255, 255, 0.05) !important;
    /* Mais sutil que o bg-secondary padrão */
    backdrop-filter: blur(5px);
    border-radius: 16px;
}

.segment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.segment-list li {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.segment-list li svg {
    margin-right: 12px;
    fill: var(--color-accent);
    width: 18px;
    height: 18px;
}

/* --- CONTATO E SUPORTE --- */
#contato {
    background-color: var(--color-white);
}

.support-card {
    background-color: var(--color-bg);
    border: 2px dashed var(--color-accent);
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

.support-card h3 {
    color: var(--color-primary-dark);
    font-weight: 700;
}

/* Ajuste nos botões de suporte */
.support-card .btn-outline-dark {
    color: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    border-width: 2px;
    font-weight: 600;
    border-radius: 30px;
    padding: 10px;
}

.support-card .btn-outline-dark:hover {
    background-color: var(--color-primary-dark);
    color: var(--color-accent);
    border-color: var(--color-primary-dark);
}

.contact-info p {
    margin-bottom: 8px;
    color: var(--color-text-main);
}

.contact-info strong {
    color: var(--color-primary-dark);
    font-weight: 600;
}

.support-card img {
    border-radius: 12px;
    border: 1px solid #eee;
}

/* Formulário */
.form-label {
    font-weight: 600;
    color: var(--color-primary-dark);
}

.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid #ced4da;
    padding: 12px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 0.25rem rgba(252, 193, 86, 0.25);
}

.invalid-feedback {
    color: #dc3545;
    font-size: 0.85rem;
}

/* --- FOOTER --- */
.bg-primary-dark {
    background-color: var(--color-primary-dark) !important;
}

footer.bg-primary-dark {
    background-color: var(--color-primary-dark);
    color: var(--color-white) !important;
}

footer .text-white-50 {
    color: rgba(255, 255, 255, 0.6) !important;
}

footer .h4 {
    color: var(--color-accent);
    font-weight: 700;
}

/* --- BOTÃO VOLTAR AO TOPO --- */
#backToTop {
    position: fixed;
    bottom: 100px;
    /* Ajustado para ficar acima do WhatsApp */
    right: 30px;
    background-color: var(--color-accent);
    width: 50px;
    height: 50px;
    display: none;
    /* Inicialmente escondido, aparece com JS */
    align-items: center;
    justify-content: center;
    z-index: 999;
    transition: all 0.3s;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

#backToTop svg {
    stroke: var(--color-primary-dark);
    width: 24px;
    height: 24px;
}

#backToTop.show {
    display: flex !important;
}

#backToTop:hover {
    background-color: var(--color-accent-dark);
    transform: scale(1.1);
}

/* --- WHATSAPP FLUTUANTE --- */
#whatsappFloat {
    position: fixed;
    right: 30px;
    bottom: 30px;
    /* Colado no fundo */
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--color-success);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(37, 211, 102, 0.3);
    text-decoration: none;
    transition: all 0.3s ease;
}

#whatsappFloat svg {
    fill: #ffffff;
    width: 35px;
    height: 35px;
}

#whatsappFloat:hover {
    transform: scale(1.1);
    background: #20ba5a;
    box-shadow: 0 15px 30px rgba(37, 211, 102, 0.4);
}

/* --- MENU MOBILE (OFFCANVAS) --- */
.offcanvas {
    background-color: var(--color-primary-dark);
    color: white;
}

.offcanvas-title {
    color: var(--color-accent);
    font-weight: 800;
    letter-spacing: 1px;
}

.offcanvas .btn-close {
    filter: invert(1) grayscale(100%) brightness(200%);
    opacity: 0.8;
}

.offcanvas .btn-close:hover {
    opacity: 1;
}

.offcanvas .nav-link {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 1.1rem;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.offcanvas .nav-link:hover {
    color: var(--color-accent) !important;
}

@media (max-width: 991px) {
    .btn-cta {
        margin: 20px 0 10px 0 !important;
        display: block;
        width: 100%;
        text-align: center;
    }
}

/* Ajuste para o elemento com id "suporte" que também é um link ancora */
#suporte {
    scroll-margin-top: 80px;
    /* Para compensar a navbar fixa ao clicar no link */
}

/* Garantia de contraste no footer e seções escuras */
.bg-dark .text-white,
.bg-primary-dark .text-white {
    color: var(--color-white) !important;
}

.bg-dark .text-accent {
    color: var(--color-accent) !important;
}

/* Pequeno ajuste para a âncora do portfolio */
#portfolio .section-title {
    margin-bottom: 2rem !important;
}

/* ===== FOOTER QRS ENGENHARIA ===== */

/* Badges de serviços */
.trust-badge {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    padding: 0.4rem 1rem;
    border-radius: 30px;
    font-size: 0.8rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.trust-badge:hover {
    background-color: var(--color-accent);
    color: #000000;
    border-color: var(--color-accent);
}

/* Links do footer */
.footer-link {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.footer-link:hover {
    color: var(--color-accent);
    padding-left: 3px;
}

/* Ícones sociais */
.social-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 50%;
    transition: all 0.3s ease;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-icon:hover {
    background-color: var(--color-accent);
    transform: translateY(-3px);
    border-color: var(--color-accent);
}

.social-icon:hover svg {
    fill: #000000;
}

/* Newsletter - LEGÍVEL */
.newsletter-input {
    background-color: #ffffff;
    border: 1px solid #dee2e6;
    color: #212529;
    height: 45px;
    border-radius: 4px 0 0 4px;
}

.newsletter-input:focus {
    background-color: #ffffff;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 0.2rem rgba(255, 215, 0, 0.25);
    color: #212529;
}

.newsletter-input::placeholder {
    color: #6c757d;
}

.btn-newsletter {
    background-color: rgba(252, 193, 86, 0.1);
    border: 1px solid var(--color-accent);
    color: var(--color-accent);
    font-weight: 600;
    padding: 0 1.2rem;
    height: 45px;
    border-radius: 0 4px 4px 0;
    transition: all 0.3s ease;
}

.btn-newsletter:hover {
    background-color: var(--color-accent);
    color: var(--color-primary-dark);
}

/* Tags de segmentos */
.segment-tag {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.8rem;
    padding: 0.2rem 0.8rem;
    background-color: rgba(255, 255, 255, 0.06);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.segment-tag:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
}

/* Linha divisória */
.footer-divider {
    opacity: 0.15;
    border-color: #ffffff;
    margin: 2rem 0;
}

/* Ajustes de espaçamento */
.footer .list-unstyled li {
    margin-bottom: 0.6rem !important;
}

/* ============================================
   CORREÇÃO FINAL - ALINHAMENTO E LARGURA
   ============================================ */

/* Garante que o rodapé use a largura total disponível */
.footer .container {
    max-width: 1320px;
}

/* Alinhamento da lista de contatos */
.footer .list-unstyled {
    padding-left: 0 !important;
    margin-bottom: 0;
}

.footer .list-unstyled li {
    display: flex;
    align-items: center;
    margin-bottom: 1rem !important;
}

/* Resolve o "estreito": permite que o conteúdo dite o espaço */
.footer .list-unstyled li .d-flex {
    gap: 12px;
    display: flex;
    align-items: center;
    white-space: nowrap;
    /* Impede que o e-mail quebre em duas linhas se houver espaço */
}

/* Garante que as colunas ocupem o espaço correto no grid */
.footer .row>div {
    display: block;
}

/* Estilo para projetos em desenvolvimento */
.project-rd img {
    filter: grayscale(100%);
    opacity: 0.6;
}

.project-rd::after {
    content: "EM P&D";
    position: absolute;
    top: 10px;
    right: 10px;
    background: #ffc107;
    /* Amarelo alerta/engenharia */
    color: #000;
    padding: 2px 8px;
    font-size: 10px;
    font-weight: bold;
    border-radius: 3px;
    z-index: 2;
}