/**
 * CSS para feed.php
 * Página de listagem de feeds
 */

/* Prevenir scroll horizontal apenas no body */
body {
    overflow-x: hidden;
    max-width: 100%;
}

/* Custom max-width: 1450px */
.max-w-custom {
    max-width: 1450px;
}

/* Line clamp utilities */
.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;
}

/* Scrollbar hide para filtros */
.scrollbar-hide {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;
}

/* Garantir que overflow-x-auto fique contido */
.overflow-x-auto {
    max-width: 100%;
}

/* Animações */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.feed-item {
    animation: fadeInUp 0.5s ease-out;
}

/* Smooth scroll */
html {
    scroll-behavior: smooth;
}

/* Loading animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* Dropdown hover effect */
.group:hover .group-hover\:block {
    display: block;
}

/* Scroll horizontal suave para pills */
@media (max-width: 768px) {
    .overflow-x-auto {
        -webkit-overflow-scrolling: touch;
        scroll-snap-type: x proximity;
    }
    
    .overflow-x-auto > a,
    .overflow-x-auto > div {
        scroll-snap-align: start;
    }
}

/* ============================================
   LAZY LOADING COM SHIMMER EFFECT
   ============================================ */
.lazy-image {
    background: linear-gradient(
        90deg,
        #f0f0f0 0%,
        #e0e0e0 20%,
        #e0e0e0 40%,
        #f0f0f0 100%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite linear;
    opacity: 0;
    transition: opacity 0.4s ease-in-out;
}

.lazy-image.loading {
    opacity: 1;
}

.lazy-image.loaded {
    opacity: 1 !important;
    background: none;
    animation: none;
}

.lazy-image.error {
    opacity: 1;
    background: #f3f4f6;
    animation: none;
}

@keyframes shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ============================================
   MELHOR CENTRALIZAÇÃO DE IMAGENS
   ============================================ */
/* Evitar cortes em rostos nas fotos */
img[class*="object-cover"] {
    object-fit: cover;
    object-position: center center;
}

/* Hero images - centralização padrão */
.feed-hero-img {
    object-fit: cover !important;
    object-position: center center !important;
}

/* Imagens de destaque - priorizar parte superior central */
.feed-destaque-img {
    object-fit: cover !important;
    object-position: center 35% !important;
}

/* Cards de feed - foco em rostos/parte superior */
.feed-card-img {
    object-fit: cover !important;
    object-position: center 30% !important;
}

