/* =====================================================
   MODERN UI CSS - MULTIVENDOR PLATFORM
   CSS Moderno e responsivo per Services, Events, Crypto
   ===================================================== */

/* ===== VARIABILI CSS ===== */
:root {
    /* Colori primari */
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --primary-light: #a5b4fc;

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-secondary: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --gradient-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --gradient-warning: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    --gradient-crypto: linear-gradient(135deg, #f7931e 0%, #ff6b35 100%);

    /* Shadows */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 20px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 40px rgba(0, 0, 0, 0.12);
    --shadow-xl: 0 12px 60px rgba(0, 0, 0, 0.15);

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 3rem;

    /* Border radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 20px;
    --radius-full: 50%;

    /* Typography */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-heading: 'Poppins', sans-serif;
}

/* ===== BASE STYLES ===== */
* {
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: #1f2937;
    background: #f8fafc;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    line-height: 1.3;
}

/* ===== LAYOUT COMPONENTS ===== */
.container-modern {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

.grid-auto-fit {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-lg);
}

.grid-auto-fill {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

/* ===== BUTTONS ===== */
.btn-gradient-primary {
    background: var(--gradient-primary);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.btn-gradient-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
    color: white;
}

.btn-gradient-secondary {
    background: var(--gradient-secondary);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-gradient-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(240, 147, 251, 0.4);
    color: white;
}

.btn-gradient-success {
    background: var(--gradient-success);
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-gradient-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.4);
    color: white;
}

.btn-modern {
    background: white;
    border: 2px solid #e5e7eb;
    color: #374151;
    padding: 12px 24px;
    border-radius: var(--radius-lg);
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
}

.btn-modern:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* ===== CARDS ===== */
.card-modern {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    padding: var(--spacing-lg);
    transition: all 0.3s ease;
    border: none;
}

.card-modern:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-modern-header {
    background: var(--gradient-primary);
    color: white;
    padding: var(--spacing-lg);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    margin: calc(-1 * var(--spacing-lg));
    margin-bottom: var(--spacing-lg);
}

.card-service {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
    height: 100%;
}

.card-service:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.card-event {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
    height: 100%;
    position: relative;
}

.card-event:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

.card-crypto {
    background: white;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    transition: all 0.3s ease;
    border: none;
    height: 100%;
}

.card-crypto:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-xl);
}

/* ===== BADGES ===== */
.badge-modern {
    padding: 6px 12px;
    border-radius: var(--radius-lg);
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-gradient-primary {
    background: var(--gradient-primary);
    color: white;
}

.badge-gradient-secondary {
    background: var(--gradient-secondary);
    color: white;
}

.badge-gradient-success {
    background: var(--gradient-success);
    color: white;
}

.badge-gradient-crypto {
    background: var(--gradient-crypto);
    color: white;
}

.badge-outline {
    background: transparent;
    border: 2px solid currentColor;
    color: var(--primary-color);
}

/* ===== HERO SECTIONS ===== */
.hero-modern {
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    color: white;
    margin-bottom: var(--spacing-xl);
    position: relative;
    overflow: hidden;
}

.hero-modern::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 400px;
    height: 400px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    animation: float 8s ease-in-out infinite;
}

.hero-services {
    background: var(--gradient-success);
}

.hero-events {
    background: var(--gradient-secondary);
}

.hero-crypto {
    background: var(--gradient-crypto);
}

/* ===== FORMS ===== */
.form-modern {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--spacing-xl);
    box-shadow: var(--shadow-md);
    margin-bottom: var(--spacing-lg);
}

.form-group-modern {
    margin-bottom: var(--spacing-lg);
}

.form-control-modern {
    border: 2px solid #e5e7eb;
    border-radius: var(--radius-md);
    padding: 12px 16px;
    font-size: 1rem;
    transition: all 0.3s ease;
    width: 100%;
}

.form-control-modern:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-label-modern {
    font-weight: 600;
    color: #374151;
    margin-bottom: var(--spacing-sm);
    display: block;
}

.form-floating-modern {
    position: relative;
}

.form-floating-modern .floating-label {
    position: absolute;
    top: 0;
    left: 12px;
    background: white;
    padding: 0 8px;
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
    transform: translateY(-50%);
    z-index: 10;
}

/* ===== FILTERS ===== */
.filters-modern {
    background: var(--gradient-primary);
    border-radius: var(--radius-xl);
    padding: var(--spacing-lg);
    color: white;
    margin-bottom: var(--spacing-xl);
}

.filter-section {
    margin-bottom: var(--spacing-md);
}

