/* ===================================
   RESET
   =================================== */

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

/* Variáveis CSS importadas de variables.css */
@import url('variables.css');

/* ===================================
   ESTILOS GLOBAIS
   =================================== */

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.6;
    background: var(--bg-light);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: clamp(0.5rem, 2vw, 2rem) clamp(0.5rem, 2vw, 1rem);
}

/* ===================================
   CONTAINER PRINCIPAL
   =================================== */

.form-container {
    width: 100%;
    max-width: min(800px, 100vw);
    background-color: var(--bg-white);
    border-radius: clamp(8px, 2vw, 16px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    position: relative;
}

/* ===================================
   BARRA DE PROGRESSO
   =================================== */

.progress-bar {
    width: 100%;
    height: 8px;
    background: linear-gradient(90deg, var(--bg-light) 0%, var(--bg-gray) 100%);
    position: relative;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    box-shadow: 0 2px 8px rgba(4, 107, 210, 0.4);
    width: 0%;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 4px 4px 0;
}

/* ===================================
   CONTEÚDO DO FORMULÁRIO
   =================================== */

.form-content {
    padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 3vw, 2rem);
    min-height: clamp(400px, 60vh, 500px);
}

/* ===================================
   STEPS
   =================================== */

.form-step {
    display: none;
    animation: fadeIn 0.5s ease;
}

.form-step.active {
    display: block;
}

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

.step-content {
    max-width: 600px;
    margin: 0 auto;
}

.step-number {
    font-size: 0.875rem;
    color: var(--text-light);
    margin-bottom: 1rem;
    font-weight: 500;
}

.step-label {
    font-family: var(--font-heading);
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    font-weight: 600;
    color: var(--text-dark);
    display: block;
    margin-bottom: clamp(1rem, 2vw, 1.5rem);
    line-height: 1.4;
    max-width: 100%;
    word-wrap: break-word;
    hyphens: auto;
}

.field-description {
    font-size: 0.95rem;
    color: var(--text-light);
    margin-top: 0.5rem;
    margin-bottom: 1rem;
}

/* ===================================
   WELCOME STEP
   =================================== */

.welcome-step {
    text-align: center;
}

.welcome-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.welcome-step h1 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2.25rem);
    color: var(--text-dark);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.welcome-text {
    font-size: clamp(1rem, 2vw, 1.125rem);
    color: var(--text-medium);
    margin-bottom: clamp(1.5rem, 3vw, 2rem);
    line-height: 1.6;
}

.welcome-benefits {
    text-align: left;
    max-width: 500px;
    margin: 0 auto 2rem;
}

.benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.benefit-icon {
    color: var(--success-color);
    font-weight: bold;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.benefit-item span {
    color: var(--text-medium);
}

.welcome-time {
    font-size: 1rem;
    color: var(--text-medium);
    margin-bottom: 2rem;
}

/* ===================================
   INPUTS
   =================================== */

.form-input,
.form-textarea {
    width: 100%;
    padding: 1rem;
    font-family: var(--font-body);
    font-size: 1.125rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    transition: var(--transition);
    background-color: var(--bg-white);
    color: var(--text-dark);
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(4, 107, 210, 0.1);
}

/* Indicador visual de campo válido - AZUL CloudFaster */
.form-input:valid:not(:placeholder-shown),
.form-textarea:valid:not(:placeholder-shown) {
    border-color: var(--primary-color); /* Azul ao invés de verde */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23046bd2' viewBox='0 0 16 16'%3E%3Cpath d='M13.854 3.646a.5.5 0 0 1 0 .708l-7 7a.5.5 0 0 1-.708 0l-3.5-3.5a.5.5 0 1 1 .708-.708L6.5 10.293l6.646-6.647a.5.5 0 0 1 .708 0z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
    box-shadow: 0 0 0 3px rgba(4, 107, 210, 0.1); /* Glow azul suave */
}

/* Indicador visual de campo inválido após interação */
.form-input:invalid:not(:placeholder-shown):not(:focus),
.form-textarea:invalid:not(:placeholder-shown):not(:focus) {
    border-color: var(--error-color);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='%23EF4444' viewBox='0 0 16 16'%3E%3Cpath d='M8 15A7 7 0 1 1 8 1a7 7 0 0 1 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z'/%3E%3Cpath d='M7.002 11a1 1 0 1 1 2 0 1 1 0 0 1-2 0zM7.1 4.995a.905.905 0 1 1 1.8 0l-.35 3.507a.552.552 0 0 1-1.1 0L7.1 4.995z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 3rem;
}

.form-textarea {
    resize: vertical;
    min-height: clamp(100px, 15vh, 120px);
    max-height: 300px;
}

/* ===================================
   OPTIONS (BUTTONS)
   =================================== */

.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: clamp(0.75rem, 2vw, 1rem);
    margin-bottom: 2rem;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 2rem;
}

