/* ======================================== */
/* GERAL E VARIÁVEIS - TEMA CLARO */
/* ======================================== */
:root {
    --color-bg: #FFFFFF;
    --color-bg-light: #F8F9FA;
    --color-primary: #FF6E06;
    --color-text: #212529; /* Texto Principal Escuro */
    --color-text-light: #6C757D; /* Cinza para parágrafos */
    --font-heading: 'Exo 2', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --border-color: #DEE2E6;
}
* { margin: 0; padding: 0; box-sizing: border-box;}
html { scroll-behavior: smooth !important; }
body {
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
section { padding: 80px 0; overflow-x: hidden; }
.section-header { text-align: center; margin-bottom: 4rem; }
.subtitle {
    color: var(--color-primary);
    font-weight: 700;
    letter-spacing: 1px;
    margin-bottom: 1rem;
    display: block;
    text-transform: uppercase;
}
h1, h2, h3 { font-family: var(--font-heading); font-weight: 700; color: var(--color-text); }

/* ======================================== */
/* HEADER */
/* ======================================== */
.header {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(10px);
    padding: 1rem 0;
    position: fixed;
    width: 100%;
    z-index: 100;
    border-bottom: 1px solid var(--border-color);
}
.header .container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}
.logo img { max-height: 50px; }
.main-nav { display: flex; align-items: center; gap: 2rem; }
.main-nav a { color: var(--color-text); font-weight: 500; text-decoration: none; position: relative; }
.main-nav a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--color-primary);
    transition: width 0.3s ease;
}
.main-nav a:hover::after { width: 100%; }
.cta-button-header {
    border: 2px solid var(--color-primary);
    color: var(--color-primary);
    padding: 0.5rem 1.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s ease;
}
.cta-button-header:hover { background-color: var(--color-primary); color: #FFF; }

/* ======================================== */
/* HERO (COM IMAGEM DE FUNDO) */
/* ======================================== */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    background-image: url('../images/bg-transformador-de-energia.jpg');
    background-size: cover;
    background-position: center center;
    background-attachment: fixed;
}
.hero::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(255, 255, 255, 0.85);
    z-index: 1;
}
.hero-content {
    position: relative;
    z-index: 2;
    max-width: 700px;
}
.hero-content .subtitle { font-size: 1.1rem; }
.hero-content h1 {
    font-size: 3.8rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}
.hero-content p { font-size: 1.2rem; color: var(--color-text-light); margin-bottom: 2.5rem; }
.cta-button-main {
    background: linear-gradient(45deg, var(--color-primary), #E85D04);
    color: #FFF;
    padding: 1rem 2.5rem;
    border-radius: 5px;
    text-decoration: none;
    font-weight: 700;
    font-family: var(--font-heading);
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    transition: all 0.3s ease;
    border: none;
    box-shadow: 0 10px 20px rgba(255, 110, 6, 0.2);
}
.cta-button-main:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 30px rgba(255, 110, 6, 0.3);
}

/* ======================================== */
/* SOBRE */
/* ======================================== */
.sobre { background-color: var(--color-bg-light); border-top: 1px solid var(--border-color); }
.sobre .container { display: flex; align-items: center; gap: 4rem; }
.sobre-texto { flex: 1.5; }
.sobre-texto h2 { font-size: 2.8rem; margin-bottom: 1.5rem; }
.sobre-texto p { color: var(--color-text-light); line-height: 1.7; }
.sobre-diferenciais { flex: 1; display: flex; flex-direction: column; gap: 1rem; }
.diferencial-item {
    background-color: var(--color-bg);
    padding: 1.2rem;
    border-radius: 5px;
    border: 1px solid var(--border-color);
    border-left: 4px solid var(--color-primary);
    display: flex;
    align-items: center;
    gap: 1rem;
    font-weight: 500;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.diferencial-item:hover {
    transform: translateX(10px);
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}
.diferencial-item i { color: var(--color-primary); font-size: 1.2rem; }

/* ======================================== */
/* PRODUTOS */
/* ======================================== */
.produtos { padding-bottom: 6rem; }
.produto-wrapper {
    display: flex;
    flex-direction: column;
    gap: 6rem;
}
.produto-item {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    gap: 4rem;
}
.produto-item.reverse .produto-imagem { order: 2; }
.produto-item.reverse .produto-info { order: 1; }
.produto-imagem {
    height: 350px;
    background-color: var(--color-bg-light);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
}
.produto-imagem img {
    max-width: 100%;  /* Garante que a imagem nunca seja mais larga que o container */
    max-height: 100%; /* Garante que a imagem nunca seja mais alta que o container */
    object-fit: contain; /* Mantém a proporção e centraliza a imagem no espaço disponível */
}
.produto-info h3 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    color: var(--color-primary);
}
.produto-subtitulo {
    font-size: 1.1rem;
    color: var(--color-text-light);
    margin-bottom: 2rem;
    font-style: italic;
}
.produto-info ul {
    list-style: none;
    margin-bottom: 2rem;
    padding: 0;
}
.produto-info li {
    padding: 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    color: var(--color-text);
}
.produto-info li i { color: var(--color-primary); }

