/* ========================================================
   MÓDULO DE NOTICIAS Y OBJETOS PERDIDOS
   ======================================================== */

/* ==================== FILTROS ==================== */
.filter-btn {
    padding: 10px 20px;
    background: rgba(139, 92, 246, 0.1);
    border: 2px solid rgba(139, 92, 246, 0.3);
    color: rgba(255, 255, 255, 0.8);
    border-radius: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.filter-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: rgba(139, 92, 246, 0.5);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(139, 92, 246, 0.3);
}

.filter-btn.active {
    background: linear-gradient(135deg, #8b5cf6, #a78bfa);
    border-color: #8b5cf6;
    color: white;
    box-shadow: 0 5px 20px rgba(139, 92, 246, 0.4);
}

.filter-btn i {
    font-size: 1rem;
}

/* ==================== FEED DE NOTICIAS ==================== */
.news-feed {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
    margin-top: 30px;
}

/* ==================== TARJETA DE NOTICIA ==================== */
.news-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    overflow: hidden;
    border: 2px solid rgba(139, 92, 246, 0.2);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.3);
    border-color: rgba(139, 92, 246, 0.5);
}

/* Imagen de la noticia */
.news-card-image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.2), rgba(236, 72, 153, 0.2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    color: rgba(255, 255, 255, 0.3);
}

.news-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Contenido de la tarjeta */
.news-card-content {
    padding: 25px;
}

/* Categoría badge */
.news-category {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.news-category.urgente {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 6px 20px rgba(239, 68, 68, 0.6);
    }
}

.news-category.evento {
    background: linear-gradient(135deg, #06b6d4, #0891b2);
    color: white;
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
}

.news-category.perdido {
    background: linear-gradient(135deg, #f59e0b, #d97706);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.4);
}

.news-category.general {
    background: linear-gradient(135deg, #8b5cf6, #7c3aed);
    color: white;
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.4);
}

/* Título de la noticia */
.news-card-title {
    font-size: 1.3rem;
    font-weight: 700;
    color: white;
    margin-bottom: 12px;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Descripción */
.news-card-description {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 15px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Footer de la tarjeta */
.news-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.news-card-date {
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.85rem;
    display: flex;
    align-items: center;
    gap: 6px;
}

.news-card-date i {
    font-size: 0.9rem;
}

/* Botones de acción (admin) */
.news-card-actions {
    display: flex;
    gap: 8px;
}

.news-action-btn {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.news-action-btn.edit {
    background: rgba(6, 182, 212, 0.2);
    color: #06b6d4;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.news-action-btn.edit:hover {
    background: rgba(6, 182, 212, 0.3);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(6, 182, 212, 0.4);
}

.news-action-btn.delete {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.news-action-btn.delete:hover {
    background: rgba(239, 68, 68, 0.3);
    transform: scale(1.1);
    box-shadow: 0 4px 15px rgba(239, 68, 68, 0.4);
}

/* ==================== VISTA EXPANDIDA ==================== */
.news-card.expanded {
    grid-column: 1 / -1;
    max-width: 900px;
    margin: 0 auto;
}

.news-card.expanded .news-card-description {
    -webkit-line-clamp: unset;
    max-height: none;
}

.news-card.expanded .news-card-image {
    height: 400px;
}

/* ==================== RESPONSIVE ==================== */
@media (max-width: 768px) {
    .news-feed {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .filter-btn {
        padding: 8px 16px;
        font-size: 0.85rem;
    }
    
    .news-card-image {
        height: 180px;
    }
    
    .news-card-content {
        padding: 20px;
    }
    
    .news-card-title {
        font-size: 1.1rem;
    }
    
    .news-card-description {
        font-size: 0.9rem;
    }
    
    .news-card.expanded .news-card-image {
        height: 250px;
    }
}

@media (max-width: 480px) {
    .filter-btn {
        padding: 8px 12px;
        font-size: 0.8rem;
        flex: 1 1 calc(50% - 5px);
        justify-content: center;
    }
    
    .news-card-image {
        height: 160px;
    }
    
    .news-card-content {
        padding: 18px;
    }
    
    .news-card-title {
        font-size: 1rem;
    }
    
    .news-card-description {
        font-size: 0.85rem;
    }
    
    .news-action-btn {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }
}

/* ==================== ANIMACIONES ADICIONALES ==================== */
.news-card-enter {
    animation: slideInUp 0.5s ease-out;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.news-card-exit {
    animation: slideOutDown 0.4s ease-in forwards;
}

@keyframes slideOutDown {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
}

/* ==================== ESTADO VACÍO ==================== */
.news-feed:empty + #no-news-message {
    display: block !important;
}

/* ==================== MODAL PERSONALIZADO ==================== */
.purple-glow {
    color: var(--color-purple);
    text-shadow: 0 2px 12px rgba(139, 92, 246, 0.5);
}

#news-modal .input-wrapper {
    margin-bottom: 20px;
}

#news-modal label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

#news-modal input,
#news-modal select,
#news-modal textarea {
    width: 100%;
    transition: all 0.3s ease;
}

#news-modal input:focus,
#news-modal select:focus,
#news-modal textarea:focus {
    border-color: var(--color-pink) !important;
    box-shadow: 0 0 0 3px rgba(236, 72, 153, 0.2);
    outline: none;
}

/* ==================== EFECTOS HOVER MEJORADOS ==================== */
.news-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1), rgba(236, 72, 153, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.news-card:hover::before {
    opacity: 1;
}
