/* TUMBLR FEED STYLES - ODS CERO */

/* Estilos principales para el feed */
.tumblr-post {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.tumblr-post:hover {
    transform: translateY(-4px);
}

/* Line clamps para texto truncado */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.line-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Permitir hasta 4 líneas para títulos largos */
.line-clamp-4 {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Loading animation mejorada */
@keyframes tumblr-pulse {
    0%, 100% { 
        opacity: 1; 
        transform: scale(1);
    }
    50% { 
        opacity: 0.7; 
        transform: scale(1.05);
    }
}

.tumblr-loading {
    animation: tumblr-pulse 2s infinite;
}

/* Hover effects para imágenes */
.tumblr-post img {
    transition: transform 0.3s ease-out;
}

.tumblr-post:hover img {
    transform: scale(1.05);
}

/* Badge de fecha mejorado */
.tumblr-date-badge {
    background: linear-gradient(135deg, rgba(234, 88, 12, 0.1) 0%, rgba(234, 88, 12, 0.05) 100%);
    border: 1px solid rgba(234, 88, 12, 0.2);
}

/* Efectos de hover para enlaces */
.tumblr-post a:hover {
    color: #ea580c;
}

/* Animaciones para iconos */
.tumblr-icon-hover {
    transition: transform 0.2s ease-in-out;
}

.tumblr-icon-hover:hover {
    transform: translateX(2px);
}

/* Skeleton loading para mejor UX */
.tumblr-skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: tumblr-skeleton-loading 1.5s infinite;
}

@keyframes tumblr-skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* Dark mode skeleton */
.dark .tumblr-skeleton {
    background: linear-gradient(90deg, #374151 25%, #4b5563 50%, #374151 75%);
    background-size: 200% 100%;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .tumblr-post {
        margin-bottom: 1.5rem;
    }
    
    .tumblr-post:hover {
        transform: translateY(-2px);
    }
}

@media (max-width: 640px) {
    .tumblr-post {
        margin-bottom: 1rem;
    }
    
    .tumblr-post .p-6 {
        padding: 1rem;
    }
}

/* Grid específico para el feed de noticias */
.tumblr-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

@media (max-width: 768px) {
    .tumblr-grid {
        gap: 1.5rem;
        grid-template-columns: 1fr;
    }
}

/* Mejoras visuales adicionales */
.tumblr-section {
    position: relative;
    overflow: hidden;
}

.tumblr-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(234, 88, 12, 0.3), transparent);
}

/* Efectos de scroll reveal */
.tumblr-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.tumblr-reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Badge de tipo de post */
.post-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    background: rgba(234, 88, 12, 0.1);
    color: #ea580c;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid rgba(234, 88, 12, 0.2);
}

.post-type-badge.photo {
    background: rgba(34, 197, 94, 0.1);
    color: #22c55e;
    border-color: rgba(34, 197, 94, 0.2);
}

.post-type-badge.video {
    background: rgba(239, 68, 68, 0.1);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.2);
}

.post-type-badge.link {
    background: rgba(59, 130, 246, 0.1);
    color: #3b82f6;
    border-color: rgba(59, 130, 246, 0.2);
}

/* Indicador de carga personalizado */
.tumblr-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid rgba(234, 88, 12, 0.1);
    border-left: 4px solid #ea580c;
    border-radius: 50%;
    animation: tumblr-spin 1s linear infinite;
}

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

/* Footer del post mejorado */
.tumblr-post-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(0, 0, 0, 0.05);
}

.dark .tumblr-post-footer {
    border-top-color: rgba(255, 255, 255, 0.05);
}

/* Animación de entrada escalonada */
.tumblr-post:nth-child(1) { animation-delay: 0.1s; }
.tumblr-post:nth-child(2) { animation-delay: 0.2s; }
.tumblr-post:nth-child(3) { animation-delay: 0.3s; }
.tumblr-post:nth-child(4) { animation-delay: 0.4s; }
.tumblr-post:nth-child(5) { animation-delay: 0.5s; }
.tumblr-post:nth-child(6) { animation-delay: 0.6s; }

.tumblr-fade-in {
    animation: tumblr-fadeInUp 0.6s ease-out forwards;
    opacity: 0;
    transform: translateY(20px);
}

@keyframes tumblr-fadeInUp {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}