/* ======================================== */
/* SERVIÇOS */
/* ======================================== */
.servicos { background-color: var(--color-bg-light); border-top: 1px solid var(--border-color); }
.servicos-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.servico-card {
    background: var(--color-bg);
    padding: 2.5rem 2rem;
    border-radius: 5px;
    display: flex;
    flex-direction: column;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}
.servico-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-primary);
    box-shadow: 0 15px 30px rgba(0,0,0,0.07);
}
.servico-card h3 { font-size: 1.5rem; margin-bottom: 1rem; }
.servico-card p { color: var(--color-text-light); flex-grow: 1; }
.servico-card a {
    color: var(--color-primary);
    text-decoration: none;
    font-weight: 700;
    margin-top: 1.5rem;
    transition: all 0.3s ease;
}
.servico-card a:hover { padding-left: 10px; }

/* ======================================== */
/* GALERIA E LIGHTBOX */
/* ======================================== */
.galeria { padding-bottom: 6rem; }
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
}
.galeria-item {
    height: 250px;
    border-radius: 5px;
    overflow: hidden;
    cursor: pointer;
    position: relative;
    border: 1px solid var(--border-color);
}
.galeria-item::after {
    content: '\f00e';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6);
    color: #FFF;
    display: grid;
    place-items: center;
    font-size: 2.5rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.galeria-item:hover::after { opacity: 1; }
.galeria-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.galeria-item:hover img { transform: scale(1.1); }


.lightbox {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.9);
    display: flex; justify-content: center; align-items: center;
    z-index: 1000; opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.lightbox.active { opacity: 1; visibility: visible; }
.lightbox-content { position: relative; max-width: 90%; max-height: 80%; }
.lightbox-content img { max-width: 100%; max-height: 80vh; border-radius: 5px; }
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute; background: none; border: none;
    color: #FFF; font-size: 2.5rem; cursor: pointer; z-index: 1001;
}
.lightbox-close { top: 20px; right: 20px; }
.lightbox-prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 20px; top: 50%; transform: translateY(-50%); }

/* ======================================== */
/* CONTATO (COTAÇÕES) */
/* ======================================== */
.contato { background: var(--color-bg-light); border-top: 1px solid var(--border-color); }
.contact-form {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
}
.form-group { width: 100%; }
.form-group.half-width { width: calc(50% - 0.75rem); }
.form-group label { display: block; margin-bottom: 0.5rem; color: var(--color-text-light); }
.form-group input, 
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 1rem;
    background-color: var(--color-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 1rem;
    transition: border-color 0.3s ease;
}
.form-group input:focus, 
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--color-primary);
}
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%236C757D' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    background-size: 1em;
}

.radio-group {
    display: flex;
    gap: 1.5rem;
    background-color: var(--color-bg);
    border: 1px solid var(--border-color);
    padding: 1rem;
    border-radius: 5px;
}
.radio-group label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    color: var(--color-text);
}
.radio-group input[type="radio"] {
    appearance: none;
    width: 1.25em;
    height: 1.25em;
    border: 2px solid var(--color-text-light);
    border-radius: 50%;
    transition: all 0.2s ease-in-out;
    display: grid;
    place-content: center;
}
.radio-group input[type="radio"]::before {
    content: '';
    width: 0.75em;
    height: 0.75em;
    border-radius: 50%;
    transform: scale(0);
    transition: 120ms transform ease-in-out;
    background-color: var(--color-primary);
}
.radio-group input[type="radio"]:checked { border-color: var(--color-primary); }
.radio-group input[type="radio"]:checked::before { transform: scale(1); }

.hidden { display: none !important; }

#form-status { margin-top: 1.5rem; text-align: center; font-size: 1.1rem; }

