/* forms.css - Modern Form Styles for Juegos de la Unidad */

/* Registration Forms */
.registration-form {
    padding: 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    position: relative;
    overflow: hidden;
}

.registration-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d32f2f 0%, #ffd700 100%);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.form-group {
    display: flex;
    flex-direction: column;
    position: relative;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    font-weight: 700;
    color: #495057;
    margin-bottom: 10px;
    font-size: 1rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    position: relative;
}

.form-label::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    width: 30px;
    height: 2px;
    background: linear-gradient(90deg, #d32f2f 0%, #ffd700 100%);
    border-radius: 1px;
}

.form-input,
.form-select {
    padding: 18px 20px;
    border: 3px solid transparent;
    border-radius: 15px;
    font-size: 1.05rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.06),
        inset 0 2px 4px rgba(255, 255, 255, 0.9);
    color: #333;
}

.form-input:hover,
.form-select:hover {
    transform: translateY(-2px);
    border-color: rgba(211, 47, 47, 0.3);
    box-shadow: 
        0 12px 30px rgba(211, 47, 47, 0.08),
        inset 0 2px 4px rgba(255, 255, 255, 0.9);
}

.form-input:focus,
.form-select:focus {
    outline: none;
    border-color: #d32f2f;
    background: linear-gradient(145deg, #ffffff 0%, #fff5f5 100%);
    box-shadow: 
        0 0 0 4px rgba(211, 47, 47, 0.1),
        0 12px 30px rgba(211, 47, 47, 0.15);
    transform: translateY(-2px) scale(1.02);
}

.form-input.error,
.form-select.error {
    border-color: #dc3545;
    background: linear-gradient(145deg, #fff5f5 0%, #ffffff 100%);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-5px); }
    75% { transform: translateX(5px); }
}

.form-input.large {
    padding: 25px 30px;
    font-size: 1.3rem;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-weight: 700;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border: 4px solid transparent;
    border-radius: 20px;
}

.form-input.large:focus {
    border-color: #d32f2f;
    box-shadow: 
        0 0 0 6px rgba(211, 47, 47, 0.1),
        0 15px 40px rgba(211, 47, 47, 0.2);
}

.form-help {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 8px;
    font-weight: 500;
    font-style: italic;
    padding-left: 5px;
}

.form-select {
    cursor: pointer;
    min-width: 200px;
    position: relative;
}

.form-select::-ms-expand {
    display: none;
}

.form-select option {
    padding: 15px;
    background: #ffffff;
    color: #333;
    font-weight: 500;
}

/* Modern Selected Sport Info */
.selected-sport-info {
    background: linear-gradient(145deg, #fff5f5 0%, #ffffff 100%);
    padding: 30px;
    margin: 20px 40px;
    border-radius: 20px;
    text-align: center;
    box-shadow: 
        0 15px 35px rgba(211, 47, 47, 0.08),
        inset 0 2px 4px rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(211, 47, 47, 0.1);
    position: relative;
    overflow: hidden;
}

.selected-sport-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d32f2f 0%, #ffd700 100%);
}

.selected-sport-info h3 {
    color: #d32f2f;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.selected-sport-info p {
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

/* Sport Display with Logo in Form */
.selected-sport-display-form {
    display: flex;
    align-items: center;
    gap: 20px;
    justify-content: center;
}

.sport-logo-form {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 12px;
    background: linear-gradient(145deg, #f8f9fa 0%, #ffffff 100%);
    padding: 8px;
    box-shadow: 
        0 8px 20px rgba(211, 47, 47, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.sport-logo-form:hover {
    transform: scale(1.05) rotate(2deg);
    box-shadow: 
        0 12px 30px rgba(211, 47, 47, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.9);
}

.sport-info-text {
    flex: 1;
    text-align: left;
}

.sport-info-text h3 {
    color: #d32f2f;
    font-size: 1.5rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #d32f2f 0%, #b71c1c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sport-info-text p {
    color: #495057;
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
}

/* Folio Check Forms */
.folio-check {
    padding: 40px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 20px;
    position: relative;
}

.folio-check::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #d32f2f 0%, #ffd700 100%);
}

.search-container {
    display: flex;
    gap: 20px;
    margin-bottom: 40px;
    justify-content: center;
    align-items: center;
}

.folio-result {
    max-width: 600px;
    margin: 0 auto;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        0 15px 35px rgba(0, 0, 0, 0.08),
        inset 0 2px 4px rgba(255, 255, 255, 0.9);
}

/* Input Validation States */
.form-input:valid:not(:placeholder-shown) {
    border-color: #28a745;
    background: linear-gradient(145deg, #f8fff9 0%, #ffffff 100%);
}

.form-input:invalid:not(:focus):not(:placeholder-shown) {
    border-color: #dc3545;
    background: linear-gradient(145deg, #fff5f5 0%, #ffffff 100%);
}

/* Modern Checkbox and Radio Styles */
.form-checkbox,
.form-radio {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
    padding: 15px;
    border-radius: 12px;
    background: linear-gradient(145deg, #ffffff 0%, #f8f9fa 100%);
    transition: all 0.3s ease;
    cursor: pointer;
}

.form-checkbox:hover,
.form-radio:hover {
    background: linear-gradient(145deg, #fff5f5 0%, #ffffff 100%);
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(211, 47, 47, 0.05);
}

.form-checkbox input[type="checkbox"],
.form-radio input[type="radio"] {
    width: 20px;
    height: 20px;
    accent-color: #d32f2f;
    cursor: pointer;
}

.form-checkbox label,
.form-radio label {
    cursor: pointer;
    margin: 0;
    font-weight: 600;
    color: #495057;
}

/* Modern File Upload Styles */
.form-file {
    position: relative;
    display: inline-block;
    cursor: pointer;
    width: 100%;
}

.form-file input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.form-file-label {
    display: block;
    padding: 30px;
    border: 3px dashed rgba(211, 47, 47, 0.3);
    border-radius: 20px;
    text-align: center;
    background: linear-gradient(145deg, #f8f9fa 0%, #ffffff 100%);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 600;
    color: #495057;
    position: relative;
    overflow: hidden;
}

.form-file-label::before {
    content: '📁';
    display: block;
    font-size: 2rem;
    margin-bottom: 10px;
}

.form-file:hover .form-file-label {
    border-color: #d32f2f;
    background: linear-gradient(145deg, #fff5f5 0%, #ffffff 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 12px 30px rgba(211, 47, 47, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.9);
}

/* Form Section Transitions */
.form-step {
    display: none;
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.form-step.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Required Field Indicator */
.form-label::after {
    content: '';
}

.form-label.required::after {
    content: ' *';
    color: #d32f2f;
    font-weight: 800;
    font-size: 1.2em;
}

/* Modern Form Progress Indicator */
.form-progress {
    display: flex;
    justify-content: space-between;
    margin-bottom: 40px;
    padding: 0 30px;
    position: relative;
}

.form-progress::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 50px;
    right: 50px;
    height: 4px;
    background: linear-gradient(90deg, #e9ecef 0%, #dee2e6 100%);
    border-radius: 2px;
    z-index: 1;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    z-index: 2;
}

.progress-step.completed::before {
    background: linear-gradient(90deg, #d32f2f 0%, #ffd700 100%);
}

.progress-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(145deg, #e9ecef 0%, #dee2e6 100%);
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    position: relative;
    z-index: 3;
    font-weight: 800;
    font-size: 1.1rem;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.progress-step.completed .progress-step-circle {
    background: linear-gradient(145deg, #d32f2f 0%, #b71c1c 100%);
    color: #ffffff;
    transform: scale(1.1);
    box-shadow: 
        0 12px 30px rgba(211, 47, 47, 0.3),
        inset 0 2px 4px rgba(255, 255, 255, 0.2);
}

.progress-step.active .progress-step-circle {
    background: linear-gradient(145deg, #ffd700 0%, #ffed4a 100%);
    color: #1a1a1a;
    transform: scale(1.15);
    box-shadow: 
        0 15px 35px rgba(255, 215, 0, 0.4),
        inset 0 2px 4px rgba(255, 255, 255, 0.7);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1.15); }
    50% { transform: scale(1.2); }
}

.progress-step-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.progress-step.completed .progress-step-label {
    color: #d32f2f;
}

.progress-step.active .progress-step-label {
    color: #b71c1c;
    font-weight: 800;
}

/* Success Section Styles */
.success-content {
    text-align: center;
    padding: 40px;
    background: linear-gradient(145deg, #f8fff9 0%, #ffffff 100%);
    border-radius: 25px;
    box-shadow: 
        0 25px 50px rgba(76, 175, 80, 0.1),
        inset 0 2px 4px rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(76, 175, 80, 0.2);
    position: relative;
    overflow: hidden;
}

.success-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #4caf50 0%, #8bc34a 50%, #4caf50 100%);
}

.success-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    animation: bounce 1s ease-in-out infinite alternate;
}

@keyframes bounce {
    0% { transform: translateY(0); }
    100% { transform: translateY(-10px); }
}

.success-content h2 {
    color: #2e7d32;
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 25px;
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.success-details {
    margin: 30px 0;
}

.success-card {
    background: linear-gradient(145deg, #ffffff 0%, #f8fff9 100%);
    border-radius: 20px;
    padding: 30px;
    box-shadow: 
        0 15px 35px rgba(76, 175, 80, 0.08),
        inset 0 2px 4px rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(76, 175, 80, 0.2);
}

.folio-display {
    font-size: 3rem;
    font-weight: 900;
    color: #d32f2f;
    background: linear-gradient(145deg, #fff5f5 0%, #ffffff 100%);
    padding: 20px;
    border-radius: 15px;
    margin: 20px 0;
    letter-spacing: 3px;
    text-transform: uppercase;
    box-shadow: 
        0 10px 25px rgba(211, 47, 47, 0.15),
        inset 0 2px 4px rgba(255, 255, 255, 0.9);
    border: 2px solid rgba(211, 47, 47, 0.2);
}

/* Responsive Form Styles */
@media (max-width: 768px) {
    .form-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .registration-form,
    .folio-check {
        padding: 25px 20px;
        margin: 10px;
    }
    
    .search-container {
        flex-direction: column;
        align-items: center;
        gap: 25px;
    }
    
    .form-input.large {
        width: 100%;
        margin-bottom: 20px;
        padding: 20px 25px;
        font-size: 1.2rem;
    }
    
    .form-select {
        width: 100%;
        max-width: 350px;
    }
    
    .selected-sport-info {
        margin: 15px 10px;
        padding: 25px 20px;
    }
    
    .form-progress {
        padding: 0 20px;
        margin-bottom: 30px;
    }
    
    .progress-step-circle {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }
    
    .success-content {
        padding: 30px 20px;
    }
    
    .folio-display {
        font-size: 2.2rem;
        padding: 15px;
    }
}

@media (max-width: 480px) {
    .form-input,
    .form-select {
        padding: 15px 18px;
        font-size: 1rem;
    }
    
    .form-grid {
        gap: 20px;
    }
    
    .registration-form,
    .folio-check {
        padding: 20px 15px;
    }
    
    .search-container {
        padding: 0 10px;
    }
    
    .form-progress {
        padding: 0 15px;
        margin-bottom: 25px;
    }
    
    .progress-step-circle {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }
    
    .progress-step-label {
        font-size: 0.8rem;
    }
    
    .success-content {
        padding: 25px 15px;
    }
    
    .success-content h2 {
        font-size: 1.8rem;
    }
    
    .folio-display {
        font-size: 1.8rem;
        letter-spacing: 2px;
    }
    
    .selected-sport-info h3 {
        font-size: 1.3rem;
    }
    
    .selected-sport-info p {
        font-size: 1rem;
    }
}