/* Importar uma fonte limpa e moderna */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Reset básico e box-sizing */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: #ffffff; /* Fundo suave da paleta */
    min-height: 100vh;
    color: #5B5B5B; /* Texto escuro da paleta */
    line-height: 1.6;
}

/* Banner superior */
.banner-top {
    width: 100%;
    height: 300px;
    background-image: url('images/background.jpg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
}

/* Container principal */
.main-container {
    position: relative;
    width: 100%;
    max-width: 700px;
    margin: 0 auto;
    margin-top: -150px;
    padding: 0 20px 40px;
    z-index: 2;
}

/* Logo circular posicionado à esquerda */
.logo-circle {
    position: absolute;
    top: -60px;
    left: 60px;
    background-color: #ffffff;
    border-radius: 50%;
    width: 120px;
    height: 120px;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    z-index: 10;
    border: 4px solid #ffffff;
}

.logo-circle img {
    width: 80%;
    height: 80%;
    object-fit: contain;
    border-radius: 50%;
}

/* Card principal do formulário */
.form-card {
    background-color: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    padding: 40px;
    width: 100%;
    padding-top: 80px;
    position: relative;
}

/* Header do formulário */
.form-header {
    text-align: left;
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: none;
}

.form-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #5B5B5B;
    margin-bottom: 15px;
    letter-spacing: -0.5px;
    text-align: left;
}

.form-description {
    font-size: 1.1rem;
    color: #8a8a8a;
    margin-bottom: 20px;
    line-height: 1.7;
    text-align: left;
}

.form-contact {
    font-size: 1rem;
    color: #999;
    text-align: left;
}

.whatsapp-link {
    color: #FAC622; /* Amarelo de destaque */
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}

.whatsapp-link:hover {
    color: #FCD406; /* Amarelo de destaque alternativo */
    text-decoration: underline;
}

/* Passos do formulário */
.form-step {
    display: none;
    animation: fadeIn 0.5s ease-in-out;
}

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

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

.step-title {
    font-size: 2rem;
    font-weight: 600;
    color: #5B5B5B;
    text-align: center;
    margin-bottom: 30px;
    position: relative;
}

/* Campos do formulário */
.form-fields {
    margin-bottom: 30px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #5B5B5B;
    font-size: 0.95rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #ddd;
    border-radius: 12px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #fdfdfd;
    color: #5B5B5B;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #FAC622;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(250, 198, 34, 0.1);
    transform: translateY(-2px);
}

.form-group textarea {
    min-height: 100px;
    resize: vertical;
    font-family: inherit;
}

/* Campos com erro */
.form-group input.input-error,
.form-group select.input-error,
.form-group textarea.input-error {
    border-color: #e74c3c;
    background: #fdf2f2;
}

.error-message {
    color: #e74c3c;
    font-size: 0.85rem;
    margin-top: 5px;
    display: none;
    font-weight: 500;
}

/* Checkboxes e Radio buttons */
.checkbox-group-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 10px;
}

.checkbox-group,
.radio-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.2s ease;
}

.checkbox-group:hover,
.radio-group:hover {
    background-color: #F8F1C9;
}

.checkbox-group input[type="checkbox"],
.radio-group input[type="radio"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: #FAC622;
}

.checkbox-group label,
.radio-group label {
    margin: 0;
    cursor: pointer;
    font-weight: 400;
    line-height: 1.4;
}

/* Botões */
.form-navigation {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-top: 40px;
    padding-top: 30px;
    border-top: none;
}

/* Ajuste específico para o primeiro passo (só botão Avançar) */
#step-1 .form-navigation {
    justify-content: flex-end;
}

.btn {
    padding: 15px 30px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 140px;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before {
    left: 100%;
}

.btn-next,
.btn-submit,
.btn-add-apprentice,
#goToPaymentBtn {
    background: linear-gradient(135deg, #FAC622, #FCD406);
    color: #5B5B5B;
    box-shadow: 0 4px 15px rgba(250, 198, 34, 0.3);
}

.btn-next:hover,
.btn-submit:hover,
.btn-add-apprentice:hover,
#goToPaymentBtn:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(250, 198, 34, 0.4);
}

.btn-prev,
.btn-remove-apprentice {
    background: #f5f5f5;
    color: #5B5B5B;
    border: 2px solid #ddd;
}

