:root {
    --primary: #1a3a5f;
    --primary-dark: #10253f;
    --accent: #ffc107;
    --danger: #d32f2f;
    --text-dark: #2d3436;
    --text-light: #636e72;
    --white: #ffffff;
    --bg-light: #f8f9fa;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    font-family: 'Roboto', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

h1, h2, h3, h4, .logo { font-family: 'Montserrat', sans-serif; font-weight: 700; }

.container { width: 90%; max-width: 1200px; margin: 0 auto; }
.section { padding: 80px 0; }
.bg-light { background: var(--bg-light); }
.mt-2 { margin-top: 1rem; }

/* --- Header Dinâmico --- */
header {
    background: var(--white);
    height: 80px;
    display: flex;
    align-items: center;
    position: fixed;
    top: 0; left: 0; width: 100%;
    z-index: 1000;
    transition: var(--transition);
}

/* Classe adicionada via JS ao rolar */
header.scrolled {
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    background: rgba(255, 255, 255, 0.98);
    height: 70px;
}

.logo-img {
    height: 85px; /* Define uma altura fixa para caber no menu */
    width: auto;  /* Mantém a proporção correta da imagem */
    display: block; /* Remove espaços extras abaixo da imagem */
    transition: var(--transition);
}

.logo-img:hover {
    transform: scale(1.05); /* Um leve efeito de zoom ao passar o mouse */
}

.nav-wrapper { display: flex; justify-content: space-between; align-items: center; }

.nav-list { display: flex; list-style: none; align-items: center; gap: 30px; }

.nav-list li a {
    text-decoration: none;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    transition: var(--transition);
}

/* Efeito de sublinhado animado */
.nav-list li a::after {
    content: '';
    position: absolute;
    bottom: -5px; left: 0;
    width: 0%; height: 2px;
    background: var(--accent);
    transition: var(--transition);
}
.nav-list li a:hover::after { width: 100%; }

.btn-cta-nav {
    background: var(--primary);
    color: var(--white) !important;
    padding: 10px 25px;
    border-radius: 50px;
    transition: var(--transition);
}
.btn-cta-nav:hover {
    background: var(--accent);
    color: var(--primary) !important;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 193, 7, 0.4);
}
.btn-cta-nav::after { display: none; } /* Remove sublinhado do botão */

/* --- Hero Section --- */
.hero {
    height: 100vh;
    background: url('https://images.unsplash.com/photo-1504307651254-35680f356dfd?q=80&w=2070') no-repeat center center/cover;
    background-attachment: fixed; /* Efeito Parallax simples */
    display: flex;
    align-items: center;
    position: relative;
    color: var(--white);
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(26,58,95,0.95) 0%, rgba(26,58,95,0.7) 100%);
}

.hero-content { position: relative; z-index: 2; max-width: 800px; }
.hero-content h1 { font-size: 3.5rem; margin-bottom: 20px; line-height: 1.1; }
.hero-content p { font-size: 1.2rem; margin-bottom: 30px; opacity: 0.9; }

