/* FUNDO ESCURO (OVERLAY) */
.hp-modal {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(5px); /* Efeito de desfoque moderno */
    z-index: 99999;
    display: none; /* Escondido por padrão */
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* Quando ativo via JS */
.hp-modal.is-active {
    display: flex;
    opacity: 1;
}

/* CAIXA DO CONTEÚDO */
.hp-modal-content {
    background: #111;
    border: 1px solid #222;
    border-radius: 16px; /* Igual aos cards do Hub */
    width: 100%;
    max-width: 600px;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transform: translateY(20px);
    transition: transform 0.3s ease;
    max-height: 90vh;
    overflow-y: auto; /* Scroll se o form for grande */
}

/* Versão menor para Newsletter */
.hp-modal-content.hp-modal-sm {
    max-width: 450px;
}

.hp-modal.is-active .hp-modal-content {
    transform: translateY(0);
}

/* BOTÃO FECHAR */
.hp-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    color: #666;
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    z-index: 10;
    transition: 0.2s;
}

.hp-close:hover {
    color: #fff;
}

/* CABEÇALHO */
.hp-header {
    padding: 30px 30px 10px 30px;
    text-align: center;
    border-bottom: 1px solid #1a1a1a;
}

.hp-header h3 {
    margin: 0 0 5px 0;
    color: #fff;
    font-size: 24px;
}

.hp-header p {
    margin: 0;
    color: #888;
    font-size: 14px;
}

/* CORPO (FORMULÁRIO) */
.hp-body {
    padding: 30px;
}

/* --- ESTILIZAÇÃO DO GRAVITY FORMS (Modo Dark) --- */
/* Isso garante que o formulário não fique branco e feio */

.hp-body .gform_wrapper input[type=text],
.hp-body .gform_wrapper input[type=email],
.hp-body .gform_wrapper input[type=url],
.hp-body .gform_wrapper textarea,
.hp-body .gform_wrapper select {
    background-color: #0a0a0a !important;
    border: 1px solid #333 !important;
    color: #fff !important;
    padding: 12px !important;
    border-radius: 8px !important;
    font-size: 14px !important;
}

.hp-body .gform_wrapper input:focus,
.hp-body .gform_wrapper textarea:focus {
    border-color: #3b82f6 !important; /* Azul do Hub */
    outline: none !important;
}

.hp-body .gform_wrapper label {
    color: #ccc !important;
    font-weight: 500 !important;
    margin-bottom: 8px !important;
}

/* Botão Enviar */
.hp-body .gform_wrapper input[type=submit],
.hp-body .gform_wrapper button[type=submit] {
    background-color: #3b82f6 !important;
    color: #fff !important;
    border: none !important;
    padding: 12px 25px !important;
    border-radius: 8px !important;
    font-size: 16px !important;
    font-weight: bold !important;
    width: 100% !important;
    cursor: pointer !important;
    transition: 0.2s !important;
    margin-top: 10px !important;
}

.hp-body .gform_wrapper input[type=submit]:hover {
    background-color: #2563eb !important;
}


/* ===============================
   AJUSTES FINAIS MOBILE (100% RESPONSIVO)
================================ */

@media (max-width: 600px) {
    /* Diminui a distância do topo */
    .hp-modal {
        padding: 10px;
        align-items: flex-start; /* No mobile, melhor começar do topo */
        padding-top: 20px;
    }

    .hp-modal-content {
        max-height: 85vh; /* Garante que cabe na tela com teclado aberto */
        border-radius: 12px;
    }

    /* Cabeçalho mais compacto */
    .hp-header {
        padding: 20px 20px 10px 20px;
    }
    
    .hp-header h3 {
        font-size: 20px;
    }

    /* Corpo com menos borda para o formulário respirar */
    .hp-body {
        padding: 20px;
    }

    /* Fonte 16px evita zoom automático no iOS (iPhone) */
    .hp-body .gform_wrapper input[type=text],
    .hp-body .gform_wrapper input[type=email],
    .hp-body .gform_wrapper input[type=url],
    .hp-body .gform_wrapper select,
    .hp-body .gform_wrapper textarea {
        font-size: 16px !important; 
    }
}

/* ===============================
   CORREÇÃO DE CORES DE TEXTO (GRAVITY FORMS)
================================ */

/* 1. Sub-legendas (ex: "Nome", "Primeiro", "Confirmar e-mail") */
.hp-body .gform_wrapper .ginput_complex label,
.hp-body .gform_wrapper .gfield_description, 
.hp-body .gform_wrapper .instruction {
    color: #cccccc !important; /* Cinza claro */
    font-weight: normal !important;
    font-size: 13px !important;
    opacity: 0.9;
}

/* 2. Textos de Placeholder (o texto de exemplo dentro do campo) */
.hp-body .gform_wrapper ::placeholder {
    color: #777 !important; /* Um cinza médio para diferenciar do texto digitado */
    opacity: 1;
}

/* 3. Garante que o texto digitado seja BRANCO puro */
.hp-body .gform_wrapper input:not([type=submit]):not([type=button]),
.hp-body .gform_wrapper textarea, 
.hp-body .gform_wrapper select {
    color: #ffffff !important;
}

/* 4. Corrigir a cor dos asteriscos de obrigatório (*) */
.hp-body .gform_wrapper .gfield_required {
    color: #ef4444 !important; /* Vermelho mais vivo */
}

/* ===============================
   CORREÇÃO DOS TÍTULOS DOS CAMPOS (Rótulos Principais)
================================ */

.hp-body .gform_wrapper .gfield_label {
    color: #ffffff !important; /* Força Branco */
    font-weight: 600 !important; /* Um pouco mais de negrito */
    font-size: 15px !important; /* Tamanho legível */
    margin-bottom: 8px !important; /* Espaço entre o nome e o campo */
}

/* Caso tenha algum link dentro do label (as vezes acontece) */
.hp-body .gform_wrapper .gfield_label a {
    color: #ffffff !important;
}