.btn-prev:hover,
.btn-remove-apprentice:hover {
    background: #A0A0A0;
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-add-apprentice {
    margin: 30px auto 0;
    display: block;
    width: auto;
}

.btn-remove-apprentice {
    width: 100%;
    margin-top: 20px;
    background: #e74c3c;
    color: #ffffff;
    border: none;
}

.btn-remove-apprentice:hover {
    background: #c82333;
}

/* Seções de aprendizes */
#apprenticesContainer {
    margin-top: 30px;
}

.apprentice-group {
    background: #ffffff;
    border: 2px solid #ffffff;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 30px;
    position: relative;
    transition: all 0.3s ease;
}

.apprentice-group:hover {
    border-color: #ffffff;
    box-shadow: 0 8px 25px rgba(250, 198, 34, 0.1);
}

.apprentice-group h3 {
    font-size: 1.5rem;
    font-weight: 600;
    color: #5B5B5B;
    text-align: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #ddd;
}

/* Select múltiplo */
.form-group select[multiple] {
    min-height: 120px;
    padding: 15px;
}

/* Feedback de cupom */
.cupom-feedback {
    font-size: 0.9rem;
    margin-top: 8px;
    font-weight: 500;
}

.cupom-feedback.success {
    color: #0c5460;
    background-color: #e8f4fd;
    border: 1px solid #bee5eb;
    padding: 8px 12px;
    border-radius: 4px;
}

.cupom-feedback.error {
    color: #e74c3c;
    background-color: #fdf2f2;
    padding: 8px 12px;
    border-radius: 4px;
}

/* Seção de resumo */
.summary-section {
    background: #ffffff;
    border: none;
    border-radius: 16px;
    padding: 30px;
    margin-top: 40px;
}

.summary-section h3 {
    font-size: 1.8rem;
    font-weight: 700;
    color: #5B5B5B;
    text-align: center;
    margin-bottom: 25px;
}

#summaryApprenticesList {
    list-style: none;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 2px dashed #ddd;
}

/* --- Organização dos cursos na lista de resumo --- */

/* Cada aprendiz */
#summaryApprenticesList li {
    padding: 8px 0;
    font-size: 1rem;
    color: #5B5B5B;
    margin-bottom: 25px; /* Espaço entre diferentes aprendizes */
}

/* Remove margem do último aprendiz */
#summaryApprenticesList li:last-child {
    margin-bottom: 0;
}

/* Nome do aprendiz - linha própria */
#summaryApprenticesList li strong {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #5B5B5B;
}

/* Cada curso em linha separada com indentação */
.course-details-line {
    display: block;
    margin-bottom: 5px; /* Espaço entre cada curso */
    padding-left: 20px; /* Indentação para mostrar que é subcategoria */
    line-height: 1.4;
}

.price-details p {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    font-size: 1.1rem;
    padding: 8px 0;
}

.price-details .total-price {
    font-size: 1.5rem;
    font-weight: 700;
    color: #5B5B5B;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 3px solid #FAC622;
}

/* Termos e condições */
.terms-and-conditions {
    max-height: 300px;
    overflow-y: auto;
    border: 2px solid #ddd;
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
    background: #fdfdfd;
    font-size: 0.95rem;
    line-height: 1.6;
}

.terms-and-conditions p {
    margin-bottom: 15px;
}

