/* ========================================
   ENHANCEMENTS CSS - MEJORAS FRONTEND
   Sistema Tramperas
   ======================================== */

/* ========================================
   MEJORAS DE ANIMACIONES Y TRANSICIONES
   ======================================== */

/* Animaciones suaves para todos los elementos interactivos */
* {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Mejoras en botones */
.btn {
    position: relative;
    overflow: hidden;
    transform: translateY(0);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.btn:active {
    transform: translateY(0);
    transition: all 0.1s ease;
}

/* Efecto ripple para botones */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:active::before {
    width: 300px;
    height: 300px;
}

/* ========================================
   MEJORAS EN TARJETAS DE PERFIL
   ======================================== */

.profile-card {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: scale(1);
    filter: brightness(1);
}

.profile-card:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    z-index: 10;
}

.profile-card__overlay {
    transition: all 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.profile-card:hover .profile-card__overlay {
    opacity: 1;
    transform: translateY(0);
}

/* Animación de entrada para las tarjetas */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.profile-card {
    animation: fadeInUp 0.6s ease-out;
}

.profile-card:nth-child(1) { animation-delay: 0.1s; }
.profile-card:nth-child(2) { animation-delay: 0.2s; }
.profile-card:nth-child(3) { animation-delay: 0.3s; }
.profile-card:nth-child(4) { animation-delay: 0.4s; }
.profile-card:nth-child(5) { animation-delay: 0.5s; }
.profile-card:nth-child(6) { animation-delay: 0.6s; }

/* ========================================
   MEJORAS EN FORMULARIOS
   ======================================== */

.form-input {
    transition: all 0.3s ease;
    border: 2px solid #e1e5e9;
}

.form-input:focus {
    border-color: #5BCEFA;
    box-shadow: 0 0 0 3px rgba(91, 206, 250, 0.1);
    transform: translateY(-1px);
}

.form-input:hover {
    border-color: #cbd5e0;
}

/* Animación para labels */
.form-label {
    transition: all 0.3s ease;
    position: relative;
}

.form-input:focus + .form-label,
.form-input:not(:placeholder-shown) + .form-label {
    color: #5BCEFA;
    transform: translateY(-2px);
}

/* ========================================
   MEJORAS EN LOADING STATES
   ======================================== */

.loading-overlay {
    backdrop-filter: blur(5px);
    background: rgba(255, 255, 255, 0.9);
}

.loading-content {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.7;
        transform: scale(1.05);
    }
}

/* Spinner mejorado */
.fa-spinner {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ========================================
   MEJORAS EN NOTIFICACIONES
   ======================================== */

/* Animaciones para notificaciones */
@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes slideOutRight {
    from {
        opacity: 1;
        transform: translateX(0);
    }
    to {
        opacity: 0;
        transform: translateX(100%);
    }
}

/* ========================================
   MEJORAS EN HEADER
   ======================================== */

.header {
    backdrop-filter: blur(10px);
    background: linear-gradient(135deg, rgba(91, 206, 250, 0.95) 0%, rgba(245, 169, 184, 0.95) 100%);
    transition: all 0.3s ease;
}

.header.scrolled {
    background: linear-gradient(135deg, rgba(91, 206, 250, 0.98) 0%, rgba(245, 169, 184, 0.98) 100%);
    box-shadow: 0 4px 20px rgba(91, 206, 250, 0.3);
}

/* ========================================
   MEJORAS EN GALERÍA
   ======================================== */

.galeria-item {
    transition: all 0.3s ease;
    cursor: pointer;
}

.galeria-item:hover {
    transform: scale(1.05);
    filter: brightness(1.1);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
    z-index: 5;
}

/* ========================================
   MEJORAS EN FILTROS
   ======================================== */

.filter-select {
    transition: all 0.3s ease;
}

.filter-select:focus {
    border-color: #5BCEFA;
    box-shadow: 0 0 0 3px rgba(91, 206, 250, 0.1);
    transform: translateY(-1px);
}

.filter-button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.filter-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(91, 206, 250, 0.3);
}

.filter-button:active {
    transform: translateY(0);
}

/* ========================================
   MEJORAS EN MÓVIL
   ======================================== */

@media (max-width: 768px) {
    .profile-card:hover {
        transform: scale(1.02);
    }
    
    .btn:hover {
        transform: translateY(-1px);
    }
    
    .form-input:focus {
        transform: none;
    }
}

/* ========================================
   MEJORAS EN ACCESIBILIDAD
   ======================================== */

/* Focus visible mejorado */
*:focus-visible {
    outline: 2px solid #5BCEFA;
    outline-offset: 2px;
}

/* Reducir animaciones para usuarios que lo prefieren */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ========================================
   MEJORAS EN ESTADOS DE CARGA
   ======================================== */

/* Skeleton loading para tarjetas */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ========================================
   MEJORAS EN SCROLL SUAVE
   ======================================== */

html {
    scroll-behavior: smooth;
}

/* ========================================
   MEJORAS EN TOOLTIP
   ======================================== */

.tooltip {
    position: relative;
}

.tooltip::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::after {
    opacity: 1;
}

/* ========================================
   MEJORAS EN MODO OSCURO (PREPARACIÓN)
   ======================================== */

[data-theme="dark"] {
    --bg-primary: #1a1a1a;
    --bg-secondary: #2d2d2d;
    --text-primary: #ffffff;
    --text-secondary: #cccccc;
    --accent-color: #5BCEFA;
}

/* ========================================
   MEJORAS EN PERFORMANCE
   ======================================== */

/* Optimización para GPU */
.profile-card,
.btn,
.form-input,
.galeria-item {
    will-change: transform;
}

/* ========================================
   MEJORAS EN IMPRESIÓN
   ======================================== */

@media print {
    .btn,
    .header__nav,
    .footer {
        display: none !important;
    }
    
    .profile-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}




