/* 
 * Estilos Personalizados - Sistema de Gestión de Auxilios MULTIROBLE
 * Versión 1.0 - Diseño profesional y animado
 */

:root {
    --primary-blue: #1e3c72;
    --secondary-blue: #2a5298;
    --light-blue: #e3f2fd;
    --purple: #667eea;
    --purple-dark: #764ba2;
    --transition-speed: 0.3s;
}

/* Particles.js Background */
#particles-js {
    position: fixed;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: -1;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

/* Animaciones globales */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInLeft {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

/* Fuentes */
* {
    font-family: 'Montserrat Alternates', sans-serif;
}

body {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    overflow-x: hidden;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
}

footer {
    margin-top: auto;
}

/* Navbar mejorado */
.navbar {
    backdrop-filter: blur(10px);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    animation: slideInLeft 0.6s ease-out;
    position: relative;
    z-index: 1000;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    transition: all var(--transition-speed);
}

.navbar-brand:hover {
    transform: scale(1.1);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.5);
}

.nav-link {
    position: relative;
    transition: all var(--transition-speed);
    cursor: pointer !important;
    pointer-events: auto !important;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: white;
    transition: all var(--transition-speed);
    transform: translateX(-50%);
}

.nav-link:hover::before {
    width: 80%;
}

/* Cards mejoradas */
.card {
    border: none;
    border-radius: 20px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    transition: all var(--transition-speed);
    overflow: hidden;
    position: relative;
    background: white;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    transition: left 0.5s;
}

.card:hover::before {
    left: 100%;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

/* Deshabilitar efectos hover en tablas y DataTables */
.table-responsive,
.dataTables_wrapper,
.dataTable,
table.table {
    transform: none !important;
    transition: none !important;
}

.table-responsive:hover,
.dataTables_wrapper:hover,
.dataTable:hover,
table.table:hover {
    transform: none !important;
    box-shadow: none !important;
    scale: 1 !important;
}

.table-responsive .card,
.card:has(.table-responsive),
.card:has(.dataTables_wrapper) {
    transform: none !important;
}

.table-responsive .card:hover,
.card:has(.table-responsive):hover,
.card:has(.dataTables_wrapper):hover {
    transform: none !important;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15) !important;
}

/* Tarjetas de auxilios */
.auxilio-card {
    animation: fadeIn 0.6s ease-out backwards;
    cursor: pointer;
    position: relative;
}

.auxilio-card:nth-child(1) { animation-delay: 0.1s; }
.auxilio-card:nth-child(2) { animation-delay: 0.2s; }
.auxilio-card:nth-child(3) { animation-delay: 0.3s; }
.auxilio-card:nth-child(4) { animation-delay: 0.4s; }
.auxilio-card:nth-child(5) { animation-delay: 0.5s; }
.auxilio-card:nth-child(6) { animation-delay: 0.6s; }
.auxilio-card:nth-child(7) { animation-delay: 0.7s; }

.auxilio-card .card-header {
    position: relative;
    overflow: hidden;
    transition: all var(--transition-speed);
}

.auxilio-card .card-header i {
    transition: all var(--transition-speed);
}

.auxilio-card:hover .card-header {
    transform: scale(1.05);
}

.auxilio-card:hover .card-header i {
    animation: pulse 1s infinite;
}

/* Gradiente principal */
.gradient-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    position: relative;
    overflow: hidden;
}

.gradient-primary::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

/* Botones mejorados */
.btn {
    border-radius: 25px;
    padding: 12px 30px;
    font-weight: 600;
    transition: all var(--transition-speed);
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    border: none;
    box-shadow: 0 5px 15px rgba(30, 60, 114, 0.3);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(30, 60, 114, 0.5);
}

