/* ==========================================================================
   VARIÁVEIS CSS E CONFIGURAÇÕES GLOBAIS
   ========================================================================== */
:root {
    /* Cores principais */
    --primary-color: #1a3a5c;
    --primary-hover: #2a4a6c;
    --secondary-color: #4a9eff;

    /* Cores de texto */
    --text-dark: #333333;
    --text-light: #666666;

    /* Cores de fundo e bordas */
    --border-color: #e0e0e0;
    --background-light: #f9f9f9;
    --white: #ffffff;

    /* Cores especiais */
    --success-color: #27ae60;

    /* Efeitos */
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    --transition: 0.3s ease;
}

/* Variáveis específicas para modo escuro */
body.dark-mode {
    --background-light: #121212;
    --white: #1e1e1e;
    --text-dark: #e0e0e0;
    --text-light: #b0b0b0;
    --border-color: #3578cf;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --border: 2px solid #fff;
}

body.dark-mode .header {
    background-color: rgba(26, 58, 92, 0.95) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   RESET E ESTILOS BASE
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    background-color: var(--white);
    color: var(--text-dark);
    transition: var(--transition);
    line-height: 1.6;
}

/* Container principal centralizado */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   CABEÇALHO (HEADER)
   ========================================================================== */
.header {
    position: static;
    width: 100%;
    padding: 18px 0;
    background: rgba(26, 58, 92, 0.95);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 50px;
}

.logo {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.logo-img {
    height: 90px;
    width: auto;
    object-fit: contain;
    transition: opacity 0.3s ease;
}

.logo-img:hover {
    opacity: 0.8;
}

/* Menu de navegação desktop */
.nav {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: #ffffff;
    font-weight: 600;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.1rem;
    transition: var(--transition);
    padding: 1.25rem 0;
}

.nav-link:hover {
    color: var(--secondary-color);
}

/* Botão hambúrguer (mobile) */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 24px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 201;
}

.hamburger span {
    width: 30px;
    height: 3px;
    background: #ffffff;
    border-radius: 10px;
    transition: all 0.3s linear;
    position: relative;
    transform-origin: 1px;
}

/* Animação hambúrguer → X */
.hamburger.active {
    position: fixed;
    top: 18px;
    right: 18px;
    z-index: 1100;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg);
}

/* ==========================================================================
   BOTÕES FLUTUANTES (TEMA E VOLTAR AO TOPO)
   ========================================================================== */
.theme-toggle-btn,
.back-to-top-btn {
    position: fixed;
    bottom: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    border: 2px solid #fff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: var(--transition);
}

.theme-toggle-btn {
    right: 30px;
    width: 60px;
    height: 60px;
    background-color: #1a3a5c;
    font-size: 28px;
}

.theme-toggle-btn:hover {
    transform: scale(1.1);
    background-color: #2a4a6c;
}

body.dark-mode .theme-toggle-btn {
    background-color: #1a3a5c;
    border-color: #fff;
}

#themeIcon {
    width: 37px;
    height: 40px;
}

.back-to-top-btn {
    left: 30px;
    width: 60px;
    height: 60px;
    background-color: #1a3a5c;
    border-color: #fff;
    font-size: 28px;
    opacity: 0;
    visibility: hidden;
}

.back-to-top-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    line-height: 1;
}

.back-to-top-btn.visible {
    opacity: 1;
    visibility: visible;
}

.back-to-top-btn:hover {
    transform: translateY(-5px);
    background-color: var(--primary-hover);
}

/* ==========================================================================
   SEÇÃO HERO DA PÁGINA DE CONTATO
   ========================================================================== */
.hero-page {
    background-color: var(--primary-color);
    color: #ffffff;
    padding: 80px 20px;
    text-align: center;
}

.hero-page-content h1 {
    font-size: 3rem;
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
    margin-bottom: 15px;
}

.hero-page-content p {
    font-size: 1.2rem;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.9;
}

/* ==========================================================================
   SEÇÃO PRINCIPAL DO FORMULÁRIO
   ========================================================================== */
