/*******************************************************************************
 * CAMPAMENTO IPUC - Sistema de Registro Profesional
 * CSS Principal - Diseño Moderno y Responsivo
 *******************************************************************************/

/* ============ VARIABLES CSS ============ */
:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #818cf8;
    --secondary-color: #10b981;
    --secondary-dark: #059669;
    --accent-color: #f59e0b;
    --danger-color: #ef4444;
    --success-color: #22c55e;
    --warning-color: #f59e0b;
    --info-color: #3b82f6;
    --dark-color: #1e293b;
    --light-color: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --white: #ffffff;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.15);
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-full: 9999px;
    --transition: all 0.3s ease;
}

/* ============ RESET Y BASE ============ */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, sans-serif;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 50%, #f0fdf4 100%);
    min-height: 100vh;
    color: var(--dark-color);
    line-height: 1.6;
}

/* ============ CONTENEDOR PRINCIPAL ============ */
.main-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* ============ HEADER / BANNER ============ */
.hero-banner {
    position: relative;
    width: 100%;
    height: 500px;
    overflow: hidden;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.slideshow {
    position: relative;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    object-fit: cover;
}

.slide.active {
    opacity: 1;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgb(99 102 241 / 44%), rgb(16 185 129 / 24%));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: var(--white);
    text-align: center;
    padding: 20px;
}

.hero-title {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle {
    font-size: 1.2rem;
    opacity: 0.95;
    font-weight: 500;
}

.hero-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

/* ============ NAVEGACIÓN TABS ============ */
.tabs-navigation {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--white);
    padding: 15px;
    margin-top: -30px;
    margin-left: 20px;
    margin-right: 20px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
}

.tabs-wrapper {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    background: var(--gray-100);
    color: var(--gray-600);
    font-size: 15px;
    font-weight: 600;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn:hover {
    background: var(--gray-200);
    color: var(--dark-color);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    box-shadow: var(--shadow-md);
}

.tab-btn i {
    font-size: 18px;
}

.tab-step {
    background: rgba(255,255,255,0.3);
    padding: 2px 10px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 700;
}

/* ============ CONTENIDO TABS ============ */
.tab-content-wrapper {
    padding: 20px;
}

.tab-panel {
    display: none;
    animation: fadeIn 0.4s ease;
}

.tab-panel.active {
    display: block;
}

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

/* ============ CARDS ============ */
.card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    margin-bottom: 20px;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    padding: 18px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-header i {
    font-size: 24px;
	color: #6366f1;
}

.card-header h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin: 0;
	color: #000000;
}

.card-header.green {
    background: linear-gradient(135deg, var(--secondary-color), var(--secondary-dark));
}

.card-header.orange {
    background: linear-gradient(135deg, var(--accent-color), #d97706);
}

.card-body {
    padding: 24px;
}

/* ============ FORMULARIOS ============ */
.form-section {
    margin-bottom: 30px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid var(--gray-200);
}

.section-title i {
    font-size: 20px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.form-group {
    margin-bottom: 0;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 8px;
}

.form-label .required {
    color: var(--danger-color);
}

.form-label i {
    color: var(--primary-color);
    font-size: 14px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    font-size: 15px;
    color: var(--dark-color);
    background: var(--white);
    transition: var(--transition);
}

.form-control:hover {
    border-color: var(--gray-300);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(99, 102, 241, 0.15);
}

.form-control.error {
    border-color: var(--danger-color);
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.15);
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke='%236366f1'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M19 9l-7 7-7-7'%3E%3C/path%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 20px;
    padding-right: 45px;
    cursor: pointer;
}

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

/* ============ SELECTOR TIPO PARTICIPANTE ============ */
.participant-selector {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
}

.participant-option {
    flex: 1;
    padding: 20px;
    border: 3px solid var(--gray-200);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    background: var(--white);
}

.participant-option:hover {
    border-color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.participant-option.selected {
    border-color: var(--primary-color);
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(99, 102, 241, 0.03));
}

.participant-option i {
    font-size: 40px;
    color: var(--primary-color);
    margin-bottom: 10px;
    display: block;
}

.participant-option h4 {
    font-size: 1rem;
    color: var(--dark-color);
    margin-bottom: 5px;
}

.participant-option p {
    font-size: 13px;
    color: var(--gray-500);
    margin: 0;
}

/* ============ FIRMA DIGITAL ============ */
.signature-container {
    background: var(--gray-100);
    border-radius: var(--radius);
    padding: 20px;
}

.signature-canvas {
    width: 100%;
    max-width: 500px;
    height: 180px;
    border: 2px dashed var(--gray-300);
    border-radius: var(--radius);
    background: var(--white);
    cursor: crosshair;
    touch-action: none;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    display: block;
}

.signature-canvas.signing {
    border-color: var(--primary-color);
    border-style: solid;
}

/* Estilo cuando la firma tiene contenido */
.signature-canvas.has-signature {
    border-color: var(--success-color);
    border-style: solid;
}

.signature-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
    flex-wrap: wrap;
}