/* ======================================== */
/* VALIDAÇÃO DO FORMULÁRIO (NOVO) */
/* ======================================== */
.form-group input.invalid,
.form-group textarea.invalid,
.form-group select.invalid {
    border-color: #DC3545; /* Vermelho para erro */
}
.error-message {
    color: #DC3545;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    min-height: 1em;
}

/* ======================================== */
/* FOOTER */
/* ======================================== */
.footer { 
    background-color: #1a1a1a; 
    color: #FFF; 
    font-size: 0.9rem; 
    padding: 6rem 0 2rem 0;
    position: relative;
}
.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--color-primary), transparent);
}
.footer .container { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 2rem; }
.footer h3 { margin-bottom: 1.5rem; color: #FFF; }
.footer p, .footer a { color: var(--color-text-light); text-decoration: none; transition: color 0.3s ease; }
.footer a:hover { color: var(--color-primary); }
.footer ul { list-style: none; padding: 0; }
.footer li { margin-bottom: 0.8rem; }
.footer-logo { max-height: 70px; margin-bottom: 1rem; filter: brightness(0) invert(1);}
.footer-contato p {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
}
.footer-contato i { color: var(--color-primary); font-size: 1.1rem; }
.footer-bottom { text-align: center; padding-top: 3rem; margin-top: 3rem; border-top: 1px solid #333; color: var(--color-text-light); }

/* ======================================== */
/* AVISO DE COOKIES (FALTANTE) */
/* ======================================== */
.cookie-consent-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: var(--color-bg-light);
    border-top: 1px solid var(--border-color);
    padding: 1.5rem 0;
    z-index: 1001; /* Fica acima de tudo */
    box-shadow: 0 -5px 20px rgba(0,0,0,0.08);
    transform: translateY(0);
    transition: transform 0.5s ease-in-out;
}
.cookie-consent-banner .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 2rem;
}
.cookie-content p {
    margin: 0;
    color: var(--color-text-light);
    font-size: 0.9rem;
}
.cookie-content a {
    color: var(--color-primary);
    text-decoration: underline;
    font-weight: 500;
}
.cookie-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}
.cta-button-cookie {
    padding: 0.6rem 1.2rem;
    border-radius: 5px;
    border: none;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.3s ease;
    background-color: var(--color-primary);
    color: #FFF;
}
.cta-button-cookie.secondary {
    background-color: transparent;
    color: var(--color-text-light);
    border: 1px solid var(--border-color);
}
.cta-button-cookie:hover {
    transform: translateY(-2px);
}
.cta-button-cookie.secondary:hover {
    background-color: var(--color-bg);
    color: var(--color-text);
}


/* ======================================== */
/* OUTROS */
/* ======================================== */
.whatsapp-float {
    position: fixed; bottom: 20px; right: 20px; background-color: #25D366;
    color: #FFF; width: 60px; height: 60px; border-radius: 50%;
    display: grid; place-items: center; font-size: 2rem;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3); z-index: 100;
    text-decoration: none; 
}

.page-content {
    padding: 140px 0 80px 0;
    background: #FFF;
}
.page-content h1 { font-size: 2.8rem; margin-bottom: 2rem; border-bottom: 2px solid var(--border-color); padding-bottom: 1rem; }
.page-content h2 { font-size: 1.8rem; margin-top: 2.5rem; margin-bottom: 1rem; }
.page-content p, .page-content li { line-height: 1.8; color: var(--color-text-light); margin-bottom: 1rem; }
.page-content ul { list-style-position: inside; padding-left: 1rem; }

/* ======================================== */
/* WHATSAPP FLOAT COM NOTIFICAÇÃO À DIREITA - CORRIGIDO */
/* ======================================== */
.whatsapp-float-container {    
    position: fixed;
    bottom: 20px;
    left: 40px;
    z-index: 1000;
    display: flex;
    align-items: center;    
    flex-direction: row-reverse;
    gap: 8px; /* Reduzido de 10px para 8px */
}

.whatsapp-float {
    background-color: #25D366;
    color: #FFF;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    font-size: 2rem;
    box-shadow: 0 5px 25px rgba(37, 211, 102, 0.3);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    animation: pulse-whatsapp 2s infinite;
    flex-shrink: 0; /* Garante que o botão não diminua */
}

