/*
Theme Name: Consulta CNPJ - Funil Completo
Theme URI: https://cnpjinteligente.com
Description: Tema WordPress para funil de captação de leads com validação de CNPJ
Version: 2.0
Author: Manus
Author URI: https://manus.im
License: GPL v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: consulta-cnpj
Domain Path: /languages
*/

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #DC3232;
    --secondary-color: #FF9F43;
    --text-color: #333;
    --light-gray: #F5F5F5;
    --border-color: #E8E8E8;
    --success-color: #27AE60;
    --error-color: #E74C3C;
}

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    color: var(--text-color);
    background-color: #FAFAFA;
    line-height: 1.6;
}

.site-main {
    min-height: 100vh;
    display: flex;
    
    /* MUDANÇA 1: De 'center' para 'flex-start' (alinha ao topo) */
    align-items: flex-start; 
    
    justify-content: center;
    
    /* MUDANÇA 2: Aumentamos o padding do topo para descer o formulário um pouco */
    /* Ordem: Topo | Direita | Baixo | Esquerda */
    padding: 20px 20px 20px 20px; 
}

.container-narrow {
    width: 30%;
    max-width: 500x;
    background: white;
    border-radius: 12px;
    padding: 50px;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.08);
}

/* Header */
.site-header {
    background: white;
    padding: 0px 0;
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
	align-items: center;
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    align-items: center;
    justify-content: center; /* MUDANÇA: De 'space-between' para 'center' */
}

.logo {
    height: 80px; /* MUDANÇA: Reduzi de 105px para 80px para ocupar menos espaço vertical */
    display: flex;
    align-items: center;
    justify-content: center; /* Garante que fica no meio */
}

.logo img {
    height: auto; 
    max-height: 70px; /* MUDANÇA: Define um tamanho máximo fixo para o logo ficar menor e elegante */
    width: auto;
}

/* Progress Bar */
.progress-bar-container {
    width: 100%;
    height: 6px;
    background-color: var(--border-color);
    border-radius: 3px;
    margin-bottom: 40px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 16.67%;
}

/* Form Styles */
.form-section {
    width: 100%;
}

.form-step-content {
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 10px;
    line-height: 1.4;
}

.form-title strong {
    color: var(--primary-color);
}

.form-subtitle {
    font-size: 14px;
    color: #999;
    margin-bottom: 30px;
}

.form-illustration {
    text-align: center;
    margin: 30px 0;
    min-height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.form-illustration svg {
    max-width: 100%;
    height: auto;
}

/* Radio Group */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 30px;
}

.radio-option {
    display: flex;
    align-items: center;
    padding: 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    background: white;
}

.radio-option:hover {
    border-color: var(--primary-color);
    background-color: #FFF5F5;
}

.radio-option input[type="radio"] {
    margin-right: 12px;
    cursor: pointer;
    width: 20px;
    height: 20px;
    accent-color: var(--primary-color);
}

.radio-option input[type="radio"]:checked + .radio-label {
    color: var(--primary-color);
    font-weight: 600;
}

.radio-option input[type="radio"]:checked {
    border-color: var(--primary-color);
}

.radio-option:has(input[type="radio"]:checked) {
    border-color: var(--primary-color);
    background-color: #FFF5F5;
}

.radio-label {
    font-size: 15px;
    color: var(--text-color);
    cursor: pointer;
    flex: 1;
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: all 0.3s ease;
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(220, 50, 50, 0.1);
}

.form-control::placeholder {
    color: #CCC;
}

.cnpj-validation-status {
    font-size: 12px;
    margin-top: 6px;
    min-height: 18px;
}

/* Buttons */
.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background-color: #C92A2A;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(220, 50, 50, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-secondary {
    background-color: var(--light-gray);
    color: var(--text-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: #F0F0F0;
    border-color: var(--text-color);
}

/* Loading Animation */
.loading-container {
    text-align: center;
    padding: 40px 0;
}

.loading-animation {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
}

.loading-animation div {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: var(--primary-color);
    animation: bounce 1.4s infinite ease-in-out both;
}

.loading-animation div:nth-child(1) {
    animation-delay: -0.32s;
}

.loading-animation div:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes bounce {
    0%, 80%, 100% {
        transform: scale(0);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

.loading-steps {
    margin-top: 40px;
}

.loading-step {
    margin-bottom: 20px;
    text-align: left;
}

.step-label {
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
}

.step-progress {
    height: 8px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    border-radius: 4px;
    width: 0%;
    box-shadow: 0 0 10px rgba(220, 50, 50, 0.3);
}

.loading-step:nth-child(1) .step-progress {
    animation: loadingBar 3s ease-in-out forwards;
    animation-delay: 0s;
}

.loading-step:nth-child(2) .step-progress {
    animation: loadingBar 3s ease-in-out forwards;
    animation-delay: 0.8s;
}

.loading-step:nth-child(3) .step-progress {
    animation: loadingBar 3s ease-in-out forwards;
    animation-delay: 1.6s;
}

@keyframes loadingBar {
    0% {
        width: 0%;
    }
    100% {
        width: 100%;
    }
}

/* Video Container */
.video-container {
    position: relative;
    width: 100%;
    padding-bottom: 56.25%;
    height: 0;
    overflow: hidden;
    border-radius: 12px;
    margin-bottom: 30px;
    background: #000;
}

.video-container iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
    border-radius: 12px;
}

/* Accordion */
.accordion {
    margin-top: 30px;
}

.accordion-item {
    border: 2px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.accordion-header {
    padding: 16px;
    background-color: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: all 0.3s ease;
    font-weight: 600;
    color: var(--text-color);
}

.accordion-header:hover {
    background-color: var(--light-gray);
}

.accordion-icon {
    color: var(--primary-color);
    font-size: 12px;
}

.accordion-content {
    display: none;
    padding: 16px;
    background-color: #FAFAFA;
    border-top: 2px solid var(--border-color);
    color: #666;
    font-size: 14px;
    line-height: 1.6;
}

/* Message */
.message {
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    font-size: 14px;
}

.message.success {
    display: block;
    background-color: #D4EDDA;
    color: #155724;
    border: 1px solid #C3E6CB;
}

.message.error {
    display: block;
    background-color: #F8D7DA;
    color: #721C24;
    border: 1px solid #F5C6CB;
}

/* Footer */
.site-footer {
    background: white;
    padding: 30px 0;
    border-top: 1px solid var(--border-color);
    margin-top: 60px;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    text-align: center;
    font-size: 13px;
    color: #999;
}

/* Responsive */
@media (max-width: 768px) {
    .container-narrow {
        padding: 25px;
    }

    .form-title {
        font-size: 20px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 14px;
    }

    .radio-option {
        padding: 12px;
    }

    .form-control {
        padding: 10px 12px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .site-main {
        padding: 10px;
    }

    .container-narrow {
        padding: 20px;
        border-radius: 8px;
    }

    .form-title {
        font-size: 18px;
    }

    .form-subtitle {
        font-size: 13px;
    }

    .btn {
        padding: 12px 16px;
        font-size: 13px;
    }

    .radio-group {
        gap: 10px;
    }

    .radio-option {
        padding: 10px;
    }

    .form-illustration {
        min-height: 120px;
    }
}