.btn-primary, .btn-outline {
    display: inline-block;
    padding: 15px 40px;
    border-radius: 4px;
    font-weight: bold;
    text-decoration: none;
    transition: var(--transition);
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.btn-primary { background: var(--accent); color: var(--primary); border: 2px solid var(--accent); margin-right: 15px; }
.btn-primary:hover { background: transparent; color: var(--accent); }

.btn-outline { background: transparent; color: var(--white); border: 2px solid var(--white); }
.btn-outline:hover { background: var(--white); color: var(--primary); }

/* --- Carrossel --- */
.slider-container {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.slide { display: none; }
.slide.active { display: block; animation: fadeIn 0.8s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

.slide img {
    width: 100%;
    /* Define uma proporção estável. 16/9 é o padrão de cinema/TV */
    /* 21/9 é excelente para carrosséis mais "faixa" (cinemascópio) */
    aspect-ratio: 16 / 7; 
    
    object-fit: cover;
    object-position: top; /* Garante que o homem no guindaste seja o foco */
    display: block;
}

.slide-caption {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: #fff;
    padding: 40px 30px 20px;
}

/* --- Seção Sobre --- */
.about-container {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Divide a tela em 2 */
    gap: 60px;
    align-items: center;
}

.sub-title {
    color: var(--accent);
    font-size: 2.0rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-bottom: 10px;
    font-weight: 700;
}

.section-title-left {
    font-size: 2.5rem;
    color: var(--primary);
    margin-bottom: 20px;
    line-height: 1.2;
}

.about-content p {
    color: var(--text-light);
    margin-bottom: 20px;
    font-size: 1.05rem;
}

/* Lista de ícones */
.about-list {
    list-style: none;
    margin-bottom: 30px;
}

.about-list li {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    color: var(--text-dark);
}

.about-list i {
    color: var(--accent); /* Ícone amarelo */
}

/* Imagem e Badge */
.about-img-wrapper {
    position: relative;
}

.about-img {
    width: 100%;
    border-radius: 8px;
    box-shadow: 20px 20px 0px var(--primary-dark); /* Sombra sólida estilosa */
}

/* Selo Flutuante de Anos de Experiência */
.experience-badge {
    position: absolute;
    bottom: -20px;
    right: -20px;
    background: var(--accent);
    color: var(--primary);
    padding: 25px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.experience-badge .years {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1;
}

.experience-badge .text {
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Responsivo para Celular */
@media (max-width: 900px) {
    .about-container {
        grid-template-columns: 1fr; /* Vira uma coluna só */
        text-align: left; /* Ou center, se preferir */
    }

    .about-img-wrapper {
        order: -1; /* Força a imagem a aparecer antes do texto no mobile */
        margin-bottom: 40px;
        width: 90%; /* Deixa um pouco menor pra não vazar */
    }

    .experience-badge {
        right: 0;
        padding: 15px;
    }
}

.prev, .next {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: rgba(255,255,255,0.2);
    color: white; border: none;
    padding: 15px 20px; cursor: pointer;
    backdrop-filter: blur(5px);
    border-radius: 50%;
    transition: var(--transition);
}
.prev:hover, .next:hover { background: var(--accent); color: var(--primary); }
.next { right: 20px; } .prev { left: 20px; }

/* --- Grid de Clientes --- */
.section-title { text-align: center; margin-bottom: 50px; font-size: 2.2rem; color: var(--primary); }

.client-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 30px;
}

/* Container do Card */
.client-card {
    background: white;
    padding: 20px;
    height: 120px; /* Altura fixa para alinhar todos */
    display: flex;
    align-items: center;     /* Centraliza verticalmente */
    justify-content: center; /* Centraliza horizontalmente */
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
    transition: var(--transition);
}

.client-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.1);
}

/* Estilo da Imagem (Logo) */
.client-img {
    max-width: 80%;   /* Não deixa a logo estourar a largura */
    max-height: 80px; /* Limita a altura */
    width: auto;      /* Mantém a proporção */
    object-fit: contain;
    
    /* Efeito Visual */
    filter: grayscale(100%); /* Deixa preto e branco */
    opacity: 0.6;            /* Levemente transparente */
    transition: var(--transition);
}

/* Ao passar o mouse no card, a imagem ganha cor */
.client-card:hover .client-img {
    filter: grayscale(0%); /* Volta a cor original */
    opacity: 1;            /* Opacidade total */
    transform: scale(1.1); /* Leve zoom */
}
.client-card span { display: block; margin-top: 15px; font-weight: 600; }

/* --- Footer --- */
footer { background: var(--primary); color: var(--white); padding-top: 60px; }
.footer-content { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.1); }
.contact-list li { list-style: none; margin-bottom: 15px; display: flex; align-items: center; gap: 10px; }
.social-links a { color: white; font-size: 1.5rem; margin-right: 15px; transition: var(--transition); }
.social-links a:hover { color: var(--accent); }
.footer-bottom { text-align: center; padding: 20px; font-size: 0.9rem; opacity: 0.7; }

/* --- Menu Mobile (Hambúrguer) --- */
.mobile-menu { display: none; cursor: pointer; }
.mobile-menu div { width: 32px; height: 2px; background: var(--primary); margin: 8px; transition: var(--transition); }

@media (max-width: 900px) {
    .nav-list {
        position: fixed;
        top: 0; right: 0;
        width: 70%;
        height: 100vh;
        background: var(--white);
        flex-direction: column;
        justify-content: center;
        transform: translateX(100%); /* Esconde o menu */
        box-shadow: -10px 0 30px rgba(0,0,0,0.1);
        z-index: 999;
    }

    .nav-list.active { transform: translateX(0); } /* Mostra o menu */

    .mobile-menu { display: block; z-index: 1000; }
    
    /* Animação do X no menu */
    .mobile-menu.active .line1 { transform: rotate(-45deg) translate(-8px, 8px); background: var(--danger); }
    .mobile-menu.active .line2 { opacity: 0; }
    .mobile-menu.active .line3 { transform: rotate(45deg) translate(-5px, -7px); background: var(--danger); }

    .hero-content h1 { font-size: 2.5rem; }
    .slide img { height: 350px; }
}

/* --- Classes de Animação (Scroll Reveal) --- */
.hidden { opacity: 0; filter: blur(5px); transform: translateY(50px); transition: all 1s ease; }
.show { opacity: 1; filter: blur(0); transform: translateY(0); }
.delay-100 { transition-delay: 100ms; }
.delay-200 { transition-delay: 200ms; }
.delay-300 { transition-delay: 300ms; }
.delay-400 { transition-delay: 400ms; }

/* --- Estilos da Página de Login --- */

/* Fundo especial apenas para a página de login */
.login-body {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.login-wrapper {
    background: var(--white);
    width: 900px;
    max-width: 100%;
    height: 550px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.2);
    display: flex;
    overflow: hidden;
    position: relative;
}

/* Lado Esquerdo (Azul) */
.login-info {
    flex: 1;
    background: url('https://images.unsplash.com/photo-1581091226825-a6a2a5aee158?q=80&w=2070') center/cover;
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 40px;
    color: var(--white);
}

.login-info::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(26, 58, 95, 0.85); /* Sua cor primary com transparência */
}

