/**
 * Cool Effects CSS - Tocco Moderno per VistaMedia
 * Mantiene la pulizia ma aggiunge elementi cool e moderni
 */

/* ===== ANIMAZIONI SOTTILI ===== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

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

/* ===== LOGO COOL ===== */
header a.group img {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 4px rgba(99, 102, 241, 0.1));
}

header a.group:hover img {
    transform: scale(1.05) rotate(-2deg);
    filter: drop-shadow(0 4px 8px rgba(99, 102, 241, 0.2));
}

/* Slogan con gradiente animato */
header .border-l-2 + div {
    position: relative;
}

header .border-l-2 + div > div:first-child {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

/* ===== NAVIGATION COOL ===== */
header nav a {
    position: relative;
    transition: all 0.3s ease;
    padding: 0.5rem 0;
}

header nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #6366f1, #8b5cf6);
    transition: width 0.3s ease;
}

header nav a:hover::after {
    width: 100%;
}

header nav a:hover {
    transform: translateY(-2px);
    color: #6366f1;
}

/* ===== HEADER CON GLASSMORPHISM ===== */
header {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border-bottom: 1px solid rgba(99, 102, 241, 0.1);
}

/* ===== CARDS COOL ===== */
article.group {
    animation: fadeInUp 0.6s ease-out;
    animation-fill-mode: both;
}

article.group:nth-child(1) { animation-delay: 0.1s; }
article.group:nth-child(2) { animation-delay: 0.2s; }
article.group:nth-child(3) { animation-delay: 0.3s; }
article.group:nth-child(4) { animation-delay: 0.4s; }
article.group:nth-child(5) { animation-delay: 0.5s; }
article.group:nth-child(6) { animation-delay: 0.6s; }

/* Card hover effect migliorato */
article.group a {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

article.group:hover {
    transform: translateY(-8px);
}

article.group:hover .rounded-lg {
    box-shadow: 0 20px 40px rgba(99, 102, 241, 0.15);
}

/* Immagine con overlay gradient al hover */
article.group .relative.overflow-hidden::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(99, 102, 241, 0) 0%, rgba(139, 92, 246, 0.3) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: 1;
    pointer-events: none;
}

article.group:hover .relative.overflow-hidden::before {
    opacity: 1;
}

/* Badge tipo articolo con glow */
article.group span.absolute {
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

article.group:hover span.absolute {
    transform: scale(1.1);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

/* ===== BUTTONS COOL ===== */
.btn-cool {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-cool::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-cool:hover::before {
    left: 100%;
}

.btn-cool:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(99, 102, 241, 0.4);
}

/* ===== SEARCH ICON COOL ===== */
header a[href="/ricerca.php"] {
    transition: all 0.3s ease;
    border-radius: 50%;
}

header a[href="/ricerca.php"]:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(139, 92, 246, 0.1));
    transform: rotate(90deg) scale(1.1);
}

/* ===== TITOLI CON GRADIENTE ===== */
h1, h2 {
    background: linear-gradient(135deg, #1f2937 0%, #6366f1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== SCROLL SMOOTH ===== */
html {
    scroll-behavior: smooth;
}

/* ===== LOADING ANIMATION ===== */
@keyframes pulse-glow {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7);
    }
    50% {
        opacity: 0.8;
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }
}

.pulse-glow {
    animation: pulse-glow 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* ===== CATEGORY BADGES COOL ===== */
a[href*="categoria.php"] {
    position: relative;
    transition: all 0.3s ease;
}

a[href*="categoria.php"]:hover {
    transform: translateY(-2px);
}

/* ===== FOOTER COOL ===== */
footer {
    background: linear-gradient(180deg, #ffffff 0%, #f9fafb 100%);
    border-top: 1px solid rgba(99, 102, 241, 0.1);
}

/* ===== RESPONSIVE ANIMATIONS ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== GLASSMORPHISM CARDS ===== */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* ===== GRADIENT TEXT ANIMATION ===== */
.gradient-text {
    background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 3s ease infinite;
}

/* ===== HOVER SCALE EFFECT ===== */
.hover-scale {
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* ===== SHIMMER EFFECT ===== */
.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0) 0%,
        rgba(255, 255, 255, 0.3) 50%,
        rgba(255, 255, 255, 0) 100%
    );
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ===== FLOATING ANIMATION ===== */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-10px);
    }
}

.float {
    animation: float 3s ease-in-out infinite;
}

/* ===== COOL SCROLLBAR ===== */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #6366f1, #8b5cf6);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, #4f46e5, #6366f1);
}

