/* Variáveis de Cores Baseadas no Logo */
:root {
    --bg-dark: #000000;
    --bg-light: #1a1a1a;
    --primary-blue: #0000ff;
    --primary-green: #66ff00;
    --text-light: #f4f4f4;
    --text-muted: #aaaaaa;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Montserrat', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

/* Tipografia */
h1, h2, h3 { font-weight: 800; margin-bottom: 20px; }
h1 { font-size: 3rem; line-height: 1.2; }
h2 { font-size: 2.2rem; }
p { margin-bottom: 20px; font-size: 1.1rem; color: var(--text-muted); }
.highlight-green { color: var(--primary-green); }

/* Botões */
.btn {
    display: inline-block;
    padding: 15px 30px;
    text-decoration: none;
    font-weight: 600;
    border-radius: 5px;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    text-align: center;
}
.btn-blue { background-color: var(--primary-blue); color: #fff; }
.btn-blue:hover { background-color: #0000cc; box-shadow: 0 0 15px var(--primary-blue); }
.btn-green { background-color: var(--primary-green); color: #000; }
.btn-green:hover { background-color: #55cc00; box-shadow: 0 0 15px var(--primary-green); }
.btn-outline-blue { border: 2px solid var(--primary-blue); color: var(--primary-blue); }
.btn-outline-blue:hover { background-color: var(--primary-blue); color: #fff; }
.btn-outline-green { border: 2px solid var(--primary-green); color: var(--primary-green); }
.btn-outline-green:hover { background-color: var(--primary-green); color: #000; }
.full-width { width: 100%; }

/* Header */
.main-header {
    background-color: rgba(255, 255, 255, 0.95);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #222;
}
.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
}
.logo img { max-height: 50px; }
.main-menu a {
    color: #1313fb;
    text-decoration: none;
    margin: 0 15px;
    font-weight: 600;
    transition: color 0.3s;
}
.main-menu a:hover { color: var(--primary-green); }
.cta-button {
    background-color: var(--primary-blue);
    color: white;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-weight: bold;
}
.cta-button:hover { background-color: var(--primary-green); color: #000; }

.admin-access-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 1.05rem;
    color: #ffffff;
    background: #101a3a;
    border: 1px solid #223f9a;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.admin-access-link:hover {
    transform: translateY(-1px);
    border-color: var(--primary-green);
    box-shadow: 0 0 14px rgba(102, 255, 0, 0.35);
}

/* Hero Section */
.hero {
    position: relative;
    padding: 220px 0 140px; /* Increased padding slightly for impact */
    text-align: center;
    overflow: hidden;
    background-color: var(--bg-dark); /* Fallback color */
}

.hero-content {
    position: relative;
    z-index: 2; /* Keeps the text above the images */
    background: rgba(10, 10, 10, 0.75); /* Dark overlay to make text readable */
    padding: 50px;
    border-radius: 15px;
    border: 1px solid rgba(102, 255, 0, 0.15); /* Subtle neon green border */
    backdrop-filter: blur(5px); /* Premium frosted glass effect */
}

.hero-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 40px;
}

/* Background Slideshow */
.hero-slideshow {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1; /* Keeps images behind the text */
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    animation: slideFade 12s infinite; /* 12 seconds total loop */
}

/* Slide 1: Indústria */
.slide-1 {
    background-image: url('../images/hero-industria.jpg'); /* Replace with your image file name */
    animation-delay: 0s;
}

/* Slide 2: Agro */
.slide-2 {
    background-image: url('../images/hero-agro.jpg'); /* Replace with your image file name */
    animation-delay: 6s; /* Starts halfway through the 12s loop */
}

/* The Animation Logic */
@keyframes slideFade {
    0% { opacity: 0; transform: scale(1); }
    15% { opacity: 0.6; } /* Max opacity is 0.6 to keep it dark/moody */
    45% { opacity: 0.6; }
    60% { opacity: 0; transform: scale(1.05); } /* Subtle zoom out effect */
    100% { opacity: 0; }
}

/* Authority Bar */
.authority-bar {
    /* Gradiente azul profundo que não some nas bordas */
    background: linear-gradient(90deg, #000522 0%, #001166 50%, #000522 100%);
    border-top: 2px solid var(--primary-blue);
    border-bottom: 2px solid var(--primary-blue);
    box-shadow: 0 10px 30px rgba(0, 0, 255, 0.2); /* Sombra mais projetada para dar volume */
    padding: 40px 0;
    position: relative;
    z-index: 10;
}
.authority-grid {
    display: flex;
    justify-content: space-around;
    text-align: center;
}
.auth-item { 
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    gap: 15px; 
    color: var(--text-light); 
    transition: transform 0.3s ease;
}

.auth-item:hover {
    transform: translateY(-5px);
    text-shadow: 0 0 10px rgba(0, 0, 255, 0.5);
}

.auth-item .icon { 
    font-size: 2.5rem; 
    filter: drop-shadow(0 0 8px rgba(0, 0, 255, 0.6));
}

/* Split Sections (Indústria & Agro) */
.split-section { padding: 100px 0; }
.split-container {
    display: flex;
    align-items: center;
    gap: 50px;
}
.reverse .split-container { flex-direction: row-reverse; }
.text-content { flex: 1; }
.image-content { flex: 1; }
/* Estilização das Imagens Reais */
.content-img {
    width: 100%;
    height: auto;
    max-height: 450px;
    object-fit: cover; /* Garante que a imagem preencha o espaço sem distorcer */
    border-radius: 15px;
    display: block;
    transition: transform 0.4s ease;
}

/* Efeito sutil de zoom ao passar o mouse */
.content-img:hover {
    transform: scale(1.02);
}

/* Mantendo os brilhos neon nas imagens */
.glow-blue {
    box-shadow: 0 10px 40px rgba(0, 0, 255, 0.15);
    border: 1px solid rgba(0, 0, 255, 0.3);
}

/* Descasc.AI logo link — clickability affordances */
/*
 * Pulse uses opacity on a ::after pseudo-element rather than animating
 * box-shadow directly. Opacity changes are GPU-composited and avoid per-frame
 * repaints, keeping the animation smooth on low-end devices.
 */
@keyframes descasc-pulse {
    0%, 100% { opacity: 0.3; }
    50%       { opacity: 0.85; }
}

.descasc-img-link {
    display: inline-block;
    cursor: pointer;
    border-radius: 15px;
    position: relative;
}

/* Static glow layer — opacity is what animates, not box-shadow */
.descasc-img-link::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 15px;
    box-shadow: 0 14px 50px rgba(0, 0, 255, 0.45), 0 0 24px 8px rgba(0, 0, 255, 0.3);
    animation: descasc-pulse 2.8s ease-in-out infinite;
    pointer-events: none;
}

.descasc-img-link img {
    display: block;
    transition: transform 0.3s ease;
}

.descasc-img-link:hover img,
.descasc-img-link:focus-visible img {
    transform: scale(1.04);
}

.descasc-img-link:hover::after,
.descasc-img-link:focus-visible::after {
    animation-play-state: paused;
    opacity: 1;
}

.descasc-img-link:focus-visible {
    outline: 3px solid var(--primary-blue);
    outline-offset: 4px;
}

@media (prefers-reduced-motion: reduce) {
    .descasc-img-link::after {
        animation: none;
        opacity: 0.6;
    }
    .descasc-img-link img {
        transition: none;
    }
    .descasc-img-link:hover img,
    .descasc-img-link:focus-visible img {
        transform: none;
    }
}

.glow-green {
    box-shadow: 0 10px 40px rgba(102, 255, 0, 0.1);
    border: 1px solid rgba(102, 255, 0, 0.3);
}

/* Gradientes Sutis no Fundo das Seções */
.industry-section {
    background: radial-gradient(circle at center, #0a0a1a 0%, var(--bg-dark) 100%);
}

.agro-section {
    background: radial-gradient(circle at center, #0d1a0a 0%, var(--bg-light) 100%);
}

/* Sobre Nós com Grid de Engenharia */
.about-section {
    padding: 100px 0;
    text-align: center;
    background-color: var(--bg-light);
    /* Cria um padrão de pontos sutis */
    background-image: radial-gradient(rgba(255, 255, 255, 0.05) 1px, transparent 1px);
    background-size: 20px 20px; /* Distância entre os pontos */
}
.about-image.large { height: 500px; margin-top: 40px; }

/* --- Grid de Casos de Sucesso nas Páginas Internas --- */
.case-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
}

.case-card {
    background-color: rgba(20, 20, 25, 0.8);
    padding: 40px;
    border-radius: 12px;
    border: 1px solid #222;
    transition: transform 0.3s ease;
    display: flex;
    flex-direction: column;
}

.case-card:hover { transform: translateY(-5px); }
.case-card h3 { font-size: 1.6rem; margin-bottom: 10px; color: #fff; }
.highlight-metric { font-size: 1.1rem; font-weight: 600; margin-bottom: 25px; }

/* Ajusta as cores de destaque dos textos baseados na seção */
.glow-blue .highlight-metric { color: #8888ff; }
.glow-green .highlight-metric { color: var(--primary-green); }

.case-details p { font-size: 1rem; color: #ccc; margin-bottom: 15px; line-height: 1.7; }
.case-details strong { color: #fff; }

/* Footer / Contato */
.footer-section { 
    padding: 80px 0; 
    /* Um azul ultra-escuro que desvanece para preto puro, conectando com a marca */
    background: radial-gradient(circle at bottom right, #00041a 0%, #050505 80%); 
    border-top: 3px solid var(--primary-green); 
}
.footer-container { display: flex; gap: 50px; }
.footer-info { flex: 1; }
.footer-logo { max-height: 60px; margin-bottom: 20px; }
.footer-info p { color: #ccc; margin-bottom: 10px; }
.footer-form { 
    flex: 1; 
    background: rgba(10, 10, 15, 0.6); /* Fundo super escuro com toque de azul */
    backdrop-filter: blur(12px); 
    padding: 40px; 
    border-radius: 15px; 
    border: 1px solid rgba(102, 255, 0, 0.2); 
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6), 0 0 20px rgba(102, 255, 0, 0.05); 
}

.footer-form h3 {
    color: #fff;
    margin-bottom: 25px;
    text-align: center;
}

/* Inputs Premium */
.footer-form input, .footer-form select, .footer-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 15px;
    /* Inputs um pouco mais escuros que o formulário para dar profundidade de "buraco" */
    background-color: rgba(15, 15, 15, 0.8); 
    border: 1px solid #444;
    color: white;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.footer-form input:focus, .footer-form select:focus, .footer-form textarea:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 10px rgba(102, 255, 0, 0.2);
    background-color: rgba(25, 25, 25, 0.9);
}

.social-links {
    display: flex;
    gap: 20px;
    margin-top: 25px;
}

.social-links a {
    color: #888; /* Cor neutra padrão */
    transition: color 0.3s ease, transform 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-links a:hover {
    color: var(--primary-green); /* Acende em verde ao passar o mouse */
    transform: translateY(-5px); /* Efeito sutil de "pulo" */
    filter: drop-shadow(0 0 8px rgba(102, 255, 0, 0.4)); /* Brilho neon */
}

/* --- Novo CSS do Cabeçalho e Menu --- */

/* Esconde o botão mobile e overlay por padrão */
.mobile-menu-toggle, .mobile-menu-overlay {
    display: none;
}

/* --- Media Query para Telas Pequenas (Celulares) --- */
@media (max-width: 768px) {
    /* 1. Ajuste do Cabeçalho Mobile - Mantém tudo em linha */
    .nav-container {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 10px 0;
    }

    /* 2. Esconde o Menu Desktop e CTA */
    .main-menu, .cta-button {
        display: none !important;
    }

    .admin-access-link {
        display: none !important;
    }

    /* 3. Mostra e Estiliza o Botão Hamburger (Estilo grid sutil) */
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        justify-content: space-between;
        width: 30px;
        height: 22px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        z-index: 1001;
    }
    .icon-bar {
        width: 100%;
        height: 3px;
        background-color: var(--primary-green); /* Usando a cor da marca */
        border-radius: 3px;
    }

    /* 4. Estiliza o Overlay Mobile (Como imagem_5.png) */
    .mobile-menu-overlay {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background-color: #fff; /* Fundo branco limpo, como na referência */
        z-index: 1002;
        padding: 40px;
        box-sizing: border-box;
        transition: transform 0.3s ease-in-out;
        transform: translateX(-100%); /* Esconde fora da tela à esquerda */
    }

    /* Quando a classe 'active' é adicionada via JS, o menu desliza para dentro */
    .mobile-menu-overlay.active {
        transform: translateX(0);
    }

    /* Cabeçalho do Overlay (Botão Fechar) */
    .overlay-header {
        display: flex;
        justify-content: flex-end;
        margin-bottom: 40px;
    }

    /* Botão de Fechar com o 'X' (Como o da referência) */
    .close-mobile-menu {
        background: transparent;
        border: none;
        color: #ff3333; /* Vermelho forte para o 'X' */
        font-size: 3rem;
        cursor: pointer;
        line-height: 1;
        padding: 0;
    }

    /* Links Verticais Mobile */
    .overlay-links {
        display: flex;
        flex-direction: column;
        gap: 30px;
    }
    .overlay-links a {
        color: #333; /* Texto escuro e limpo */
        text-decoration: none;
        font-size: 1.8rem;
        font-weight: 600;
        transition: color 0.3s;
    }

    .overlay-admin-link {
        color: #0b2a8f;
    }

    .overlay-links a:hover {
        color: var(--primary-green);
    }
}
/* --- Fim do Novo CSS do Menu Mobile --- */

/* Responsividade Básica */
@media (max-width: 768px) {
    .nav-container {
        display: flex !important;
        flex-direction: row !important; /* O segredo está aqui: força a linha horizontal */
        justify-content: space-between !important; /* Joga um para cada lado */
        align-items: center !important;
        padding: 15px 25px;
        width: 100%;
    }
    .logo img {
        max-height: 35px; 
    }
    .hero h1 { font-size: 2rem; }
    .hero-actions { flex-direction: column; }
    .split-container, .reverse .split-container, .footer-container { flex-direction: column; }
    .authority-grid { flex-direction: column; gap: 30px; }
}

/* --- Página de Links (Estilo Linktree) --- */
.links-page-body {
    background: radial-gradient(circle at top center, #00041a 0%, var(--bg-dark) 100%);
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    padding: 50px 20px;
}

.links-container {
    width: 100%;
    max-width: 600px; /* Mantém estreito mesmo no desktop */
    text-align: center;
}

.links-profile {
    margin-bottom: 40px;
}

.links-logo {
    max-width: 200px;
    margin-bottom: 20px;
}

.links-profile h1 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 5px;
}

.links-profile p {
    font-size: 1rem;
    color: var(--text-muted);
}

.links-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-bottom: 40px;
}

.link-btn {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 18px 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 10px;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

/* Reutilizando as cores base do sistema, mas adaptadas para blocos maiores */
.link-btn.btn-green { background-color: var(--primary-green); color: #000; }
.link-btn.btn-green:hover { background-color: #55cc00; transform: scale(1.02); }

.link-btn.btn-outline-green { background-color: transparent; border-color: var(--primary-green); color: var(--primary-green); }
.link-btn.btn-outline-green:hover { background-color: rgba(102, 255, 0, 0.1); transform: scale(1.02); }

.link-btn.btn-blue { background-color: var(--primary-blue); color: #fff; }
.link-btn.btn-blue:hover { background-color: #0000cc; transform: scale(1.02); }

.links-social {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.links-social a {
    color: var(--text-muted);
    transition: color 0.3s ease, transform 0.3s ease;
}

.links-social a:hover {
    color: var(--primary-green);
    transform: translateY(-3px);
}