.cadastro-section {
    padding: 80px 20px;
    background: var(--background-light);
}

.cadastro-form-wrapper {
    background: var(--white);
    padding: 50px;
    border-radius: 20px;
    box-shadow: var(--shadow);
    max-width: 900px;
    margin: 0 auto;
}

.cadastro-form-wrapper h2 {
    font-family: 'Montserrat', sans-serif;
    font-size: 2.2rem;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-align: center;
}

body.dark-mode .cadastro-form-wrapper h2 {
    color: var(--secondary-color);
}

.cadastro-subtitle {
    text-align: center;
    color: var(--text-light);
    margin-bottom: 40px;
}

/* Fieldset do formulário */
.form-section {
    border: none;
    margin-bottom: 30px;
}

.form-section legend {
    font-family: 'Montserrat', sans-serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--secondary-color);
    width: 100%;
}

body.dark-mode .form-section legend {
    color: var(--secondary-color);
}

/* Campos do formulário */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

#cnpjContainer {
    display: none;
}

#cpfContainer,
#cnpjContainer {
    grid-template-columns: 1fr;
}

.form-group-placeholder,
.form-group-placeholder input {
    display: none;
}

label {
    font-weight: 600;
    font-size: 0.95rem;
}

input,
select,
textarea {
    width: 100%;
    padding: 14px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 1rem;
    background-color: var(--white);
    color: var(--text-dark);
    transition: var(--transition);
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(74, 158, 255, 0.1);
}

/* ==========================================================================
   ESTILOS PARA OS BOTÕES DE TOGGLE (PESSOA FÍSICA / JURÍDICA)
   ========================================================================== */
.toggle-buttons {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
}

.toggle-btn {
    flex: 1;
    padding: 14px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    background-color: var(--white);
    color: var(--text-dark);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: 'Montserrat', sans-serif;
}

.toggle-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

.toggle-btn.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
    box-shadow: 0 4px 12px rgba(26, 58, 92, 0.2);
}

.toggle-btn.active:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
}

/* Modo escuro para os botões de toggle */
body.dark-mode .toggle-btn {
    background-color: #1e1e1e;
    color: var(--text-light);
    border-color: #333333;
}

body.dark-mode .toggle-btn:hover {
    border-color: var(--secondary-color);
    color: var(--secondary-color);
}

body.dark-mode .toggle-btn.active {
    background-color: var(--secondary-color);
    color: #1a3a5c;
    border-color: var(--secondary-color);
}

body.dark-mode .toggle-btn.active:hover {
    background-color: #6bb3ff;
    border-color: #6bb3ff;
}

/* ==========================================================================
   SELETOR PERSONALIZADO DE CURSOS
   ========================================================================== */
.custom-select-container {
    position: relative;
}

#curso {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%231a3a5c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 18px;
}

body.dark-mode #curso {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%234a9eff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
}

.courses-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--white);
    border: 2px solid var(--border-color);
    border-radius: 10px;
    z-index: 1000;
    max-height: 250px;
    overflow-y: auto;
    margin-top: 8px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.courses-dropdown.active {
    display: block;
}

.course-option {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition);
}

.course-option:hover {
    background-color: rgba(74, 158, 255, 0.1);
    color: var(--secondary-color);
}

/* Tags dos cursos selecionados */
.course-tag {
    background: var(--primary-color);
    color: white;
    padding: 8px 15px;
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: fadeIn 0.3s ease;
}

.selected-courses-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.remove-course-btn {
    background: transparent;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
}

/* Resumo de orçamento */
#budgetSummary {
    display: none;
    background: #eef6ff;
    padding: 15px;
    border-radius: 8px;
    margin: 20px 0;
    font-weight: 700;
    color: var(--primary-color);
    justify-content: space-between;
    border-left: 4px solid var(--secondary-color);
    transition: var(--transition);
}

body.dark-mode #budgetSummary {
    background: #1a2635 !important;
    color: var(--secondary-color) !important;
}

