/**
 * Estilos personalizados para el formulario de inscripción
 */

/* Variables CSS */
:root {
    --primary-color: #0d6efd;
    --success-color: #198754;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --light-bg: #f8f9fa;
    --border-radius: 0.375rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

/* Estilos generales */
html, body {
    height: 100%;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background: linear-gradient(135deg, #c86941 0%, #b85c38 50%, #a0522d 100%);
    padding: 0;
    min-height: 100vh;
}

/* Contenedor principal */
.form-signin {
    max-width: 1000px;
    margin: 0 auto;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 2rem 2rem 2rem;
}

/* Logo */
.logo-container {
    text-align: center;
    margin-bottom: 0.25rem;
    margin-top: 0.25rem;
}

.logo-container img {
    max-width: 100%;
    height: auto;
    border-radius: var(--border-radius);
}

/* Títulos */
h1, h2, h3, h4, h5 {
    color: #2c3e50;
    font-weight: 600;
}

.main-title {
    background: linear-gradient(45deg, #c86941, #8b4513);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-align: center;
    margin-bottom: 0.5rem;
}

/* Campos del formulario */
.form-floating {
    margin-bottom: 1rem;
}

.form-control {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

.form-control.is-invalid {
    border-color: var(--danger-color);
}

.form-select {
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    transition: all 0.3s ease;
}

.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Radio buttons y checkboxes */
.form-check-input {
    margin-right: 0.5rem;
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Secciones del formulario */
.form-section {
    background: var(--light-bg);
    padding: 1.5rem;
    border-radius: var(--border-radius);
    margin-bottom: 1.5rem;
    border-left: 4px solid #c86941;
}

.form-section h4 {
    margin-bottom: 1rem;
    color: #c86941;
}

/* Campos ocultos */
.oculto {
    display: block !important;
}

/* Campos de archivo */
.file-input-container {
    background: var(--light-bg);
    border: 2px dashed #dee2e6;
    border-radius: var(--border-radius);
    padding: 1rem;
    text-align: center;
    transition: all 0.3s ease;
}

.file-input-container:hover {
    border-color: var(--primary-color);
    background: rgba(13, 110, 253, 0.05);
}

.file-input-container input[type="file"] {
    border: none;
    background: transparent;
}

/* Botones */
.btn {
    border-radius: var(--border-radius);
    font-weight: 500;
    padding: 0.75rem 2rem;
    transition: all 0.3s ease;
}

.btn-primary {
    background: linear-gradient(45deg, #c86941, #a0522d);
    border: none;
    box-shadow: 0 4px 15px rgba(200, 105, 65, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(200, 105, 65, 0.4);
    background: linear-gradient(45deg, #d4774d, #b85c38);
}

.btn-primary:disabled {
    background: #6c757d;
    transform: none;
    box-shadow: none;
}

/* Alertas */
.alert {
    border-radius: var(--border-radius);
    border: none;
    box-shadow: var(--box-shadow);
}

.alert-success {
    background: linear-gradient(45deg, #d4edda, #c3e6cb);
    color: #155724;
}

.alert-danger {
    background: linear-gradient(45deg, #f8d7da, #f5c6cb);
    color: #721c24;
}

/* Errores de campo */
.field-error {
    color: var(--danger-color);
    font-size: 0.875rem;
    margin-top: 0.25rem;
    display: block;
}

/* Grid de teléfono */
.phone-grid {
    display: flex;
    gap: 0.5rem;
    align-items: stretch;
    margin-bottom: 1rem;
}

.phone-prefix {
    background: #e9ecef;
    border: 2px solid #e9ecef;
    border-radius: var(--border-radius);
    padding: 0 1rem;
    font-weight: 600;
    color: #495057;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.phone-grid .form-floating {
    flex: 1;
    margin-bottom: 0;
}

.phone-grid .form-control {
    height: 100%;
}

/* Información importante */
.info-box {
    background: linear-gradient(45deg, #fff3cd, #ffeaa7);
    border: 1px solid #ffc107;
    border-radius: var(--border-radius);
    padding: 1rem;
    margin: 1rem 0;
}

.info-box h5 {
    color: #856404;
    margin-bottom: 0.5rem;
}

/* Términos y condiciones */
.terms-container {
    background: var(--light-bg);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border: 1px solid #dee2e6;
}

.terms-text {
    text-align: justify;
    line-height: 1.6;
    color: #495057;
}

/* Responsive */
@media (max-width: 768px) {
    .form-signin {
        margin: 0 1rem;
        padding: 1.5rem;
    }
    
    .phone-grid {
        flex-direction: column;
    }
    
    .phone-prefix {
        padding: 0.75rem 1rem;
        justify-content: flex-start;
    }
    
    .btn {
        width: 100%;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.form-section {
    animation: fadeIn 0.5s ease-out;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Mejoras de accesibilidad */
.form-control:focus,
.form-select:focus,
.btn:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Estados de validación visual */
.form-control.is-valid {
    border-color: var(--success-color);
}

.form-control.is-valid:focus {
    border-color: var(--success-color);
    box-shadow: 0 0 0 0.2rem rgba(25, 135, 84, 0.25);
}