.login-info h2, .login-info p, .login-info a {
    position: relative;
    z-index: 2;
}

.login-info h2 { font-size: 2rem; margin-bottom: 15px; }
.login-info p { margin-bottom: 30px; opacity: 0.9; }

.btn-outline-small {
    text-decoration: none;
    color: var(--white);
    border: 1px solid var(--white);
    padding: 8px 20px;
    border-radius: 4px;
    width: fit-content;
    transition: var(--transition);
    font-size: 0.85rem;
}
.btn-outline-small:hover { background: var(--white); color: var(--primary); }

/* Lado Direito (Formulário) */
.login-form-container {
    flex: 1;
    padding: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-light);
    position: relative;
}

.auth-form {
    width: 100%;
    max-width: 320px;
    display: none; /* Esconde por padrão */
    animation: fadeIn 0.5s ease;
}

.auth-form.active { display: block; } /* Mostra quando ativo */

.auth-form h3 {
    color: var(--primary);
    font-size: 1.8rem;
    margin-bottom: 25px;
    text-align: center;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-light);
}

.input-group input {
    width: 100%;
    padding: 12px 12px 12px 45px; /* Espaço para o ícone */
    border: 1px solid #ddd;
    border-radius: 6px;
    outline: none;
    transition: var(--transition);
    font-family: 'Roboto', sans-serif;
}

.input-group input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(26, 58, 95, 0.1);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: var(--primary);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

.btn-login:hover {
    background: var(--accent);
    color: var(--primary);
    transform: translateY(-2px);
}

.switch-text {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.switch-text span {
    color: var(--primary);
    font-weight: bold;
    cursor: pointer;
    text-decoration: underline;
}

/* Responsivo para Login */
@media (max-width: 768px) {
    .login-wrapper { flex-direction: column; height: auto; }
    .login-info { padding: 30px; text-align: center; align-items: center; }
    .login-form-container { padding: 40px 20px; }
}

/* --- Grid de Serviços (Substitui o Carrossel) --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 Colunas */
    gap: 25px;
    width: 100%;
}

.service-card {
    position: relative;
    height: 300px; /* Altura fixa para padrão visual */
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

/* Imagem de fundo */
.service-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s cubic-bezier(0.25, 0.45, 0.45, 0.95);
}

/* O gradiente escuro sobre a imagem */
.service-card::after {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to top, rgba(16, 37, 63, 0.95), rgba(16, 37, 63, 0.2));
    transition: var(--transition);
}

/* Conteúdo (Texto e ícone) */
.service-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 30px;
    z-index: 2;
    color: var(--white);
    transform: translateY(20px); /* Levemente descido */
    transition: var(--transition);
}

.service-content i {
    font-size: 2rem;
    color: var(--accent); /* Amarelo */
    margin-bottom: 15px;
    display: block;
    opacity: 0; /* Escondido inicialmente (opcional, pode deixar visível se preferir) */
    transform: translateY(20px);
    transition: all 0.4s ease 0.1s;
}

.service-content h3 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    font-weight: 700;
    color: var(--white);
}

.service-content p {
    font-size: 0.95rem;
    opacity: 0.8;
    max-height: 0; /* Truque para esconder o texto */
    overflow: hidden;
    transition: all 0.5s ease;
}

/* --- Efeitos de Hover (A Mágica) --- */

/* 1. Zoom na imagem */
.service-card:hover img {
    transform: scale(1.1);
}

/* 2. Escurece um pouco mais o fundo para ler melhor o texto */
.service-card:hover::after {
    background: linear-gradient(to top, rgba(16, 37, 63, 1), rgba(16, 37, 63, 0.4));
}

/* 3. Sobe o conteúdo */
.service-content {
    transform: translateY(0);
}

/* 4. Mostra o ícone subindo */
.service-card:hover .service-content i {
    opacity: 1;
    transform: translateY(0);
}

/* 5. Revela o texto explicativo */
.service-card:hover .service-content p {
    max-height: 100px; /* Altura suficiente para o texto */
    margin-top: 10px;
    opacity: 1;
}

/* Borda inferior amarela elegante */
.service-card::before {
    content: '';
    position: absolute;
    bottom: 0; left: 0; width: 0%; height: 4px;
    background: var(--accent);
    z-index: 3;
    transition: var(--transition);
}

