/* Estilos modernos para a página Filie-se */

.filiacao-section {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 50%, #f8f9fa 100%);
    padding: 4rem 0;
    min-height: 100vh;
}

.filiacao-container {
    width: 90%;
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    padding: 3rem;
    animation: fadeInUp 0.6s ease-out;
}

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

.filiacao-header {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 3px solid;
    border-image: linear-gradient(90deg, var(--primary-color), var(--secondary-color)) 1;
}

.filiacao-logo {
    width: 120px;
    height: auto;
    margin: 0 auto 1.5rem;
    display: block;
    object-fit: contain;
    animation: fadeIn 0.6s ease-out;
}

.filiacao-header h1 {
    color: var(--text-dark);
    margin-bottom: 0.8rem;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.filiacao-header p {
    color: var(--text-light);
    font-size: 1.15rem;
    font-weight: 500;
}

/* Download Option */
.download-option {
    margin-top: 2.5rem;
    padding-top: 2rem;
}

.divider {
    position: relative;
    text-align: center;
    margin: 2rem 0 1.5rem;
}

.divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, #e0e0e0, transparent);
}

.divider span {
    position: relative;
    background: white;
    padding: 0 1.5rem;
    color: var(--text-light);
    font-weight: 600;
    font-size: 0.9rem;
}

.download-text {
    color: var(--text-dark);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.btn-download {
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    background: linear-gradient(135deg, var(--secondary-color), #00a89a);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 6px 20px rgba(0, 179, 166, 0.3);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-download svg {
    width: 24px;
    height: 24px;
}

.btn-download:hover {
    background: linear-gradient(135deg, #00a89a, #008f82);
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 179, 166, 0.4);
}

.btn-download:active {
    transform: translateY(-1px);
}

.download-hint {
    margin-top: 1rem;
    color: var(--text-light);
    font-size: 0.9rem;
    font-style: italic;
}

/* Formulário */
.filiacao-form fieldset {
    border: 2px solid #e8ecef;
    border-radius: 16px;
    padding: 2rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #fafbfc 0%, #ffffff 100%);
    transition: all 0.3s ease;
}

.filiacao-form fieldset:hover {
    border-color: var(--primary-light);
    box-shadow: 0 4px 20px rgba(0, 102, 204, 0.08);
}

.filiacao-form legend {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text-dark);
    padding: 0 1rem;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.form-row {
    display: flex;
    gap: 1.2rem;
    margin-bottom: 1.2rem;
    flex-wrap: wrap;
}

.form-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    flex: 1 1 100%;
}

.form-group.flex-2 {
    flex: 2;
}

.form-group label {
    font-weight: 600;
    margin-bottom: 0.6rem;
    color: var(--text-dark);
    font-size: 0.95rem;
    transition: color 0.3s ease;
}

.form-group:focus-within label {
    color: var(--primary-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 0.9rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
    transform: translateY(-2px);
}

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

/* Checkbox */
.checkbox-group {
    display: flex;
    align-items: flex-start;
}

.checkbox-group label {
    display: flex;
    align-items: flex-start;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 0;
    line-height: 1.6;
    transition: color 0.3s ease;
}

.checkbox-group label:hover {
    color: var(--primary-color);
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.8rem;
    margin-top: 0.2rem;
    cursor: pointer;
    transform: scale(1.3);
    flex-shrink: 0;
    accent-color: var(--primary-color);
}

/* Botões */
.form-actions {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    margin-top: 3rem;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    padding: 1.2rem 2.5rem;
    font-size: 1.05rem;
    font-weight: 700;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-width: 200px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color) 0%, #ff5722 100%);
    color: white;
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #ff5722 0%, #e64a19 100%);
    box-shadow: 0 8px 30px rgba(255, 107, 53, 0.4);
    transform: translateY(-3px);
}

.btn-primary:active {
    transform: translateY(-1px);
}

.btn-primary:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-secondary {
    background: white;
    color: var(--text-dark);
    border: 2px solid #e0e0e0;
}

.btn-secondary:hover {
    background: #f8f9fa;
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Mensagem de status */
.form-message {
    margin-top: 2rem;
    padding: 1.2rem 1.5rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    display: none;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-message.success {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 2px solid #28a745;
    display: block;
}

.form-message.error {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 2px solid #dc3545;
    display: block;
}

.form-message.loading {
    background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
    color: #0c5460;
    border: 2px solid #17a2b8;
    display: block;
}

/* Link ativo no menu */
.navbar a.active {
    color: var(--primary-color);
}

/* Responsividade */
@media (max-width: 768px) {
    .filiacao-container {
        width: 95%;
        padding: 2rem 1.5rem;
        border-radius: 16px;
    }

    .filiacao-logo {
        width: 100px;
    }

    .filiacao-header h1 {
        font-size: 2rem;
    }

    .filiacao-header p {
        font-size: 1rem;
    }

    .btn-download {
        width: 100%;
        justify-content: center;
        font-size: 0.95rem;
        padding: 1rem 1.5rem;
    }

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

    .filiacao-form fieldset {
        padding: 1.5rem 1rem;
    }

    .filiacao-form legend {
        font-size: 1.2rem;
    }

    .form-row {
        flex-direction: column;
    }

    .form-group {
        min-width: 100%;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
    }
}

/* Loading spinner */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spinner {
    border: 3px solid rgba(0, 0, 0, 0.1);
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
    display: inline-block;
    margin-right: 10px;
    vertical-align: middle;
}

/* Validação visual */
.form-group input.invalid,
.form-group select.invalid {
    border-color: #dc3545;
    animation: shake 0.3s ease;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-group input.valid,
.form-group select.valid {
    border-color: #28a745;
}

.form-group input.valid::after {
    content: '✓';
    color: #28a745;
}

/* Progress indicator */
.form-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 2rem;
    padding: 0 1rem;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    padding: 0.5rem;
}

.progress-step::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 2px;
    background: #e0e0e0;
    z-index: -1;
}

.progress-step:first-child::before {
    left: 50%;
}

.progress-step:last-child::before {
    width: 50%;
}

/* Tooltips */
.tooltip {
    position: relative;
    display: inline-block;
}

.tooltip:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-dark);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    white-space: nowrap;
    z-index: 100;
}

/* Fade-in animation for form sections */
.filiacao-form fieldset {
    animation: fadeInUp 0.5s ease-out backwards;
}

.filiacao-form fieldset:nth-child(1) { animation-delay: 0.1s; }
.filiacao-form fieldset:nth-child(2) { animation-delay: 0.2s; }
.filiacao-form fieldset:nth-child(3) { animation-delay: 0.3s; }
.filiacao-form fieldset:nth-child(4) { animation-delay: 0.4s; }
.filiacao-form fieldset:nth-child(5) { animation-delay: 0.5s; }
.filiacao-form fieldset:nth-child(6) { animation-delay: 0.6s; }
