/* CSS Premium 2026 - Design Ultra Moderno e Accattivante */

/* Variabili CSS Avanzate */
:root {
    --primary-color: #1A4A5E;
    --secondary-color: #2A7A9E;
    --accent-color: #25D366;
    --accent-gold: #FFD700;
    --accent-orange: #FF6B35;
    --text-dark: #1a1a1a;
    --text-medium: #444;
    --text-light: #666;
    --bg-light: #f8f9fa;
    --bg-white: #ffffff;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 8px 30px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 15px 50px rgba(0, 0, 0, 0.2);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.3);
    --radius-sm: 16px;
    --radius-md: 24px;
    --radius-lg: 32px;
    --transition-fast: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Animazioni Avanzate */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.05);
        opacity: 0.9;
    }
}

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

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

@keyframes rotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Hero Section Ultra Moderna */
.hero {
    position: relative;
    overflow: hidden;
}

.hero-background {
    animation: scaleIn 1.2s ease-out, pulse 8s ease-in-out infinite;
    filter: brightness(1.1) contrast(1.05);
}

.hero-background::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 74, 94, 0.1) 0%, rgba(42, 122, 158, 0.1) 100%);
    animation: gradient-shift 10s ease infinite;
    background-size: 200% 200%;
    z-index: 0;
}

.hero .hero-content {
    animation: slideInLeft 1s ease-out;
    position: relative;
}

.hero h1 {
    background: linear-gradient(135deg, #ffffff 0%, rgba(255, 255, 255, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: slideInLeft 1.2s ease-out;
    position: relative;
}

.hero h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 100px;
    height: 4px;
    background: linear-gradient(90deg, #25D366, #FFD700);
    border-radius: 2px;
    animation: slideInLeft 1.5s ease-out;
}

.hero button {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1A4A5E 0%, #2A7A9E 50%, #25D366 100%);
    background-size: 200% 200%;
    animation: gradient-shift 3s ease infinite;
    box-shadow: 0 10px 40px rgba(26, 74, 94, 0.5), 0 0 20px rgba(37, 211, 102, 0.3);
}

.hero button::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.hero button:hover::after {
    width: 300px;
    height: 300px;
}

.hero button:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: 0 15px 50px rgba(26, 74, 94, 0.6), 0 0 30px rgba(37, 211, 102, 0.5);
}

/* Cards Premium con Effetti 3D */
.annuncio-card,
.collaboration-card,
.veicolo-card,
.modern-card {
    position: relative;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.1),
        0 0 0 1px rgba(255, 255, 255, 0.5) inset;
    transform-style: preserve-3d;
    transition: var(--transition);
    animation: scaleIn 0.6s ease-out;
}

.annuncio-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 74, 94, 0.05) 0%, rgba(42, 122, 158, 0.05) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    border-radius: inherit;
    z-index: 0;
}

.annuncio-card:hover::before {
    opacity: 1;
}

.annuncio-card:hover {
    transform: translateY(-12px) rotateX(2deg) rotateY(-2deg);
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.2),
        0 0 0 1px rgba(26, 74, 94, 0.2) inset,
        0 0 40px rgba(37, 211, 102, 0.1);
    border-color: rgba(26, 74, 94, 0.3);
}

.annuncio-card img {
    position: relative;
    z-index: 1;
    filter: brightness(1) contrast(1.05);
    transition: var(--transition-slow);
}

.annuncio-card:hover img {
    transform: scale(1.15) translateZ(20px);
    filter: brightness(1.1) contrast(1.1);
}

/* Badge Premium */
.badge,
.price-details .prezzo {
    background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.3);
    position: relative;
}

.price-details .prezzo::before {
    content: '€';
    margin-right: 4px;
    background: linear-gradient(135deg, #1A4A5E 0%, #2A7A9E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Bottoni Premium */
.btn-primary,
.btn-modern,
.btn {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1A4A5E 0%, #2A7A9E 50%, #1A4A5E 100%);
    background-size: 200% 200%;
    animation: gradient-shift 4s ease infinite;
    box-shadow: 
        0 8px 25px rgba(26, 74, 94, 0.4),
        0 0 15px rgba(37, 211, 102, 0.2);
    transition: var(--transition);
}

.btn-primary::before,
.btn-modern::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.6s;
}

.btn-primary:hover::before,
.btn-modern:hover::before {
    left: 100%;
}

.btn-primary:hover,
.btn-modern:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: 
        0 15px 40px rgba(26, 74, 94, 0.5),
        0 0 25px rgba(37, 211, 102, 0.4);
    background-position: 100% 50%;
}

/* Gallery Items Premium */
.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    cursor: pointer;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
}

.gallery-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(26, 74, 94, 0.1) 0%, rgba(42, 122, 158, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: 1;
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-item:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: var(--shadow-xl);
}

