:root {
    --color-gold: #C9A635;
    --color-gold-dark: #b89730;
    --color-green-dark: #004d40;
    --color-success: #2e7d32;
    --color-error: #d32f2f;
    --color-background: #fdfdfc;
    --color-panel: #ffffff;
    --color-text-primary: #212529;
    --color-text-secondary: #6c757d;
    --color-border: #e0e0e0;
    --color-border-focus: #C9A635;
    --font-title: 'Playfair Display', serif;
    --font-body: 'Montserrat', sans-serif;
    --border-radius: 10px;
    --transition-speed: 0.3s;
}

/* ==========================================================================
   Layout Principal e Utilitários
   ========================================================================== */
html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    background-color: var(--color-background);
    min-height: 100vh;
}

.hidden {
    display: none !important;
}

.signup-page-container {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.signup-image-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-image: linear-gradient(rgba(0, 0, 0, 0.65), rgba(0, 0, 0, 0.65)), url(../images/capa_index.png);
    background-size: cover;
    background-position: center;
    color: #fff;
    padding: 3rem 2rem;
    animation: backgroundScale 10s ease-in-out infinite alternate;
}

.overlay-content h3 {
    font-family: var(--font-title);
    font-size: clamp(2rem, 7vw, 2.5rem);
    margin-bottom: 1rem;
    animation: slideInUp 0.8s ease-out forwards;
}

.overlay-content p {
    font-size: clamp(1rem, 4vw, 1.1rem);
    line-height: 1.7;
    opacity: 0.95;
    max-width: 600px;
    animation: slideInUp 0.8s ease-out forwards 0.3s;
}

.signup-form-panel {
    display: flex;
    justify-content: center;
    align-items: flex-start; /* Alinha ao topo para melhor visualização em telas menores */
    padding: 2rem 0;
    background-color: var(--color-panel);
    flex-grow: 1;
}

/* ==========================================================================
   Media Queries para Responsividade
   ========================================================================== */

@media (min-width: 1024px) {
    .signup-page-container {
        flex-direction: row;
    }

    .signup-image-panel {
        flex-basis: 45%;
        min-height: 100vh;
    }

    .signup-form-panel {
        flex-basis: 55%;
        align-items: center; /* Centraliza verticalmente no desktop */
        padding: 1rem 0;
    }

    .overlay-content h3 {
        font-size: clamp(2.5rem, 5vw, 3rem);
    }
}

.form-wrapper {
    width: 100%;
    max-width: 520px;
    padding: 0 1rem; /* Reduzido para telas menores */
    text-align: center;
}

.logo-link {
    display: block;
    margin-bottom: 1rem;
}

.form-logo {
    max-width: 70px;
}

.form-title {
    font-family: var(--font-title);
    font-size: clamp(1.8rem, 4vw, 2.2rem);
    color: var(--color-green-dark);
    margin: 0 0 0.5rem 0;
}

.form-title::after {
    content: '';
    display: block;
    width: 50px;
    height: 3px;
    background-color: var(--color-gold);
    margin: 0.75rem auto 0;
}

/* ==========================================================================
   Stepper e Etapas do Formulário
   ========================================================================== */
.stepper-container {
    display: flex;
    align-items: center;
    margin: 1.5rem auto;
    max-width: 360px; /* Ajustado para caber melhor */
}

.step-icon {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--color-border);
    display: grid;
    place-items: center;
    font-weight: 700;
    color: var(--color-text-secondary);
    background: #fff;
    transition: all 0.4s ease;
}

.step.active .step-icon,
.step.completed .step-icon {
    border-color: var(--color-gold);
    background-color: var(--color-gold);
    color: #fff;
}

.step-label {
    display: none; /* Oculto por padrão em telas pequenas */
}

@media (min-width: 576px) {
    .step-label {
        display: block;
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--color-text-secondary);
        margin-top: 0.5rem;
    }
}

.step.active .step-label,
.step.completed .step-label {
    color: var(--color-text-primary);
}

.step-connector {
    flex-grow: 1;
    height: 2px;
    background-color: var(--color-border);
}

.form-step {
    display: none;
    min-height: auto; /* Altura automática para fluir com o conteúdo */
    padding-bottom: 1rem; /* Espaçamento inferior */
}

.form-step.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ==========================================================================
   Estilos de Campos com Validação (Sucesso e Erro)
   ========================================================================== */
.form-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.form-field {
    width: 100%;
}

.form-field.half {
    width: 100%;
}

@media (min-width: 576px) {
    .form-field.half {
        width: calc(50% - 0.5rem);
    }
}

.form-field label {
    display: flex;
    align-items: center;
    position: relative;
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding-left: 1rem;
    transition: border-color var(--transition-speed), box-shadow var(--transition-speed);
}