.option-button {
    width: 100%;
    padding: clamp(1rem, 2vw, 1.25rem) clamp(1rem, 2vw, 1.5rem);
    font-family: var(--font-body);
    font-size: clamp(0.9375rem, 2vw, 1rem);
    font-weight: 500;
    text-align: left;
    background-color: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: clamp(8px, 2vw, 12px);
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-dark);
    word-wrap: break-word;
    hyphens: auto;
}

.option-button:hover {
    background-color: var(--bg-white);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.option-button.selected {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    color: var(--bg-white);
}

/* ===================================
   CHECKBOX OPTIONS
   =================================== */

.checkbox-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.checkbox-option {
    display: flex;
    align-items: center;
    gap: clamp(0.75rem, 2vw, 1rem);
    padding: clamp(0.875rem, 2vw, 1rem);
    background-color: var(--bg-light);
    border: 2px solid var(--border-color);
    border-radius: clamp(6px, 1.5vw, 8px);
    cursor: pointer;
    transition: var(--transition);
    flex-wrap: wrap;
}

.checkbox-option:hover {
    background-color: var(--bg-white);
    border-color: var(--primary-color);
}

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

.checkbox-option span {
    flex: 1 1 auto;
    min-width: 0;
    font-size: clamp(0.9375rem, 2vw, 1rem);
    color: var(--text-dark);
    word-wrap: break-word;
}

.checkbox-option input[type="checkbox"]:checked + span {
    font-weight: 600;
}

/* ===================================
   CONSENT BOX
   =================================== */

.consent-box {
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
    margin: 2rem 0;
}

.consent-checkbox {
    background-color: transparent;
    border: none;
    padding: 0;
}

.consent-checkbox span {
    font-size: 0.95rem;
    line-height: 1.6;
}

.consent-checkbox a {
    color: var(--primary-color);
    text-decoration: underline;
}

/* ===================================
   BOTÕES
   =================================== */

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    border: 2px solid transparent;
    text-decoration: none;
}

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

.btn-primary:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

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

.btn-secondary:hover {
    background-color: var(--bg-light);
    border-color: var(--text-medium);
}

.btn-large {
    padding: 1.125rem 2.5rem;
    font-size: 1.125rem;
}

.btn-submit {
    background-color: var(--success-color);
}

.btn-submit:hover {
    background-color: #059669;
}