.service-card:hover::before {
    width: 100%;
}

/* --- Responsividade --- */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr; /* 1 Coluna no celular */
    }
    
    .service-card {
        height: 250px; /* Um pouco menor no mobile */
    }
    
    /* No celular, talvez queira deixar o texto sempre visível */
    .service-content p {
        max-height: 100px;
        margin-top: 10px;
        opacity: 1;
    }
    .service-content i {
        opacity: 1;
        transform: translateY(0);
    }
    .service-content {
        transform: translateY(0);
    }
}

/* --- Centralizar o último card de serviços (Desktop) --- */
@media (min-width: 769px) {
    .services-grid .service-card:last-child {
        /* Faz o card ocupar a linha inteira (as 2 colunas) */
        grid-column: span 2;
        
        /* Centraliza o card na linha */
        justify-self: center;
        
        /* Define a largura para ser igual à dos outros cards.
           Cálculo: 50% da tela menos metade do gap de 25px */
        width: calc(50% - 12.5px); 
    }
}

/* =========================================
   PÁGINA FALE CONOSCO
========================================= */

/* Banner Reduzido */
.hero-contact {
    height: 60vh;
    min-height: 400px;
    background: url('https://images.unsplash.com/photo-1504307651254-35680f356dfd?q=80&w=2070') no-repeat center center/cover;
}

.hero-contact .hero-content {
    text-align: center;
    max-width: 900px;
    margin: 0 auto;
}

.hero-contact h1 {
    font-size: 3rem;
}

/* Cards de Informações */
.contact-info-section {
    position: relative;
    margin-top: -80px; /* Faz os cards sobreporem o banner igual na imagem */
    z-index: 10;
    padding-bottom: 40px;
}

.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    background: var(--white);
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.contact-card {
    padding: 30px 20px;
    text-align: center;
    border-right: 1px solid #eee;
}

.contact-card:last-child {
    border-right: none;
}

.contact-card h3 {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 1.3rem;
}

.contact-card .card-content p {
    color: var(--primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-weight: 500;
}

.contact-card .card-content a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition);
}

.contact-card .card-content a:hover {
    color: var(--accent);
}

.contact-card i {
    color: var(--primary);
}

.work-hours {
    display: block;
    margin-top: 15px;
    font-size: 0.9rem;
    color: var(--text-light);
}

.map-img-placeholder {
    width: 100%;
    max-width: 200px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    margin-top: 15px;
    opacity: 0.7;
    filter: grayscale(50%);
}

/* Formulário de Contato */
.form-container {
    background: var(--white);
    padding: 50px;
    border-radius: 12px;
    box-shadow: var(--shadow);
    max-width: 900px;
    margin: 0 auto;
}

.contact-form .form-group {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.contact-form .form-group-textarea {
    align-items: flex-start;
}

.contact-form label {
    width: 120px; /* Largura fixa para alinhar os inputs */
    font-weight: 600;
    color: var(--text-dark);
    text-align: right;
    padding-right: 20px;
}

.contact-form .form-group-textarea label {
    padding-top: 12px;
}

.contact-form input,
.contact-form textarea {
    flex: 1;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-family: 'Roboto', sans-serif;
    background: var(--bg-light);
    outline: none;
    transition: var(--transition);
}

.contact-form input:focus,
.contact-form textarea:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(26, 58, 95, 0.1);
}

.form-submit {
    display: flex;
    justify-content: flex-end;
    margin-top: 30px;
}

.form-submit .btn-primary {
    padding: 12px 40px;
    margin-right: 0;
}

/* Responsividade do Fale Conosco */
@media (max-width: 900px) {
    .contact-info-section {
        margin-top: 0;
        padding-top: 40px;
    }
    
    .contact-card {
        border-right: none;
        border-bottom: 1px solid #eee;
    }
    
    .contact-card:last-child {
        border-bottom: none;
    }
    
    .contact-form .form-group {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .contact-form label {
        width: 100%;
        text-align: left;
        margin-bottom: 8px;
        padding-right: 0;
    }
    
    .form-submit {
        justify-content: center;
    }
    
    .form-submit .btn-primary {
        width: 100%;
    }
}

/* Estilo para os títulos dos setores */
.sector-title {
    color: var(--primary) !important;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.sector-title i {
    font-size: 2rem;
    color: var(--accent);
}

/* Estilo para a caixa de seleção de setor no formulário */
.contact-form .form-select {
    flex: 1;
    padding: 15px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-family: 'Roboto', sans-serif;
    background: var(--bg-light);
    outline: none;
    transition: var(--transition);
    color: var(--text-dark);
    cursor: pointer;
}

.contact-form .form-select:focus {
    border-color: var(--primary);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(26, 58, 95, 0.1);
}