.signature-actions .btn {
    flex: 1;
    min-width: 120px;
}

/* ============ UPLOAD DE ARCHIVOS ============ */
.upload-zone {
    border: 3px dashed var(--gray-300);
    border-radius: var(--radius-lg);
    padding: 30px;
    text-align: center;
    background: var(--gray-100);
    transition: var(--transition);
    cursor: pointer;
}

.upload-zone:hover, .upload-zone.dragover {
    border-color: var(--primary-color);
    background: rgba(99, 102, 241, 0.05);
}

.upload-zone i {
    font-size: 48px;
    color: var(--gray-400);
    margin-bottom: 15px;
}

.upload-zone h4 {
    color: var(--gray-700);
    margin-bottom: 8px;
}

.upload-zone p {
    color: var(--gray-500);
    font-size: 14px;
    margin: 0;
}

.upload-zone.has-file {
    border-color: var(--success-color);
    background: rgba(34, 197, 94, 0.08);
}

.upload-zone.has-file i {
    color: var(--success-color);
}

.upload-preview {
    margin-top: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.upload-preview img {
    max-width: 120px;
    max-height: 80px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
}

.upload-preview .file-name {
    font-size: 14px;
    color: var(--success-color);
    font-weight: 600;
}

.document-uploads {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* ============ BOTONES ============ */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: var(--white);
    box-shadow: 0 4px 14px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(99, 102, 241, 0.5);
}

.btn-secondary {
    background: var(--gray-200);
    color: var(--gray-700);
}

.btn-secondary:hover {
    background: var(--gray-300);
}

.btn-success {
    background: linear-gradient(135deg, var(--success-color), var(--secondary-dark));
    color: var(--white);
    box-shadow: 0 4px 14px rgba(34, 197, 94, 0.4);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(34, 197, 94, 0.5);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger-color), #dc2626);
    color: var(--white);
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: var(--white);
}

.btn-lg {
    padding: 18px 40px;
    font-size: 18px;
}

.btn-block {
    width: 100%;
}

.btn-icon {
    padding: 12px;
    border-radius: var(--radius);
}

/* ============ PAGOS ============ */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.payment-card {
    background: var(--white);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: var(--transition);
    border: 2px solid transparent;
}

.payment-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary-light);
}

.payment-card-header {
    padding: 15px 20px;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--white);
}