.btn-whatsapp {
    background-color: #25D366;
    color: var(--bg-white);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.btn-whatsapp:hover {
    background-color: #1EBE57;
}

.whatsapp-icon {
    font-size: 1.5rem;
}

/* ===================================
   NAVEGAÇÃO DO FORMULÁRIO
   =================================== */

.form-navigation {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-hint {
    text-align: center;
    margin-top: 1rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

.form-hint strong {
    color: var(--text-medium);
}

/* ===================================
   SUCCESS STEP
   =================================== */

.success-step {
    text-align: center;
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 1rem;
}

.success-step h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.5rem, 4vw, 2rem);
    color: var(--success-color);
    margin-bottom: 1rem;
    line-height: 1.2;
}

.success-text {
    font-size: 1.125rem;
    color: var(--text-medium);
    margin-bottom: 1rem;
}

.next-steps {
    text-align: left;
    max-width: 500px;
    margin: 2rem auto;
    background-color: var(--bg-light);
    padding: 1.5rem;
    border-radius: 8px;
}

.next-steps h3 {
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

.next-steps ol {
    padding-left: 1.5rem;
}

.next-steps li {
    margin-bottom: 0.75rem;
    color: var(--text-medium);
}

.cta-whatsapp {
    margin: 2rem 0;
    padding: 2rem;
    background: linear-gradient(135deg, #25D366 0%, #1EBE57 100%);
    border-radius: 12px;
    color: var(--bg-white);
}

.cta-whatsapp p {
    color: var(--bg-white);
    margin-bottom: 1rem;
}

.cta-whatsapp .btn-whatsapp {
    margin-top: 1rem;
}

.additional-resources {
    text-align: left;
    max-width: 500px;
    margin: 2rem auto;
}

.additional-resources ul {
    list-style: none;
    padding: 0;
}

.additional-resources li {
    margin-bottom: 0.75rem;
    color: var(--text-medium);
}

/* ===================================
   LOADING OVERLAY
   =================================== */

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    z-index: 9999;
}

.loading-overlay.active {
    display: flex;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 5px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--bg-white);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 1rem;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.loading-overlay p {
    color: var(--bg-white);
    font-size: 1.125rem;
}

/* ===================================
   RESPONSIVIDADE - MOBILE FIRST
   =================================== */

/* Tablet (768px - 1023px) */
@media (max-width: 1023px) and (min-width: 768px) {
    .form-container {
        max-width: 700px;
    }

    .form-content {
        padding: 2.5rem 2rem;
    }

    .options-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    }

    .benefit-item {
        font-size: 0.9375rem;
    }
}

/* Tablet portrait e mobile landscape (481px - 767px) */
@media (max-width: 767px) and (min-width: 481px) {
    body {
        padding: 1.5rem 1rem;
    }

    .form-container {
        border-radius: 12px;
    }

    .form-content {
        padding: 2rem 1.5rem;
        min-height: 450px;
    }

    .step-number {
        font-size: 0.8125rem;
        margin-bottom: 0.875rem;
    }

    .options-grid {
        grid-template-columns: 1fr;
        gap: 0.875rem;
    }

    .options-list {
        gap: 0.875rem;
    }

    .form-navigation {
        gap: 0.875rem;
    }

    .benefit-item {
        gap: 0.625rem;
    }

    .benefit-item span {
        font-size: 0.9375rem;
    }

    .welcome-benefits {
        margin-bottom: 1.5rem;
    }

    /* Success step em tablets */
    .next-steps {
        padding: 1.25rem;
    }

    .cta-whatsapp {
        padding: 1.5rem;
    }
}

/* Mobile (até 767px) */
@media (max-width: 767px) {
    body {
        padding: clamp(0.5rem, 2vw, 1rem);
        align-items: flex-start;
    }

    .form-container {
        margin: 0;
        border-radius: 12px;
    }

    .form-content {
        padding: clamp(1.25rem, 3vw, 2rem) clamp(1rem, 2.5vw, 1.5rem);
        min-height: auto;
    }

    .step-content {
        max-width: 100%;
    }

    .step-number {
        font-size: 0.8125rem;
    }

    .options-grid {
        grid-template-columns: 1fr;
    }

    .options-list {
        gap: 0.75rem;
    }

    .form-navigation {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }

    .btn {
        width: 100%;
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    /* Welcome step mobile */
    .welcome-benefits {
        max-width: 100%;
    }

    .benefit-item {
        gap: 0.625rem;
        margin-bottom: 0.875rem;
    }

    .benefit-icon {
        font-size: 1.125rem;
    }

    .benefit-item span {
        font-size: 0.9375rem;
        line-height: 1.5;
    }

    /* Success step mobile */
    .next-steps {
        padding: 1.25rem;
    }

    .next-steps h3 {
        font-size: 1.125rem;
    }

    .next-steps li {
        font-size: 0.9375rem;
        margin-bottom: 0.625rem;
    }

    .cta-whatsapp {
        padding: 1.5rem;
    }

    .additional-resources {
        max-width: 100%;
    }

    /* Modal mobile */
    .modal-content {
        padding: 2rem 1.5rem;
        width: 92%;
    }

    .modal-icon {
        width: 70px;
        height: 70px;
        font-size: 2.5rem;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-message {
        font-size: 1rem;
    }
}

/* Mobile pequeno (até 480px) */
@media (max-width: 480px) {
    body {
        padding: 0.5rem;
    }

    .form-container {
        border-radius: 8px;
        max-width: 100%;
    }

    .form-content {
        padding: 1.25rem 1rem;
    }

    .step-number {
        font-size: 0.75rem;
        margin-bottom: 0.75rem;
    }

    .field-description {
        font-size: 0.875rem;
    }

    .form-input,
    .form-textarea {
        padding: 0.875rem;
        font-size: 1rem; /* 16px mínimo para evitar zoom no iOS */
    }

    .option-button {
        padding: 0.875rem 1rem;
        font-size: 0.9375rem;
    }

    .checkbox-option {
        padding: 0.75rem;
        gap: 0.625rem;
    }

    .checkbox-option input[type="checkbox"] {
        width: 18px;
        height: 18px;
    }

    .checkbox-option span {
        font-size: 0.9375rem;
    }

    .btn {
        padding: 0.875rem 1.25rem;
        font-size: 0.9375rem;
    }

    .btn-large {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }

    .form-navigation {
        gap: 0.625rem;
    }

    .form-hint {
        font-size: 0.8125rem;
    }

    /* Welcome step pequeno */
    .welcome-icon {
        font-size: 3rem;
        margin-bottom: 0.75rem;
    }

    .welcome-time {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
    }

    .benefit-item {
        margin-bottom: 0.75rem;
    }

    /* Success step pequeno */
    .success-icon {
        font-size: 3rem;
    }

    .success-text {
        font-size: 1rem;
    }

    .next-steps {
        padding: 1rem;
        margin: 1.5rem auto;
    }

    .next-steps h3 {
        font-size: 1rem;
        margin-bottom: 0.875rem;
    }

    .next-steps ol {
        padding-left: 1.25rem;
    }

    .next-steps li {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }

    .cta-whatsapp {
        padding: 1.25rem;
        margin: 1.5rem 0;
    }

    .cta-whatsapp p {
        font-size: 0.9375rem;
        margin-bottom: 0.75rem;
    }

    .btn-whatsapp {
        font-size: 0.9375rem;
        padding: 0.875rem 1.25rem;
    }

    .additional-resources li {
        font-size: 0.875rem;
        margin-bottom: 0.5rem;
    }

    /* Modal muito pequeno */
    .modal-content {
        padding: 1.5rem 1rem;
        width: 94%;
    }

    .modal-icon {
        width: 60px;
        height: 60px;
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .modal-title {
        font-size: 1.25rem;
        margin-bottom: 0.75rem;
    }

    .modal-message {
        font-size: 0.9375rem;
        margin-bottom: 1.5rem;
    }

    .modal-btn {
        min-width: 100px;
        padding: 0.75rem 1.5rem;
        font-size: 0.9375rem;
    }

    /* Consent box */
    .consent-box {
        padding: 1.25rem;
        margin: 1.5rem 0;
    }

    .consent-checkbox span {
        font-size: 0.875rem;
    }
}

/* Mobile extra pequeno (até 360px) */
@media (max-width: 360px) {
    .form-content {
        padding: 1rem 0.75rem;
    }

    .step-number {
        font-size: 0.6875rem;
    }

    .option-button {
        padding: 0.75rem 0.875rem;
        font-size: 0.875rem;
    }

    .checkbox-option {
        padding: 0.625rem;
    }

    .btn {
        padding: 0.75rem 1rem;
        font-size: 0.875rem;
    }

    .modal-content {
        padding: 1.25rem 0.875rem;
        width: 96%;
    }
}

/* ===================================
   ACESSIBILIDADE
   =================================== */

.form-input:focus-visible,
.form-textarea:focus-visible,
.option-button:focus-visible,
.btn:focus-visible {
    outline: 3px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===================================
   ANIMAÇÕES ADICIONAIS
   =================================== */

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

.form-step.active .step-content {
    animation: slideInUp 0.5s ease;
}

/* ===================================
   MODAL DE NOTIFICAÇÃO
   =================================== */

.notification-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease;
}

.notification-modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2.5rem;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideInDown 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
}

.modal-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 1.5rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.modal-icon.success {
    background: linear-gradient(135deg, #28a745, #20c997);
    color: white;
}

.modal-icon.error {
    background: linear-gradient(135deg, #dc3545, #e63946);
    color: white;
}

.modal-icon.warning {
    background: linear-gradient(135deg, #ffc107, #ff9800);
    color: white;
}

.modal-icon.info {
    background: linear-gradient(135deg, #0066CC, #0052A3);
    color: white;
}

.modal-title {
    font-size: 1.75rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
    font-family: 'Poppins', sans-serif;
}

.modal-message {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.modal-btn {
    min-width: 120px;
    padding: 0.875rem 2rem;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.modal-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 102, 204, 0.3);
}

/* Animações do Modal */
@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideInDown {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.8);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsividade do Modal */
@media (max-width: 768px) {
    .modal-content {
        padding: 2rem;
        max-width: 95%;
    }

    .modal-icon {
        width: 70px;
        height: 70px;
        font-size: 2.5rem;
    }

    .modal-title {
        font-size: 1.5rem;
    }

    .modal-message {
        font-size: 1rem;
    }
}

