/* --- CONFIGURAÇÕES GLOBAIS E VARIÁVEIS --- */
:root {
    --cor-fundo: #000000;
    --cor-fundo-card: #0A0A0A;
    --cor-texto-principal: #EAEAEA;
    --cor-texto-secundario: #A0A0A0;
    --cor-acento: #FFFFFF;
    --cor-borda: #222222;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--cor-fundo);
    color: var(--cor-texto-principal);
    -webkit-font-smoothing: antialiased;
}

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 25px;
}

/* --- ESPAÇAMENTO GERAL --- */
section {
    padding: 160px 0;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 90px;
    color: var(--cor-acento);
}

/* --- HEADER E NAVEGAÇÃO --- */
.header {
    padding: 30px 0;
    position: fixed;
    width: 100%;
    z-index: 100;
    background: transparent;
    transition: background-color: 0.3s ease;
}

.header.scrolled {
    background-color: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 700;
    font-size: 1.6rem;
    letter-spacing: 2.5px;
    z-index: 101;
}

.primary-navigation {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 40px;
}

.primary-navigation a {
    color: var(--cor-texto-principal);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
}

.primary-navigation a:hover {
    color: var(--cor-acento);
}

.cta-button-nav {
    background: transparent;
    color: var(--cor-acento);
    padding: 10px 25px;
    border-radius: 50px;
    border: 1px solid var(--cor-acento);
    transition: all 0.3s ease;
}

.cta-button-nav:hover {
    background-color: var(--cor-acento);
    color: var(--cor-fundo);
}

/* --- HERO SECTION --- */
#hero {
    text-align: center;
    padding: 240px 0 200px 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

#hero h1 {
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 30px;
    color: var(--cor-acento);
}

#hero .subtitle {
    font-size: 1.3rem;
    max-width: 700px;
    margin: 0 auto 60px;
    color: var(--cor-texto-secundario);
    font-weight: 300;
    line-height: 1.7;
}

.cta-button {
    background-color: var(--cor-acento);
    color: var(--cor-fundo);
    padding: 18px 45px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1.2rem;
    display: inline-block;
    border: 1px solid var(--cor-acento);
    transition: all 0.3s ease;
}

.cta-button:hover {
    background-color: transparent;
    color: var(--cor-acento);
    transform: scale(1.05);
}

/* --- SERVICES SECTION --- */
#services {
    padding-bottom: 100px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 50px;
}

.service-card {
    background-color: transparent;
    padding: 20px;
    border: 1px solid var(--cor-borda);
    border-radius: 10px;
    transition: all 0.3s ease;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--cor-acento);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 30px;
    color: var(--cor-acento);
}

.service-card h3 {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.service-card p {
    color: var(--cor-texto-secundario);
    font-weight: 300;
    font-size: 1.1rem;
    line-height: 1.8;
}

/* --- DIFERENCIAL SECTION --- */
#diferencial {
    background-color: var(--cor-fundo-card);
    text-align: center;
    border-top: 1px solid var(--cor-borda);
    padding-bottom: 160px;
}

#diferencial h3 {
    font-size: 2.5rem;
    font-weight: 600;
    margin-bottom: 25px;
}

#diferencial p {
    max-width: 750px;
    margin: 0 auto;
    color: var(--cor-texto-secundario);
    font-size: 1.2rem;
    font-weight: 300;
    line-height: 1.8;
}

/* --- FORMULÁRIO / SEÇÃO DE CONTATO --- */
#contato {
    padding: 0;
}

.title-bar-wrapper {
    background-color: var(--cor-fundo-card);
    padding: 80px 25px;
    border-bottom: 1px solid var(--cor-borda);
}

#contato .section-title {
    margin-bottom: 0;
}

#contato .container {
    padding-top: 120px;
    padding-bottom: 160px;
}

.form-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px auto;
    color: var(--cor-texto-secundario);
    font-weight: 300;
    font-size: 1.2rem;
}

.form-container {
    max-width: 750px;
    margin: 0 auto;
}

.form-group {
    position: relative;
    margin-bottom: 50px;
}

/* Estilo para o campo 'outra cidade' */
#other-city-group {
    max-height: 0;
    overflow: hidden;
    margin-bottom: 0;
    transition: max-height 0.5s ease-out, margin-bottom 0.5s ease-out;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 15px 0;
    border: none;
    border-bottom: 1px solid var(--cor-borda);
    background-color: transparent;
    color: var(--cor-texto-principal);
    font-size: 1.1rem;
    font-family: 'Poppins', sans-serif;
    transition: border-color 0.3s ease;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
    max-height: 250px;
}