/* ==========================================================================
   BOTÕES DO FORMULÁRIO
   ========================================================================== */
.form-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

.btn {
    flex: 1;
    padding: 16px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    font-family: 'Montserrat', sans-serif;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(26, 58, 92, 0.3);
}

.btn-secondary {
    background-color: #e0e0e0;
    color: var(--text-dark);
}

.btn-secondary:hover {
    background-color: #d0d0d0;
}

body.dark-mode .btn-secondary {
    background-color: #333;
    color: #fff;
}

/* ==========================================================================
   SEÇÃO WHATSAPP (ALTERNATIVA)
   ========================================================================== */
.whatsapp-alternative {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 1px solid var(--border-color);
}

.alt-title {
    font-weight: 700;
    margin-bottom: 20px;
    text-align: center;
    color: var(--text-dark);
}

.whatsapp-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background-color: #f0fff4;
    border: 2px solid #c6f6d5;
    padding: 25px;
    border-radius: 15px;
}

body.dark-mode .whatsapp-box {
    background-color: #1a2e23;
    border-color: #2d4a3a;
}

.whatsapp-call {
    font-weight: 800;
    color: var(--primary-color);
    font-size: 1.1rem;
    margin-bottom: 5px;
}

body.dark-mode .whatsapp-call {
    color: #4ade80;
}

.whatsapp-number-main {
    font-size: 1.5rem;
    font-weight: 800;
    color: #2a8b73;
}

.whatsapp-btn {
    background-color: #25d366;
    color: white !important;
    text-decoration: none;
    padding: 14px 25px;
    border-radius: 10px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.whatsapp-btn:hover {
    background-color: #128c7e;
    transform: scale(1.05);
}

.whatsapp-number-sub {
    text-align: center;
    font-size: 0.85rem;
    margin-top: 8px;
    opacity: 0.7;
}

/* ==========================================================================
   RODAPÉ (FOOTER)
   ========================================================================== */
/* Footer padronizado via css/styles.css (mesmo da página inicial) */

/* ==========================================================================
   MENSAGENS DE STATUS
   ========================================================================== */
.success-message {
    display: none;
    color: var(--success-color);
    text-align: center;
    margin-top: 20px;
    font-weight: 600;
    padding: 20px;
    border-radius: 10px;
    background: rgba(39, 174, 96, 0.1);
}

/* ==========================================================================
   RESPONSIVIDADE
   ========================================================================== */
@media (max-width: 992px) {
    /* Menu mobile */
    .hamburger {
        display: flex;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 250px;
        background: rgba(26, 58, 92, 0.98);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2.5rem;
        transition: right 0.4s ease-in-out;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.2);
        z-index: 1001;
    }

    .nav.active {
        right: 0;
    }

    .hamburger.active {
        z-index: 1002;
    }

    /* Formulário responsivo */
    .form-row {
        grid-template-columns: 1fr;
    }

    .whatsapp-box {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
}

@media (max-width: 767px) {
    .header-content {
        padding: 1rem 18px;
    }

    .hamburger {
        display: flex;
    }

    .logo-img {
        height: 60px;
    }

    .hero-page-content h1 {
        font-size: 2.2rem;
    }

    .cadastro-form-wrapper {
        padding: 30px 20px;
        margin: 0 10px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    /* Botões flutuantes menores */
    .theme-toggle-btn,
    .back-to-top-btn {
        width: 50px;
        height: 50px;
        font-size: 22px;
    }

    .theme-toggle-btn {
        bottom: 15px;
        right: 15px;
    }

    #themeIcon {
        width: 30px;
        height: 33px;
    }

    .back-to-top-btn {
        bottom: 15px;
        left: 15px;
    }

    .toggle-buttons {
        gap: 10px;
    }

    .toggle-btn {
        padding: 12px 14px;
        font-size: 0.9rem;
    }
}

/* Suporte a reduced motion (acessibilidade) */
@media (prefers-reduced-motion: reduce) {
    * {
        transition: none !important;
        animation: none !important;
    }
}