.whatsapp-notification {
    background: white;
    padding: 10px 14px; /* Reduzido um pouco o padding */
    border-radius: 25px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.15);
    display: flex;
    align-items: center;   
    gap: 6px; /* Reduzido o gap interno */
    opacity: 0;
    transform: translateX(15px) scale(0.8); /* Reduzido o translateX */
    transition: all 0.3s ease;
    position: relative;
    bottom: 20px;
    right: 15px;
    max-width: 0;
    overflow: hidden;
    margin-right: 0; /* Garante que não há margem extra */
    height: min-content;
    align-self: center;
    margin: 0 !important;
}

.whatsapp-notification.show {
    opacity: 1;
    transform: translateX(0) scale(1);
    max-width: 180px; /* Ligeiramente menor */
}

.whatsapp-notification span {
    color: #333;
    font-size: 0.85rem; /* Um pouco menor */
    font-weight: 500;
    white-space: nowrap;
}

.notification-dot {
    width: 6px; /* Um pouco menor */
    height: 6px;
    background: #25D366;
    border-radius: 50%;
    animation: blink-dot 1.5s infinite;
    flex-shrink: 0;
}

@keyframes blink-dot {
    0%, 50% {
        opacity: 1;
    }
    51%, 100% {
        opacity: 0;
    }
}

/* ======================================== */
/* SCROLL TO TOP */
/* ======================================== */
.scroll-to-top {
    position: fixed;
    bottom: 40px;
    right: 20px;
    width: 50px;
    height: 50px;
    background: var(--color-primary);
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: grid;
    place-items: center;
    font-size: 1.2rem;
    box-shadow: 0 5px 20px rgba(255, 110, 6, 0.3);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all 0.3s ease;
    z-index: 1000;
    
    /* CORREÇÃO DO OVERFLOW */
    max-width: 100vw;
    box-sizing: border-box;
}

.scroll-to-top.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.scroll-to-top:hover {
    background: #E85D04;
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(255, 110, 6, 0.4);
}


/* ======================================== */
/* ANIMAÇÕES E RESPONSIVIDADE */
/* ======================================== */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.animate-on-scroll[data-animation="fade-in-up"] { transform: translateY(50px); }
.animate-on-scroll[data-animation="slide-in-left"] { transform: translateX(-50px); }
.animate-on-scroll[data-animation="slide-in-right"] { transform: translateX(50px); }
.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translate(0, 0);
}

@media (max-width: 900px) {
    .header .main-nav, .header .cta-button-header { display: none; }    
    .hero-content h1 { font-size: 2.5rem; }
    .sobre .container { flex-direction: column; }
    .servicos-grid { grid-template-columns: 1fr; }
    .form-group.half-width { width: 100%; }
    .subtitle { font-size: 1.3rem; }
    .footer .container { grid-template-columns: 1fr; text-align: left; }
    .footer-contato p { justify-content: left; }
    .footer-sobre { justify-content: center; text-align: left;}
    .produto-item { justify-content: center; text-align: center;}
    .produto-item, .produto-item.reverse { grid-template-columns: 1fr; gap: 2rem; }
    .produto-item.reverse .produto-imagem { order: 1; }
    .produto-info h3 {
        font-size: 2.1rem !important;
        word-break: break-word !important;
        overflow-wrap: break-word !important;
        max-width: 100% !important;
        display: block !important;
    }  
 
}

@media (max-width: 768px) {
    .cookie-consent-banner .container {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
     .whatsapp-float-container {
        bottom: 15px;
        left: 30px;
        gap: 6px; /* Ainda menor no mobile */
    }
    
    .whatsapp-float {
        width: 55px;
        height: 55px;
        font-size: 1.8rem;
    }
    
    .whatsapp-notification {
        padding: 8px 12px; /* Menor no mobile */
        gap: 5px;
    }
    
    .whatsapp-notification span {
        font-size: 0.8rem;
    }
    
    .whatsapp-notification.show {
        max-width: 160px;
    }

    .scroll-to-top {
        width: 45px;
        height: 45px;
        bottom: 35px;
        right: 15px;
        font-size: 1.1rem;
    }
}

@media (max-width: 600px) {
    section { padding: 60px 0; }
    .footer .container { gap: 3rem; }
    .whatsapp-notification.show {
        max-width: 160px;
    }
    
    .whatsapp-notification span {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .whatsapp-float-container {
        gap: 5px;
    }
    
    .whatsapp-notification.show {
        max-width: 140px;
    }
    
    .whatsapp-notification span {
        font-size: 0.75rem;
    }
}