.payment-card-header.nequi {
    background: linear-gradient(135deg, #e91e63, #ad1457);
}

.payment-card-header.daviplata {
    background: linear-gradient(135deg, #e53935, #c62828);
}

.payment-card-header.bancolombia {
    background: linear-gradient(135deg, #ffc107, #f9a825);
    color: var(--dark-color);
}

.payment-card-body {
    padding: 20px;
    text-align: center;
}

.payment-card-body img {
    max-width: 100%;
    max-height: 200px;
    border-radius: var(--radius);
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
}

.payment-info {
    background: var(--gray-100);
    padding: 15px;
    border-radius: var(--radius);
    margin-top: 15px;
}

.payment-info p {
    margin: 8px 0;
    font-size: 14px;
    color: var(--gray-600);
}

.payment-info strong {
    color: var(--dark-color);
}

/* ============ INSTRUCCIONES ============ */
.instructions-box {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(16, 185, 129, 0.08));
    border-radius: var(--radius-lg);
    padding: 25px;
    margin-bottom: 30px;
    border-left: 5px solid var(--primary-color);
}

.instructions-box h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.instructions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.instructions-list li {
    padding: 10px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    border-bottom: 1px solid var(--gray-200);
}

.instructions-list li:last-child {
    border-bottom: none;
}

.instructions-list .step-number {
    background: var(--primary-color);
    color: var(--white);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

/* ============ ALERTAS ============ */
.alert {
    padding: 16px 20px;
    border-radius: var(--radius);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert i {
    font-size: 24px;
}

.alert-success {
    background: rgba(34, 197, 94, 0.15);
    border: 1px solid var(--success-color);
    color: #166534;
}

.alert-error {
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid var(--danger-color);
    color: #991b1b;
}

.alert-warning {
    background: rgba(245, 158, 11, 0.15);
    border: 1px solid var(--warning-color);
    color: #92400e;
}

.alert-info {
    background: rgba(59, 130, 246, 0.15);
    border: 1px solid var(--info-color);
    color: #1e40af;
}

/* ============ VERIFICACIÓN DOCUMENTO ============ */
.verification-box {
    background: var(--white);
    border-radius: var(--radius-lg);
    padding: 30px;
    box-shadow: var(--shadow);
}

.verification-result {
    padding: 20px;
    border-radius: var(--radius);
    margin-top: 20px;
    display: none;
}

.verification-result.show {
    display: block;
    animation: fadeIn 0.4s ease;
}

.verification-result.success {
    background: rgba(34, 197, 94, 0.1);
    border: 2px solid var(--success-color);
}

.verification-result.error {
    background: rgba(239, 68, 68, 0.1);
    border: 2px solid var(--danger-color);
}

.participant-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.info-item {
    background: var(--white);
    padding: 12px;
    border-radius: var(--radius-sm);
}

.info-item label {
    font-size: 12px;
    color: var(--gray-500);
    display: block;
    margin-bottom: 4px;
}

.info-item span {
    font-weight: 600;
    color: var(--dark-color);
}

/* ============ FIELDSET ============ */
fieldset {
    border: 2px solid var(--gray-200);
    border-radius: var(--radius);
    padding: 25px;
    margin-bottom: 25px;
    background: var(--white);
}

legend {
    padding: 8px 16px;
    background: var(--primary-color);
    color: var(--white);
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 15px;
}

/* ============ FORMULARIO OCULTO INICIAL ============ */
.form-hidden {
    display: none;
}

.form-visible {
    display: block;
    animation: slideDown 0.4s ease;
}

@keyframes slideDown {
    from { 
        opacity: 0; 
        transform: translateY(-20px);
        max-height: 0;
    }
    to { 
        opacity: 1; 
        transform: translateY(0);
        max-height: 5000px;
    }
}

/* ============ FOOTER ============ */
.footer {
    text-align: center;
    padding: 30px;
    margin-top: 30px;
    color: var(--gray-500);
    font-size: 14px;
}

.footer a {
    color: var(--primary-color);
    text-decoration: none;
}

/* ============ RESPONSIVE ============ */
@media (max-width: 768px) {
    .hero-banner {
        height: 200px;
    }
    
    .hero-title {
        font-size: 1.8rem;
    }
    
    .hero-subtitle {
        font-size: 1rem;
    }
    
    .tabs-navigation {
        margin-left: 10px;
        margin-right: 10px;
        padding: 10px;
    }
    
    .tabs-wrapper {
        flex-direction: column;
    }
    
    .tab-btn {
        width: 100%;
        justify-content: center;
    }
    
    .participant-selector {
        flex-direction: column;
    }
    
    .form-grid {
        grid-template-columns: 1fr;
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
    
    .document-uploads {
        grid-template-columns: 1fr;
    }
    
    .btn-lg {
        padding: 14px 24px;
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .hero-banner {
        height: 160px;
        border-radius: 0;
    }
    
    .hero-title {
        font-size: 1.4rem;
    }
    
    .hero-icon {
        font-size: 2rem;
    }
    
    .card-body {
        padding: 16px;
    }
    
    .signature-canvas {
        height: 150px;
        max-width: 100%;
    }
    
    .signature-container {
        padding: 15px;
    }
    
    .signature-actions {
        flex-direction: column;
    }
    
    .signature-actions .btn {
        width: 100%;
    }
    
    fieldset {
        padding: 15px;
    }
}

/* ============ UTILIDADES ============ */
.text-center { text-align: center; }
.text-left { text-align: left; }
.text-right { text-align: right; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }
.hidden { display: none !important; }
.visible { display: block !important; }

/* ============ LOADING SPINNER ============ */
.spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* ============ PROGRESS STEPS ============ */
.progress-steps {
    display: flex;
    justify-content: center;
    margin-bottom: 30px;
}

.progress-step {
    display: flex;
    align-items: center;
}

.step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--gray-200);
    color: var(--gray-500);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    transition: var(--transition);
}

.step-circle.active {
    background: var(--primary-color);
    color: var(--white);
}

.step-circle.completed {
    background: var(--success-color);
    color: var(--white);
}

.step-line {
    width: 60px;
    height: 4px;
    background: var(--gray-200);
    margin: 0 10px;
}

.step-line.completed {
    background: var(--success-color);
}

/* Status badges */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
}

.badge-success {
    background: rgba(34, 197, 94, 0.15);
    color: var(--success-color);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.15);
    color: var(--warning-color);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--danger-color);
}

.badge-info {
    background: rgba(59, 130, 246, 0.15);
    color: var(--info-color);
}

.investment-box {
    margin-top: 20px;
    padding: 20px;
    border-radius: 12px;
    background: linear-gradient(135deg, #f8fafc, #eef2ff);
    border: 1px solid #e0e7ff;
}

.investment-box h4 {
    margin-bottom: 5px;
    color: #1e3a8a;
}

.investment-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 15px;
}

.investment-list {
    list-style: none;
    padding: 0;
    margin-bottom: 15px;
}

.investment-list li {
    padding: 8px 0;
    font-size: 15px;
}

.investment-notes {
    background: #fff;
    padding: 12px;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.investment-notes ul {
    margin: 8px 0 0;
    padding-left: 18px;
}

.investment-notes li {
    font-size: 14px;
    color: #374151;
}