/* ===== MEJORAS ESPECÍFICAS PARA RIFAS ===== */

/* Variables específicas para rifas */
:root {
    --rifa-card-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.1);
    --rifa-card-shadow-hover: 0 0.5rem 2rem rgba(0, 0, 0, 0.15);
    --rifa-border-radius: 1rem;
    --rifa-transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ===== MEJORAS PARA CARDS DE RIFAS ===== */

.rifa-card {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(255, 255, 255, 0.9) 100%);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: var(--rifa-transition);
}

.rifa-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #2563eb 0%, #3b82f6 100%);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.rifa-card:hover::before {
    transform: scaleX(1);
}

.rifa-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--rifa-card-shadow-hover);
}

/* ===== MEJORAS PARA IMÁGENES DE RIFAS ===== */

.rifa-card .card-img-top {
    position: relative;
    overflow: hidden;
    background: linear-gradient(45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(-45deg, #f0f0f0 25%, transparent 25%), 
                linear-gradient(45deg, transparent 75%, #f0f0f0 75%), 
                linear-gradient(-45deg, transparent 75%, #f0f0f0 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
}

.rifa-card .card-img-top img {
    transition: var(--rifa-transition);
    filter: brightness(0.9);
}

.rifa-card:hover .card-img-top img {
    transform: scale(1.1);
    filter: brightness(1);
}

/* ===== MEJORAS PARA BADGES DE MÚLTIPLES IMÁGENES ===== */

.rifa-card .badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* ===== MEJORAS PARA TÍTULOS DE RIFAS ===== */

.rifa-card .card-title {
    font-weight: 700;
    font-size: 1.2rem;
    line-height: 1.3;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ===== MEJORAS PARA DESCRIPCIONES ===== */

.rifa-card .card-text {
    color: #495057;
    line-height: 1.6;
    margin-bottom: 1rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    font-weight: 500;
}

/* ===== MEJORAS PARA PRECIOS ===== */

.rifa-card .price-section {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.05) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border: 1px solid rgba(37, 99, 235, 0.1);
}

.rifa-card .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.rifa-card .price-currency {
    font-size: 1rem;
    color: #495057;
    font-weight: 600;
}

/* ===== MEJORAS PARA NÚMEROS ===== */

.rifa-card .numbers-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.rifa-card .numbers-text {
    font-size: 0.9rem;
    color: #495057;
    font-weight: 600;
}

.rifa-card .numbers-count {
    font-weight: 600;
    color: var(--dark-color);
}

/* ===== MEJORAS PARA PROGRESO ===== */

.rifa-card .progress-container {
    margin-bottom: 1rem;
}

.rifa-card .progress-label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    font-size: 0.85rem;
    color: #495057;
    font-weight: 600;
}

.rifa-card .progress {
    height: 8px;
    border-radius: 4px;
    background: rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

.rifa-card .progress-bar {
    background: linear-gradient(90deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border-radius: 4px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.rifa-card .progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* ===== MEJORAS PARA FECHAS ===== */

.rifa-card .dates-section {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.rifa-card .date-item {
    text-align: center;
    padding: 0.75rem;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 0.5rem;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.rifa-card .date-label {
    font-size: 0.75rem;
    color: #495057;
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: block;
}

.rifa-card .date-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-color);
}

/* ===== MEJORAS PARA BOTONES DE ACCIÓN ===== */

.rifa-card .action-buttons {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.rifa-card .action-buttons .btn {
    flex: 1;
    min-width: 120px;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.rifa-card .action-buttons .btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
    z-index: -1;
}

.rifa-card .action-buttons .btn:hover::before {
    left: 100%;
}

.rifa-card .btn-view {
    background: linear-gradient(135deg, var(--info-color) 0%, #3498db 100%);
    color: white;
    border: none;
}

.rifa-card .btn-buy {
    background: linear-gradient(135deg, var(--success-color) 0%, #27ae60 100%);
    color: white;
    border: none;
}

/* ===== MEJORAS PARA ESTADOS DE RIFA ===== */

.rifa-card .status-badge {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.rifa-card .status-active {
    background: linear-gradient(135deg, var(--success-color) 0%, #27ae60 100%);
    color: white;
}

.rifa-card .status-pending {
    background: linear-gradient(135deg, var(--warning-color) 0%, #f39c12 100%);
    color: white;
}

.rifa-card .status-completed {
    background: linear-gradient(135deg, var(--info-color) 0%, #3498db 100%);
    color: white;
}

/* ===== MEJORAS PARA RESPONSIVE ===== */

@media (max-width: 768px) {
    .rifa-card {
        margin-bottom: 1rem;
    }
    
    .rifa-card:hover {
        transform: translateY(-4px);
    }
    
    .rifa-card .card-img-top {
        height: 180px;
    }
    
    .rifa-card .card-title {
        font-size: 1.1rem;
    }
    
    .rifa-card .price {
        font-size: 1.3rem;
    }
    
    .rifa-card .dates-section {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .rifa-card .action-buttons {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .rifa-card .action-buttons .btn {
        width: 100%;
        min-width: auto;
    }
}

@media (max-width: 576px) {
    .rifa-card .card-img-top {
        height: 150px;
    }
    
    .rifa-card .card-title {
        font-size: 1rem;
    }
    
    .rifa-card .price {
        font-size: 1.2rem;
    }
    
    .rifa-card .price-section {
        padding: 0.75rem;
    }
    
    .rifa-card .numbers-info {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .rifa-card .progress-label {
        flex-direction: column;
        gap: 0.25rem;
        text-align: center;
    }
    
    .rifa-card .badge {
        width: 1.75rem;
        height: 1.75rem;
        font-size: 0.7rem;
    }
    
    .rifa-card .status-badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.5rem;
    }
}

/* ===== MEJORAS PARA ANIMACIONES ===== */

.rifa-card {
    animation: fadeInUp 0.6s ease-out;
}

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

.rifa-card:nth-child(1) { animation-delay: 0.1s; }
.rifa-card:nth-child(2) { animation-delay: 0.2s; }
.rifa-card:nth-child(3) { animation-delay: 0.3s; }
.rifa-card:nth-child(4) { animation-delay: 0.4s; }
.rifa-card:nth-child(5) { animation-delay: 0.5s; }
.rifa-card:nth-child(6) { animation-delay: 0.6s; }

/* ===== MEJORAS PARA HOVER EN MÓVILES ===== */

@media (hover: none) and (pointer: coarse) {
    .rifa-card:hover {
        transform: none;
    }
    
    .rifa-card:hover .card-img-top img {
        transform: none;
    }
    
    .rifa-card:active {
        transform: scale(0.98);
    }
    
    .rifa-card .action-buttons .btn:active {
        transform: scale(0.95);
    }
}

/* ===== MEJORAS PARA ACCESIBILIDAD ===== */

.rifa-card:focus-within {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

.rifa-card .btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* ===== MEJORAS PARA LOADING STATES ===== */

.rifa-card.loading {
    pointer-events: none;
    opacity: 0.7;
}

.rifa-card.loading .card-img-top {
    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 PARA ESTADOS VACÍOS ===== */

.rifa-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.7) 100%);
    border-radius: var(--rifa-border-radius);
    box-shadow: var(--rifa-card-shadow);
    border: 2px dashed rgba(78, 84, 200, 0.2);
}

.rifa-empty-state i {
    font-size: 4rem;
    color: #495057;
    margin-bottom: 1rem;
    opacity: 0.5;
}

.rifa-empty-state h4 {
    color: #495057;
    margin-bottom: 0.5rem;
}

.rifa-empty-state p {
    color: #495057;
    margin-bottom: 0;
}

@media (max-width: 576px) {
    .rifa-empty-state {
        padding: 2rem 1rem;
    }
    
    .rifa-empty-state i {
        font-size: 3rem;
    }
    
    .rifa-empty-state h4 {
        font-size: 1.1rem;
    }
    
    .rifa-empty-state p {
        font-size: 0.9rem;
    }
} 