/* Responsividade */
@media (max-width: 768px) {
    .banner-top {
        height: 200px;
    }
    
    .main-container {
        margin-top: -100px;
        padding: 0 15px 30px;
    }
    
    .logo-circle {
        width: 100px;
        height: 100px;
        top: -50px;
        left: 20px;
    }
    
    .form-card {
        padding: 25px 20px;
        padding-top: 70px;
        border-radius: 12px;
    }
    
    .form-title {
        font-size: 2rem;
    }
    
    .step-title {
        font-size: 1.6rem;
    }
    
    .form-navigation {
        flex-direction: column;
        gap: 15px;
    }
    
    #step-1 .form-navigation {
        justify-content: center;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
    
    .checkbox-group-container {
        grid-template-columns: 1fr;
    }
    
    .apprentice-group {
        padding: 20px;
    }
    
    .summary-section {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .banner-top {
        height: 150px;
    }
    
    .main-container {
        margin-top: -75px;
        padding: 0 10px 20px;
    }
    
    .logo-circle {
        width: 80px;
        height: 80px;
        top: -40px;
        left: 15px;
    }
    
    .form-card {
        padding: 20px 15px;
        padding-top: 60px;
    }
    
    .form-title {
        font-size: 1.8rem;
    }
    
    .form-group input,
    .form-group select,
    .form-group textarea {
        padding: 12px 15px;
    }
}

/* Estados de loading */
.loading {
    opacity: 0.7;
    pointer-events: none;
}

/* Animações suaves */
.form-group {
    animation: slideUp 0.3s ease-out;
}

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

/* Melhorias visuais adicionais */
.form-step:not(.active) {
    display: none !important;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
    background: #A0A0A0 !important;
    color: #ffffff !important;
}

.btn:disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

.cupom-feedback.scholarship {
    color: #0c5460;
    background-color: #e8f4fd;
    border: 1px solid #bee5eb;
    padding: 8px 12px;
    border-radius: 4px;
    font-weight: bold;
    margin-top: 5px;
    display: block;
}

.scholarship-message {
    animation: fadeIn 0.3s ease-in;
}

/* Template escondido */
.template {
    display: none !important;
}

.courses-selection {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    background: #f9f9f9;
}

.course-category {
    margin-bottom: 20px;
}

.course-category:last-child {
    margin-bottom: 0;
}

.course-category h4 {
    margin: 0 0 10px 0;
    color: #333;
    font-size: 1rem;
    font-weight: 600;
}

.course-price {
    color: #666;
    font-size: 0.9em;
    font-weight: normal;
}

.courses-checkboxes .checkbox-group {
    margin-bottom: 8px;
}


/* Melhora a formatação do resumo */
#summaryApprenticesList li {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #FCD406;
}

#summaryApprenticesList li strong {
    color: #495057;
    display: block;
    margin-bottom: 5px;
}

.course-price {
    color: #28a745;
    font-weight: 600;
}

/* style.css */

/* Estilos base para a caixa de status */
.status-box {
    padding: 30px;
    border-radius: 16px;
    margin-bottom: 30px;
    text-align: center; /* Centraliza o texto dentro da caixa */
    /* Transições suaves para a mudança de estado */
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.status-box #statusHeading,
.status-box #statusMessage {
    margin-bottom: 20px;
    font-size: 1.1rem; /* Mantém o tamanho da fonte do parágrafo */
    transition: color 0.3s ease;
}

/* Estado de processamento/carregamento */
.status-box.status-processing {
    background: #e0f2f7; /* Um azul claro */
    border: 2px solid #a7d9ed; /* Borda azul clara */
}
.status-box.status-processing #statusHeading,
.status-box.status-processing #statusMessage {
    color: #007bff; /* Texto azul */
}

/* Estado de sucesso */
.status-box.status-success {
    background: linear-gradient(135deg, #d4edda, #c3e6cb); /* Verde claro */
    border: 2px solid #28a745; /* Borda verde */
}
.status-box.status-success #statusHeading,
.status-box.status-success #statusMessage {
    color: #155724; /* Texto verde escuro */
}

/* Estado de erro */
.status-box.status-error {
    background: linear-gradient(135deg, #f8d7da, #f5c6cb); /* Vermelho claro */
    border: 2px solid #dc3545; /* Borda vermelha */
}
.status-box.status-error #statusHeading,
.status-box.status-error #statusMessage {
    color: #721c24; /* Texto vermelho escuro */
}

/* Ajuste para o h3 dentro da caixa, para não ser muito grande se não for o título da seção */
.status-box h3 {
    font-size: 1.8rem; /* Um pouco menor que o h2 da seção, mas ainda proeminente */
    margin-top: 0;
}

/* Estilo para o spinner de carregamento (se você estiver usando Bootstrap) */
.spinner-border {
  display: inline-block;
  width: 1rem;
  height: 1rem;
  vertical-align: text-bottom;
  border: .125em solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  -webkit-animation: .75s linear infinite spinner-border;
  animation: .75s linear infinite spinner-border;
}

@-webkit-keyframes spinner-border {
  to {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

@keyframes spinner-border {
  to {
    -webkit-transform: rotate(360deg);
    transform: rotate(360deg);
  }
}

.spinner-border-sm {
  width: .8rem;
  height: .8rem;
  border-width: .1em;
}