.form-field label i {
    color: var(--color-text-secondary);
    margin-right: 0.75rem;
    transition: color var(--transition-speed);
}

.form-field input {
    width: 100%;
    border: none;
    outline: none;
    padding: 0.9rem 0.5rem;
    font-size: 0.95rem;
    font-family: var(--font-body);
    background: transparent;
}

.form-field label:focus-within {
    border-color: var(--color-border-focus);
    box-shadow: 0 0 0 3px rgba(201, 166, 53, 0.2);
}

.form-field label:focus-within i {
    color: var(--color-border-focus);
}

.form-field label.invalid {
    border-color: var(--color-error);
}

.form-field label.invalid i {
    color: var(--color-error);
}

.form-field label.valid {
    border-color: var(--color-success);
}

.form-field label.valid i {
    color: var(--color-success);
}

.toggle-password {
    position: absolute;
    right: 1rem;
    cursor: pointer;
    color: var(--color-text-secondary);
}

/* ==========================================================================
   Feedback de Senha
   ========================================================================== */
.password-feedback {
    font-size: 0.8rem;
    margin-top: 0.5rem;
    padding-left: 0.5rem;
    display: none; /* Oculto por padrão */
    text-align: left;
}

.feedback-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.feedback-list li {
    display: flex;
    align-items: center;
    margin-bottom: 0.3rem;
    transition: color 0.3s ease;
}

.feedback-list li i {
    margin-right: 0.5rem;
    font-size: 0.9rem;
    width: 16px; /* Largura fixa para alinhamento */
}

.feedback-list li.invalid {
    color: var(--color-error);
}

.feedback-list li.valid {
    color: var(--color-success);
}

.feedback-list li.valid i::before {
    content: "\f058"; /* Ícone de círculo de verificação sólido do Font Awesome */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

.feedback-list li.invalid i::before {
    content: "\f057"; /* Ícone de círculo de X do Font Awesome */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
}

/* ==========================================================================
   Botões, Pagamento e Footer
   ========================================================================== */
.payment-section {
    text-align: center;
    padding: 2rem 0;
}

.payment-icon {
    font-size: 3.5rem;
    color: var(--color-gold);
    margin-bottom: 1rem;
}

.payment-section h3 {
    font-family: var(--font-title);
    margin: 0 0 0.5rem;
    font-size: 1.6rem;
    color: var(--color-green-dark);
}

.payment-section p {
    font-size: 0.9rem;
    color: var(--color-text-secondary);
    margin: 0 auto;
    max-width: 350px;
    line-height: 1.6;
}

.form-navigation {
    display: flex;
    flex-direction: column; /* Empilha os botões verticalmente por padrão */
    align-items: center;
    margin-top: 2rem;
    gap: 1rem;
}

.btn {
    width: 100%; /* Ocupa a largura total em telas pequenas */
    padding: 0.9rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
    transition: all var(--transition-speed) ease;
    border: 1px solid transparent;
}

.btn-primary {
    background-color: var(--color-gold);
    color: #fff;
    order: 2; /* Garante que o botão primário venha depois */
}

.btn-primary:hover {
    background-color: var(--color-gold-dark);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: transparent;
    border-color: var(--color-border);
    color: var(--color-text-secondary);
    order: 1; /* Botão de voltar vem primeiro */
}

@media (min-width: 576px) {
    .form-navigation {
        flex-direction: row; /* Layout lado a lado em telas maiores */
        justify-content: space-between;
    }

    .btn {
        width: auto;
    }

    .btn-primary {
        flex-grow: 1;
        order: 0; /* Ordem padrão */
    }

    .btn-secondary {
        flex-grow: 0;
        width: 120px;
        order: 0; /* Ordem padrão */
    }
}

.form-footer {
    margin-top: 1.5rem;
    font-size: 0.9rem;
}

.form-footer a {
    color: var(--color-gold);
    font-weight: 600;
    text-decoration: none;
}

/* ==========================================================================
   Sistema de Popups (Toasts)
   ========================================================================== */
#toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    border-radius: 8px;
    color: #fff;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transform: translateX(120%);
    opacity: 0;
    animation: toast-in 0.5s forwards;
}

.toast.hide {
    animation: toast-out 0.5s forwards;
}

.toast i {
    font-size: 1.2rem;
    margin-right: 10px;
}

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

.toast--error {
    background-color: var(--color-error);
}

@keyframes toast-in {
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes toast-out {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(120%);
        opacity: 0;
    }
}

/* ==========================================================================
   Novas Animações para a Seção de Imagem
   ========================================================================== */

/* Animação para o título (fade-in e slide-up) */
@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Animação para o background da imagem (zoom sutil e alternado) */
@keyframes backgroundScale {
    0% {
        background-size: 100% 100%;
    }

    100% {
        background-size: 105% 105%;
    }
}