.gallery-item img {
    transition: var(--transition-slow);
    filter: brightness(1) contrast(1.05);
}

.gallery-item:hover img {
    transform: scale(1.15) rotate(1deg);
    filter: brightness(1.15) contrast(1.15);
}

.gallery-item-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9) 0%, rgba(0, 0, 0, 0.7) 50%, transparent 100%);
    padding: 2rem 1.5rem 1.5rem;
    color: white;
    transform: translateY(100%);
    transition: var(--transition);
    z-index: 2;
}

.gallery-item:hover .gallery-item-overlay {
    transform: translateY(0);
}

.vehicle-name {
    display: block;
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.vehicle-price {
    display: block;
    font-size: 1.5rem;
    font-weight: 900;
    color: #FFD700;
    text-shadow: 0 2px 10px rgba(255, 215, 0, 0.5);
}

/* Mini Banner Premium */
.mini-banner-targa-prova {
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #1A4A5E 0%, #2A7A9E 50%, #1A4A5E 100%);
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
    box-shadow: 
        0 10px 40px rgba(26, 74, 94, 0.4),
        0 0 30px rgba(37, 211, 102, 0.2);
    transition: var(--transition);
}

.mini-banner-targa-prova::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 70%);
    animation: rotate 20s linear infinite;
}

.mini-banner-targa-prova:hover {
    transform: translateY(-5px);
    box-shadow: 
        0 15px 50px rgba(26, 74, 94, 0.5),
        0 0 40px rgba(37, 211, 102, 0.3);
}

.mini-banner-targa-prova .badge {
    animation: pulse 2s ease-in-out infinite;
}

/* Stats Premium */
.stat-item {
    position: relative;
    padding: 1.5rem;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.9) 0%, rgba(248, 249, 250, 0.9) 100%);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    animation: scaleIn 0.8s ease-out;
}

.stat-item:hover {
    transform: translateY(-5px) scale(1.05);
    box-shadow: var(--shadow-lg);
}

.stat-number {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 900;
    background: linear-gradient(135deg, #1A4A5E 0%, #2A7A9E 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    animation: pulse 3s ease-in-out infinite;
}

/* Section Titles Premium */
h2 {
    position: relative;
    padding-bottom: 1rem;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #1A4A5E 0%, #2A7A9E 50%, #25D366 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 5s ease infinite;
}

h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, #1A4A5E, #2A7A9E, #25D366);
    border-radius: 2px;
    animation: slideInLeft 1s ease-out;
    box-shadow: 0 2px 10px rgba(37, 211, 102, 0.5);
}

/* Form Premium */
.form-select:focus,
.form-control:focus {
    border-color: #25D366;
    box-shadow: 
        0 0 0 3px rgba(37, 211, 102, 0.2),
        0 8px 25px rgba(26, 74, 94, 0.1);
    transform: translateY(-2px);
}

/* Scroll Animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.8s ease-out;
}

/* Loading States */
@keyframes shimmer-loading {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 1000px 100%;
    animation: shimmer-loading 2s infinite;
}

/* Glassmorphism Effect */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

/* Neumorphism Effect */
.neumorphic {
    background: #f0f0f0;
    box-shadow: 
        20px 20px 60px #bebebe,
        -20px -20px 60px #ffffff;
    border-radius: var(--radius-md);
}

/* Hover Effects Premium */
.hover-lift {
    transition: var(--transition);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.hover-glow {
    transition: var(--transition);
}

.hover-glow:hover {
    box-shadow: 
        0 0 20px rgba(37, 211, 102, 0.5),
        0 0 40px rgba(26, 74, 94, 0.3);
}

/* Responsive Premium */
@media (max-width: 768px) {
    .hero h1::after {
        width: 60px;
    }
    
    .annuncio-card:hover {
        transform: translateY(-8px);
    }
    
    .stat-number {
        font-size: 2.5rem;
    }
}

/* Review Cards Premium */
.review-card {
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border-radius: var(--radius-md);
    padding: 2rem;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 1px solid rgba(0, 0, 0, 0.05);
    position: relative;
    overflow: hidden;
    animation: scaleIn 0.6s ease-out;
}

.review-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #1A4A5E, #2A7A9E, #25D366);
    transform: scaleX(0);
    transition: transform 0.5s ease;
}

.review-card:hover::before {
    transform: scaleX(1);
}

.review-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: var(--shadow-lg);
    border-color: rgba(37, 211, 102, 0.2);
}

.reviews-grid .stars {
    color: #FFD700;
    font-size: 1.2rem;
    text-shadow: 0 2px 5px rgba(255, 215, 0, 0.3);
    animation: pulse 2s ease-in-out infinite;
}

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

/* Selection Color */
::selection {
    background: rgba(37, 211, 102, 0.3);
    color: #1A4A5E;
}

::-moz-selection {
    background: rgba(37, 211, 102, 0.3);
    color: #1A4A5E;
}
