/*
 * WC Mascotas — Community Frontend Styles
 * Animaciones y componentes custom de la sección /comunidad/.
 * Extraído de bloques <style> inline en community-home.php,
 * home-listings.php, activity-feed.php y weekly-spotlight.php.
 * NO incluir utilidades de Tailwind — solo clases BEM propias.
 */

/* ── Alpine cloak ── */
[x-cloak] { display: none !important; }

/* ── No scrollbar (Firefox + Webkit) ── */
.no-scrollbar::-webkit-scrollbar { display: none; }
.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ============================================================
   HERO — community-home.php
   ============================================================ */

/* Patrón de puntos animado del hero */
@keyframes patternDrift {
    0%   { transform: translate(0, 0); }
    100% { transform: translate(40px, 40px); }
}
.wcm-hero-pattern {
    background-image: radial-gradient(circle, rgba(28,52,199,0.12) 1.5px, transparent 1.5px);
    background-size: 28px 28px;
    animation: patternDrift 12s linear infinite alternate;
}

/* Contador numérico animado */
@keyframes countUp {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.wcm-stat-item { animation: countUp 0.5s cubic-bezier(.16,1,.3,1) both; }
.wcm-stat-item:nth-child(1) { animation-delay: 0.1s; }
.wcm-stat-item:nth-child(2) { animation-delay: 0.2s; }
.wcm-stat-item:nth-child(3) { animation-delay: 0.3s; }

/* ── Pill de filtro activo ── */
.wcm-filter-pill-active {
    background-color: #1c34c7;
    color: #fff;
    box-shadow: 0 2px 12px rgba(28,52,199,0.35);
    transform: translateY(-1px);
}
.wcm-filter-pill-inactive {
    background-color: #f1f5f9;
    color: #4B5563;
}
.wcm-filter-pill-inactive:hover { background-color: #e0e0e0; }

/* ── Chip de filtros activos ── */
@keyframes chipIn {
    from { opacity: 0; scale: 0.8; }
    to   { opacity: 1; scale: 1; }
}
.wcm-active-chip {
    animation: chipIn 0.2s ease-out both;
}

/* ── CTA particles ── */
@keyframes floatParticle {
    0%   { transform: translateY(0) rotate(0deg); opacity: 0.6; }
    50%  { opacity: 1; }
    100% { transform: translateY(-60px) rotate(180deg); opacity: 0; }
}
.wcm-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    animation: floatParticle linear infinite;
    pointer-events: none;
}

/* ── Gradient shimmer en el hero text ── */
@keyframes shimmerText {
    0%   { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}
.wcm-hero-gradient-text {
    background: linear-gradient(90deg, #1c34c7, #ff8383, #1c34c7);
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmerText 4s linear infinite;
}

/* ── Ocultar flecha nativa del datalist ── */
input[list]::-webkit-calendar-picker-indicator { display: none !important; opacity: 0; }
input[list] { -webkit-appearance: none; }

/* ============================================================
   LISTINGS — home-listings.php
   ============================================================ */

/* Pet Card: Hover reveal overlay con gradiente fuerte para contraste */
.wcm-pet-reveal {
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(.16,1,.3,1);
    background: linear-gradient(to top,
        rgba(15,15,30,0.97) 0%,
        rgba(15,15,30,0.85) 40%,
        rgba(15,15,30,0.4) 75%,
        transparent 100%
    );
}
.wcm-community-pet-card:hover .wcm-pet-reveal,
.wcm-community-pet-card:focus-within .wcm-pet-reveal {
    transform: translateY(0);
}
.wcm-community-pet-card:hover .wcm-pet-photo,
.wcm-community-pet-card:focus-within .wcm-pet-photo {
    transform: scale(1.07);
}
.wcm-pet-photo { transition: transform 0.5s cubic-bezier(.16,1,.3,1); }

/* Podio glassmorphism */
.wcm-podium-col {
    background: linear-gradient(to top, rgba(28,52,199,0.10), rgba(255,255,255,0.7));
    backdrop-filter: blur(4px);
    border: 1px solid rgba(28,52,199,0.12);
}

/* Progress bar expertos */
.wcm-expert-bar {
    background: linear-gradient(90deg, #1c34c7, #ff8383);
    border-radius: 99px;
    transition: width 1s cubic-bezier(.16,1,.3,1);
}

/* Empty state illustration */
@keyframes bobble {
    0%,100% { transform: translateY(0); }
    50%      { transform: translateY(-8px); }
}
.wcm-empty-icon { animation: bobble 3s ease-in-out infinite; }

/* ============================================================
   WEEKLY SPOTLIGHT — weekly-spotlight.php
   ============================================================ */
@keyframes bounce-slow {
    0%, 100% { transform: translateY(0); }
    50%       { transform: translateY(-8px); }
}
.animate-bounce-slow {
    animation: bounce-slow 4s infinite ease-in-out;
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    .wcm-hero-pattern,
    .wcm-stat-item,
    .wcm-hero-gradient-text,
    .wcm-particle,
    .wcm-pet-reveal,
    .wcm-pet-photo,
    .wcm-empty-icon,
    .animate-bounce-slow,
    .wcm-active-chip,
    *::before,
    *::after {
        animation-duration: .01ms !important;
        transition-duration: .01ms !important;
    }
}
