/* Reset e configurações base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f8f9fa;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Main Container - Une banner e formulário */
.main-container {
    max-width: 1200px;
    margin: 2rem auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Banner Image */
.banner-image {
    width: 100%;
    text-align: center;
    background: #f8f9fa;
    padding: 1rem 0;
}

.banner-img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* Form Container */
.form-container {
    padding: 2rem 20px;
    background: white;
}

.form-header {
    margin-bottom: 2rem;
    border-bottom: 2px solid #e1e5e9;
    padding-bottom: 1rem;
    text-align: center;
}

.form-header h3 {
    font-size: 1.5rem;
    color: #1e3c72;
    font-weight: 600;
}

.section-divider {
    margin: 2rem 0 1.5rem 0;
    border-bottom: 2px solid #e1e5e9;
    padding-bottom: 1rem;
}

.section-divider h3 {
    font-size: 1.3rem;
    color: #1e3c72;
    font-weight: 600;
}

/* Form Styles */
.cadastro-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.2rem 2rem;
    align-items: start;
}

.form-group {
    display: flex;
    flex-direction: column;
}

/* Campos que ocupam a largura total */
.form-group.full-width {
    grid-column: 1 / -1;
}

/* Campos específicos para cada coluna */
.form-group.col-1 {
    grid-column: 1;
}

.form-group.col-2 {
    grid-column: 2;
}

.form-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #333;
    font-size: 0.75rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.8rem;
    border: 2px solid #e1e5e9;
    border-radius: 6px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: white;
    font-family: inherit;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group input::placeholder {
    color: #999;
}

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

/* Radio Groups */
.radio-group {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    cursor: pointer;
    font-size: 0.75rem;
}

.radio-label input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 18px;
    height: 18px;
    border: 2px solid #e1e5e9;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.radio-label input[type="radio"]:checked + .radio-custom {
    border-color: #667eea;
    background: #667eea;
}

.radio-label input[type="radio"]:checked + .radio-custom::after {
    content: '';
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: white;
}

/* Checkbox Styles */
.checkbox-group {
    flex-direction: row;
    align-items: flex-start;
    gap: 0.2rem;
}

.checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 0.2rem;
    cursor: pointer;
    font-size: 0.9rem;
    line-height: 1.4;
}

.checkbox-label input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 20px;
    height: 20px;
    border: 2px solid #e1e5e9;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    flex-shrink: 0;
    margin-top: 0.1rem;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark {
    background: #667eea;
    border-color: #667eea;
}

.checkbox-label input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.checkbox-label a {
    color: #667eea;
    text-decoration: none;
}

.checkbox-label a:hover {
    text-decoration: underline;
}

/* Submit Button */
.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    margin-top: 1rem;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.3);
}

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


/* Botão Ler Edital */
.btn-edital {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    padding: 0.3rem 0.4rem;
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
    font-size: 0.75rem;
    margin: 0.5rem 0;
}

.btn-edital:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(220, 53, 69, 0.3);
    text-decoration: none;
    color: white;
}

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


/* Messages */
.success-message,
.error-message {
    padding: 1.5rem;
    border-radius: 8px;
    margin-top: 1rem;
    text-align: center;
}

.success-message {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.error-message {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.success-message i,
.error-message i {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    display: block;
}

.success-message h4,
.error-message h4 {
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}


/* Responsive Design */
@media (max-width: 768px) {
    .main-container {
        margin: 1rem;
        border-radius: 10px;
    }
    
    .banner-image {
        padding: 0.5rem 0;
    }
    
    .banner-img {
        border-radius: 4px;
    }
    
    .form-container {
        padding: 1.5rem;
    }
    
    .form-header h3 {
        font-size: 1.3rem;
    }
    
    .section-divider h3 {
        font-size: 1.2rem;
    }
    
    .radio-group {
        flex-direction: column;
        gap: 0.2rem;
    }
    
    /* Em telas pequenas, volta para uma coluna */
    .cadastro-form {
        grid-template-columns: 1fr;
        gap: 1.2rem;
    }
    
    .form-group.col-1,
    .form-group.col-2,
    .form-group.full-width {
        grid-column: 1;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    
    .banner-header {
        padding: 1.5rem 0;
    }
    
    .banner-header h1 {
        font-size: 1.8rem;
    }
    
    .form-section {
        padding: 1rem 0;
    }
    
    .form-container {
        padding: 1rem;
    }
}

/* Loading animation */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% { left: -100%; }
    100% { left: 100%; }
}

/* Validation styles */
.form-group input:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

.form-group input:valid:not(:placeholder-shown) {
    border-color: #28a745;
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* Focus styles for accessibility */
.btn-submit:focus,
.form-group input:focus,
.form-group select:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Field Error Styles */
input.error,
select.error,
textarea.error {
    border-color: #dc3545 !important;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25) !important;
}

.field-error {
    color: #dc3545 !important;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block !important;
    font-weight: 500;
    background: rgba(220, 53, 69, 0.1);
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border-left: 3px solid #dc3545;
}

/* Checkbox error styling */
.checkbox-group.error .checkbox-label {
    color: #dc3545;
}

.checkbox-group.error .checkmark {
    border-color: #dc3545;
}

/* Focus styles for better UX */
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

/* Success state */
input.valid,
select.valid,
textarea.valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}