.filter-section:last-child {
    margin-bottom: 0;
}

/* ===== STATS ===== */
.stats-modern {
    background: var(--gradient-primary);
    border-radius: var(--radius-lg);
    padding: var(--spacing-lg);
    color: white;
    text-align: center;
    margin-bottom: var(--spacing-lg);
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: var(--spacing-xs);
    display: block;
}

.stat-label {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* ===== PRICE DISPLAYS ===== */
.price-modern {
    font-size: 1.5rem;
    font-weight: 700;
    background: var(--gradient-success);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-large {
    font-size: 2.5rem;
    font-weight: 700;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.price-crypto {
    font-size: 1.8rem;
    font-weight: 700;
    background: var(--gradient-crypto);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ===== AVATARS ===== */
.avatar-modern {
    border-radius: var(--radius-full);
    border: 3px solid white;
    box-shadow: var(--shadow-md);
    object-fit: cover;
}

.avatar-sm {
    width: 32px;
    height: 32px;
}

.avatar-md {
    width: 48px;
    height: 48px;
}

.avatar-lg {
    width: 64px;
    height: 64px;
}

.avatar-xl {
    width: 96px;
    height: 96px;
}

/* ===== RATINGS ===== */
.rating-modern {
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.rating-stars {
    color: #fbbf24;
}

.rating-count {
    color: #6b7280;
    font-size: 0.9rem;
}

/* ===== LOADING STATES ===== */
.loading-shimmer {
    background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* ===== ANIMATIONS ===== */
@keyframes float {

    0%,
    100% {
        transform: translateY(0px) rotate(0deg);
    }

    50% {
        transform: translateY(-20px) rotate(3deg);
    }
}

.float-animation {
    animation: float 6s ease-in-out infinite;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}

/* ===== HOVER EFFECTS ===== */
.hover-lift {
    transition: all 0.3s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.hover-scale {
    transition: all 0.3s ease;
}

.hover-scale:hover {
    transform: scale(1.05);
}

.hover-rotate {
    transition: all 0.3s ease;
}

.hover-rotate:hover {
    transform: rotate(5deg);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 768px) {
    .hero-modern {
        padding: var(--spacing-lg);
        text-align: center;
    }

    .card-modern {
        padding: var(--spacing-md);
    }

    .grid-auto-fit {
        grid-template-columns: 1fr;
    }

    .btn-gradient-primary,
    .btn-gradient-secondary,
    .btn-gradient-success {
        width: 100%;
        justify-content: center;
        margin-bottom: var(--spacing-sm);
    }

    .price-large {
        font-size: 2rem;
    }

    .price-modern {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .form-modern {
        padding: var(--spacing-lg);
    }

    .hero-modern {
        padding: var(--spacing-md);
    }

    .hero-modern h1 {
        font-size: 1.8rem;
    }

    .hero-modern .lead {
        font-size: 1rem;
    }
}

/* ===== UTILITY CLASSES ===== */
.text-gradient-primary {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-secondary {
    background: var(--gradient-secondary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-success {
    background: var(--gradient-success);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.text-gradient-crypto {
    background: var(--gradient-crypto);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-gradient-primary {
    background: var(--gradient-primary);
}

.bg-gradient-secondary {
    background: var(--gradient-secondary);
}

.bg-gradient-success {
    background: var(--gradient-success);
}

.bg-gradient-crypto {
    background: var(--gradient-crypto);
}

.shadow-modern {
    box-shadow: var(--shadow-md);
}

.shadow-modern-lg {
    box-shadow: var(--shadow-lg);
}

.rounded-modern {
    border-radius: var(--radius-lg);
}

.rounded-modern-xl {
    border-radius: var(--radius-xl);
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #1f2937;
        --bg-secondary: #374151;
        --text-primary: #f9fafb;
        --text-secondary: #d1d5db;
    }

    body {
        background: var(--bg-primary);
        color: var(--text-primary);
    }

    .card-modern {
        background: var(--bg-secondary);
        color: var(--text-primary);
    }

    .form-control-modern {
        background: var(--bg-secondary);
        border-color: #4b5563;
        color: var(--text-primary);
    }

    .form-control-modern:focus {
        border-color: var(--primary-light);
    }
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.focus-visible:focus {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Riduce le animazioni per chi ha preferenze di accessibilità */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===== PRINT STYLES ===== */
@media print {

    .hero-modern,
    .filters-modern,
    .btn-gradient-primary,
    .btn-gradient-secondary,
    .btn-gradient-success {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
    }

    .card-modern {
        border: 1px solid #ccc !important;
        box-shadow: none !important;
    }
}