/* Alertas animadas */
.alert {
    border-radius: 15px;
    border: none;
    animation: slideInRight 0.5s ease-out;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Hero section */
.hero-section {
    animation: fadeIn 0.8s ease-out;
}

.hero-section h1 {
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
}

/* Badges mejorados */
.badge {
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Inputs mejorados */
.form-control, .form-select {
    border-radius: 12px;
    border: 2px solid #e0e0e0;
    padding: 12px 20px;
    transition: all var(--transition-speed);
}

.form-control:focus, .form-select:focus {
    border-color: var(--secondary-blue);
    box-shadow: 0 0 0 0.2rem rgba(42, 82, 152, 0.25);
    transform: translateY(-2px);
}

/* Loading spinner personalizado */
.spinner-border {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer mejorado */
footer {
    animation: slideInLeft 0.8s ease-out;
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.2);
    position: relative;
    z-index: 10;
}

/* Efectos de hover en íconos */
i {
    transition: all var(--transition-speed);
}

.card:hover i {
    transform: rotate(5deg) scale(1.1);
}

/* Tabla mejorada */
.table {
    border-radius: 15px;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
}

.table tbody tr {
    transition: all var(--transition-speed);
}

.table tbody tr:hover {
    background: rgba(42, 82, 152, 0.05);
    transform: scale(1.01);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

/* Breadcrumb mejorado */
.breadcrumb {
    animation: slideInRight 0.5s ease-out;
}

/* Progress bar animado */
.progress {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: inset 0 2px 5px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    background: linear-gradient(90deg, var(--primary-blue), var(--secondary-blue));
    animation: shimmer 2s infinite;
    background-size: 200% 100%;
}

/* Tooltips personalizados */
.tooltip-inner {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    border-radius: 10px;
    padding: 10px 15px;
}

/* Modal mejorado */
.modal-content {
    border-radius: 20px;
    border: none;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.modal-header {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    color: white;
    border-radius: 20px 20px 0 0;
}

/* Scroll suave */
html {
    scroll-behavior: smooth;
}

/* Scrollbar personalizado (Chrome/Edge/Safari) */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary-blue);
}

/* Efectos de glassmorphism */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Sombras suaves */
.shadow-soft {
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* Texto con gradiente */
.text-gradient {
    background: linear-gradient(135deg, var(--primary-blue) 0%, var(--secondary-blue) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Animación de entrada para modales */
.modal.fade .modal-dialog {
    transform: scale(0.8);
    transition: transform 0.3s ease-out;
}

.modal.show .modal-dialog {
    transform: scale(1);
}

/* Estilos para carga de archivos */
.file-upload-wrapper {
    position: relative;
    width: 100%;
    margin-top: 10px;
}

.file-upload-wrapper input[type="file"] {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
    z-index: 2;
}

.file-upload-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 30px;
    border: 2px dashed #667eea;
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.05) 0%, rgba(118, 75, 162, 0.05) 100%);
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 150px;
}

.file-upload-label:hover {
    border-color: #764ba2;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    transform: scale(1.02);
}

.file-upload-label.file-selected {
    border-color: #28a745;
    background: linear-gradient(135deg, rgba(40, 167, 69, 0.1) 0%, rgba(34, 139, 58, 0.1) 100%);
}

.file-upload-label i {
    color: #667eea;
    margin-bottom: 10px;
}

.file-upload-label.file-selected i {
    color: #28a745;
}

.file-upload-label div {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.file-upload-label small {
    color: #666;
    font-size: 0.85rem;
}

/* Efecto parallax suave */
.parallax {
    transition: transform 0.1s ease-out;
}

/* Main content con z-index */
main {
    position: relative;
    z-index: 1;
}

/* Responsive mejoras */
@media (max-width: 768px) {
    .card {
        margin-bottom: 20px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(30, 60, 114, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
}

.loading-overlay.hide {
    animation: fadeOut 0.3s ease-out;
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

/* Efecto de destello en botones */
@keyframes shine {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

.btn-shine {
    position: relative;
    overflow: hidden;
}

.btn-shine::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shine 3s infinite;
}

/* Números animados */
@keyframes countUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.stat-number {
    animation: countUp 0.6s ease-out;
}
