/* Variabili CSS */
:root {
    --primary-color: #FF8C00; /* Colore arancione scuro per richiamare il logo */
    --primary-dark: #E67E00;
    --primary-light: #FFA033;
    --dark-bg: #121212;
    --dark-bg-lighter: #1e1e1e;
    --light-text: #ffffff;
    --accent-color: #f8f8f8;
    --section-padding: 60px 20px;
    --gradient-bg: linear-gradient(135deg, rgba(255, 140, 0, 0.8), rgba(230, 126, 0, 0.9));
    --box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    --neon-glow: 0 0 10px rgba(255, 140, 0, 0.6), 0 0 20px rgba(255, 140, 0, 0.4);
    --glassmorphism: rgba(30, 30, 30, 0.7);
}

/* Reset e stili di base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Poppins', Arial, sans-serif;
    background-color: var(--dark-bg);
    background-image: 
      radial-gradient(circle at 80% 20%, rgba(255, 140, 0, 0.15) 0%, transparent 30%),
      radial-gradient(circle at 15% 85%, rgba(255, 140, 0, 0.1) 0%, transparent 40%);
    color: var(--light-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    padding: 0;
    touch-action: manipulation;
    overflow-y: auto;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, transparent, rgba(18, 18, 18, 0.3));
    pointer-events: none;
    z-index: -1;
}

/* Animazioni */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes glow {
    0% { box-shadow: 0 0 5px rgba(255, 140, 0, 0.5); }
    50% { box-shadow: 0 0 20px rgba(255, 140, 0, 0.8); }
    100% { box-shadow: 0 0 5px rgba(255, 140, 0, 0.5); }
}

/* Main content */
main {
    padding-top: 100px;
    min-height: calc(100vh - 100px);
}

/* Eventi passati */
.events-section {
    padding: var(--section-padding);
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    margin-bottom: 40px;
    font-size: 48px;
    text-transform: uppercase;
    letter-spacing: 2px;
    position: relative;
    padding-bottom: 15px;
    font-weight: 700;
    color: var(--light-text);
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.5);
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--primary-color);
    box-shadow: var(--neon-glow);
    animation: glow 2s infinite;
}

.event-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 30px;
    margin: 0 auto;
}

.event-card {
    background-color: var(--glassmorphism);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--box-shadow);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.5s cubic-bezier(0.165, 0.84, 0.44, 1), box-shadow 0.5s ease;
}

.event-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.5);
}

.event-image {
    height: 250px;
    background-size: cover;
    background-position: center;
    position: relative;
    transition: all 0.5s ease;
    overflow: hidden;
}

.event-image::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.08), rgba(18, 18, 18, 0.7));
    pointer-events: none;
}

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

.event-date {
    position: absolute;
    top: 18px;
    right: 18px;
    left: auto;
    background: var(--gradient-bg);
    color: #fff;
    padding: 10px 24px;
    border-radius: 22px;
    font-weight: 700;
    font-size: 1.15rem;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    z-index: 2;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: none;
    letter-spacing: 0.5px;
}

.event-card:hover .event-date {
    transform: scale(1.05);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.4);
}

.event-details {
    padding: 25px 25px 25px 25px;
    position: relative;
    z-index: 1;
    background: transparent;
    margin-top: 0;
}

.event-title {
    font-size: 20px;
    margin-bottom: 15px;
    color: var(--primary-color);
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    text-shadow: 0 0 10px rgba(255, 140, 0, 0.3);
    transition: all 0.3s ease;
}

.event-card:hover .event-title {
    text-shadow: 0 0 15px rgba(255, 140, 0, 0.5);
}

.event-info {
    margin-bottom: 20px;
}

.event-info p {
    margin-bottom: 8px;
    font-size: 15px;
    display: block;
    transition: transform 0.3s ease;
}

.event-info p:hover {
    transform: translateX(5px);
}

.event-info span {
    color: var(--primary-light);
    font-weight: 500;
}

/* CTA button */
.cta-button {
    display: inline-block;
    padding: 15px 40px;
    background: linear-gradient(135deg, rgba(255, 140, 0, 0.8), rgba(230, 126, 0, 0.9));
    color: var(--light-text);
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: all 0.4s cubic-bezier(0.165, 0.84, 0.44, 1);
    border: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 20px rgba(255, 140, 0, 0.3);
    z-index: 1;
}

.cta-button::before {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: all 0.6s ease;
    z-index: -1;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(255, 140, 0, 0.4);
    letter-spacing: 1.5px;
}

.cta-button:hover::before {
    left: 100%;
}

.cta-button:active {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(255, 140, 0, 0.35);
}

/* Footer styles moved to footer.css */

/* Essential Media Queries - No interference with event cards */
@media (max-width: 768px) {
    .cta-button {
        text-align: center;
    }
    
    body.menu-open {
        overflow: hidden;
    }

    .event-grid {
        grid-template-columns: 1fr;
    }
    
    .section-title {
        font-size: 36px;
    }
    
    /* Forza il bagliore di sfondo su mobile */
    body {
        background-image: 
            radial-gradient(circle at 20% 30%, rgba(255, 140, 0, 0.25) 0%, transparent 30%),
            radial-gradient(circle at 80% 70%, rgba(255, 140, 0, 0.2) 0%, transparent 40%);
    }
    
    body::before {
        background: linear-gradient(to bottom, transparent, rgba(18, 18, 18, 0.1));
    }

    /* Improve touch targets for mobile */
    .cta-button,
    .event-button {
        padding: 8px;
    }
}

@media (max-width: 640px) {
    .section-title {
        font-size: 26px;
    }
    
    .event-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 15px;
    }

    .event-date {
        font-size: 16px;
    }

    .event-title {
        font-size: 20px;
    }
}

@media (max-width: 480px) {
    .section-title {
        font-size: 28px;
        letter-spacing: 1px;
        margin-bottom: 30px;
    }

    .event-date {
        font-size: 14px;
    }

    .event-title {
        font-size: 18px;
        margin: 10px 0;
    }

    .event-description {
        font-size: 15px;
        line-height: 1.6;
    }
    
    .event-button {
        font-size: 14px;
        padding: 10px 25px;
        width: 100%;
        max-width: 280px;
    }

    /* Adjust padding for iPhone notch */
    @supports (padding: max(0px)) {
        .events-section {
            padding-left: max(20px, env(safe-area-inset-left));
            padding-right: max(20px, env(safe-area-inset-right));
        }
    }
}

@media (max-width: 320px) {
    .section-title {
        font-size: 20px;
    }

    .event-date {
        font-size: 13px;
    }

    .event-title {
        font-size: 17px;
    }
    
    .event-description {
        font-size: 14px;
    }

    .event-button {
        font-size: 13px;
        padding: 8px 20px;
    }
}

/* Improve button press behavior on mobile */
.event-button {
    -webkit-tap-highlight-color: transparent;
}

header {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    width: 100%;
}

@supports (padding: max(0px)) {
    .hero {
        padding-left: max(20px, env(safe-area-inset-left));
        padding-right: max(20px, env(safe-area-inset-right));
    }
}

