/* Estilos personalizados estilo Taringa */

/* Post cards */
.post-card {
    transition: box-shadow 0.3s ease;
    border: 1px solid #dee2e6;
}

.post-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Columna de votos */
.votos-columna {
    min-width: 70px;
    border-right: 1px solid #dee2e6;
}

.votos-numero {
    font-size: 1.4rem;
    font-weight: bold;
    color: #333;
}

/* Botones de voto */
.voto-btn {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s;
}

.voto-btn:hover {
    transform: scale(1.1);
}

.voto-btn i {
    font-size: 1.5rem;
}

.voto-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Sidebar */
.sidebar-card {
    border: none;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.sidebar-card .card-header {
    background-color: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

/* Ranking */
.ranking-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
}

.ranking-item:last-child {
    border-bottom: none;
}

.ranking-pos {
    font-weight: bold;
    color: #6c757d;
    min-width: 30px;
}

.ranking-nombre {
    flex-grow: 1;
    margin: 0 10px;
}

.ranking-puntos {
    background-color: #007bff;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.85rem;
}

/* Contenido del post */
.post-contenido {
    line-height: 1.8;
    font-size: 1.1rem;
}

/* Comentarios */
.comentario {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
}

.comentario-header {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.comentario-avatar {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    margin-right: 10px;
}

.comentario-autor {
    font-weight: bold;
    margin-right: 10px;
}

.comentario-fecha {
    color: #6c757d;
    font-size: 0.85rem;
}

/* Paginación */
.pagination {
    margin-top: 30px;
}

.page-link {
    color: #333;
}

.page-item.active .page-link {
    background-color: #343a40;
    border-color: #343a40;
}

/* Categorías */
.categoria-badge {
    background-color: #e9ecef;
    color: #495057;
    padding: 5px 10px;
    border-radius: 20px;
    text-decoration: none;
    transition: background-color 0.2s;
}

.categoria-badge:hover {
    background-color: #dee2e6;
    color: #212529;
}

/* Responsive */
@media (max-width: 768px) {
    .votos-columna {
        flex-direction: row !important;
        justify-content: center !important;
        border-right: none;
        border-bottom: 1px solid #dee2e6;
        padding: 10px !important;
    }
    
    .votos-numero {
        margin: 0 15px !important;
    }
    
    .voto-btn {
        width: 35px;
        height: 35px;
    }
}

/* Animaciones */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.post-card {
    animation: fadeIn 0.5s ease;
}

/* Tooltips personalizados */
[data-tooltip] {
    position: relative;
    cursor: help;
}

[data-tooltip]:before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 10px;
    background-color: #333;
    color: white;
    border-radius: 4px;
    font-size: 0.85rem;
    white-space: nowrap;
    display: none;
    z-index: 1000;
}

[data-tooltip]:hover:before {
    display: block;
}

/* Estados de carga */
.loading {
    opacity: 0.5;
    pointer-events: none;
    position: relative;
}

.loading:after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}