.form-group label {
    position: absolute;
    top: 15px;
    left: 0;
    color: var(--cor-texto-secundario);
    transition: all 0.3s ease;
    pointer-events: none;
    font-size: 1.1rem;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.form-group input:not(:placeholder-shown),
.form-group textarea:not(:placeholder-shown),
.form-group select:valid {
    border-bottom-color: var(--cor-acento);
    outline: none;
}

.form-group input:focus + label,
.form-group textarea:focus + label,
.form-group select:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:not(:placeholder-shown) + label,
.form-group select:valid + label {
    top: -20px;
    font-size: 0.9rem;
    color: var(--cor-acento);
}

.form-group select {
    appearance: none;
}

/* --- ESTILO PARA FEEDBACK DE ERRO NO FORMULÁRIO --- */
.form-group.error input,
.form-group.error textarea,
.form-group.error select {
    border-bottom-color: #e74c3c;
}

.form-group.error label {
    color: #e74c3c;
}

#form-message {
    padding: 15px;
    border-radius: 5px;
    text-align: left;
    margin-bottom: 20px;
    font-weight: 600;
}

#form-message.error {
    color: #e74c3c;
    background-color: rgba(231, 76, 60, 0.1);
    border: 1px solid #e74c3c;
}

#form-message.success a {
    color: #22c55e;
    font-weight: bold;
    text-decoration: underline;
}

.cta-button-form {
    width: 100%;
    padding: 18px;
    border: 1px solid var(--cor-acento);
    border-radius: 50px;
    background-color: var(--cor-acento);
    color: var(--cor-fundo);
    font-weight: 700;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.cta-button-form:hover {
    background-color: transparent;
    color: var(--cor-acento);
}

/* --- FOOTER --- */
.footer {
    text-align: center;
    padding: 60px 0;
    border-top: 1px solid var(--cor-borda);
    color: var(--cor-texto-secundario);
    font-size: 1rem;
    font-weight: 300;
}

/* --- ESTILOS DO FOOTER SOCIAL --- */
.social-links {
    margin-top: 20px;
}

.social-links a {
    color: var(--cor-texto-secundario);
    text-decoration: none;
    font-size: 1.1rem;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--cor-acento);
}

.social-links a i {
    margin-right: 8px;
}

/* --- MENU MOBILE E RESPONSIVIDADE --- */
.mobile-nav-toggle { display: none; }

@media (max-width: 768px) {
    section {
        padding: 100px 0;
    }
    .primary-navigation {
        position: fixed;
        inset: 0 0 0 30%;
        flex-direction: column;
        justify-content: center;
        padding: min(20vh, 10rem) 2em;
        gap: 2.5em;
        background-color: rgba(0, 0, 0, 0.95);
        backdrop-filter: blur(10px);
        transform: translateX(100%);
        transition: transform 350ms ease-out;
    }

    .primary-navigation[data-visible="true"] {
        transform: translateX(0%);
    }

    .mobile-nav-toggle {
        display: block;
        position: absolute;
        z-index: 101;
        top: 2.5rem;
        right: 2rem;
        width: 2rem;
        height: 2rem;
        background: transparent;
        border: 0;
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="3" y1="12" x2="21" y2="12"></line><line x1="3" y1="6" x2="21" y2="6"></line><line x1="3" y1="18" x2="21" y2="18"></line></svg>');
        background-repeat: no-repeat;
        background-position: center;
    }
    
    .mobile-nav-toggle[aria-expanded="true"] {
        background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="white" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"></line><line x1="6" y1="6" x2="18" y2="18"></line></svg>');
    }
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --- ESTILOS DO MODAL DE AVISO PERSONALIZADO --- */
.custom-alert-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 200;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.custom-alert-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.custom-alert-box {
    background-color: var(--cor-fundo-card);
    padding: 30px 40px;
    border-radius: 10px;
    border: 1px solid var(--cor-borda);
    text-align: center;
    max-width: 500px;
    width: 90%;
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.custom-alert-overlay.visible .custom-alert-box {
    transform: scale(1);
}

.custom-alert-box h3 {
    color: var(--cor-acento);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.custom-alert-box p {
    color: var(--cor-texto-secundario);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 30px;
}

.custom-alert-box .cta-button-form {
    width: auto;
    padding: 12px 40px;
    margin-top: 0;
}

/* --- CORREÇÕES FINAIS PARA O SELETOR DE CIDADES --- */
.form-group select {
    background-color: var(--cor-fundo);
}

.form-group select option {
    background-color: var(--cor-fundo-card);
    color: var(--cor-texto-principal);
}

/* --- ESTILOS DO LOADING OVERLAY --- */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px);
    z-index: 300;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.loading-overlay.visible {
    opacity: 1;
    pointer-events: auto;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 5px solid var(--cor-borda);
    border-top-color: var(--cor-acento);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 20px;
}

.loading-overlay p {
    color: var(--cor-texto-secundario);
    font-size: 1.2rem;
    font-weight: 600;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}