/* --- VARIABILI COLORI --- */
:root {
    --primary-color: #D32F2F; /* Rosso Corsa */
    --primary-hover: #b71c1c;
    --bg-dark: #121212;
    --bg-card: #1E1E1E;
    --text-white: #ffffff;
    --text-gray: #B0B0B0;
    --accent-gray: #2C2C2C;
}

/* --- RESET E BASE --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-white);
    line-height: 1.6;
}

h1, h2, h3 {
    font-family: 'Montserrat', sans-serif;
    font-weight: 800;
}

a {
    text-decoration: none;
    color: inherit;
    transition: 0.3s;
}

ul {
    list-style: none;
}

/* --- NAVBAR --- */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background-color: rgba(18, 18, 18, 0.95);
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid #333;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-white);
    letter-spacing: -1px;
}

.logo span {
    color: var(--primary-color);
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links a {
    color: var(--text-gray);
    font-weight: 600;
    font-size: 0.9rem;
}

.nav-links a:hover {
    color: var(--primary-color);
}

.nav-buttons .btn {
    margin-left: 10px;
}

/* --- PULSANTI --- */
.btn {
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    border: none;
    font-size: 0.9rem;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--text-white);
    color: var(--text-white);
}

.btn-outline:hover {
    background: var(--text-white);
    color: var(--bg-dark);
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 15px rgba(211, 47, 47, 0.4);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

/* --- HERO SECTION --- */
.hero {
    height: 85vh;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.8)), url('https://images.unsplash.com/photo-1492144534655-ae79c964c9d7?ixlib=rb-1.2.1&auto=format&fit=crop&w=1950&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 20px;
}

.hero h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    line-height: 1.1;
}

.hero p {
    font-size: 1.2rem;
    color: var(--text-gray);
    margin-bottom: 40px;
    max-width: 600px;
}

/* --- BARRA DI RICERCA --- */
.search-bar {
    background: white;
    padding: 10px;
    border-radius: 50px;
    display: flex;
    gap: 10px;
    width: 100%;
    max-width: 800px;
    flex-wrap: wrap;
}

.search-input {
    flex: 1;
    padding: 15px 20px;
    border: none;
    outline: none;
    font-size: 1rem;
    color: #333;
    min-width: 150px;
}

.search-btn {
    background-color: var(--primary-color);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 40px;
    font-weight: bold;
    cursor: pointer;
    transition: 0.3s;
}

.search-btn:hover {
    background-color: var(--primary-hover);
}

/* --- SEZIONE CARD --- */
.section {
    padding: 80px 5%;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    margin-bottom: 40px;
}

.section-title {
    font-size: 2rem;
    color: var(--text-white);
}

.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.event-card {
    background-color: var(--bg-card);
    border-radius: 15px;
    overflow: hidden;
    transition: transform 0.3s;
    border: 1px solid #333;
}

.event-card:hover {
    transform: translateY(-10px);
    border-color: var(--primary-color);
}

.card-image {
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.tag {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: bold;
    text-transform: uppercase;
}

.card-content {
    padding: 20px;
}

.card-date {
    color: var(--primary-color);
    font-weight: 700;
    font-size: 0.9rem;
    margin-bottom: 5px;
    display: block;
}

.card-title {
    font-size: 1.3rem;
    margin-bottom: 10px;
}

.card-info {
    display: flex;
    justify-content: space-between;
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid #333;
    padding-top: 15px;
}

.price {
    font-weight: 700;
    font-size: 1.1rem;
}

/* --- CATEGORIE --- */
.categories {
    display: flex;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
    text-align: center;
    margin-top: 20px;
}

.cat-item {
    cursor: pointer;
}

.cat-icon {
    width: 80px;
    height: 80px;
    background-color: var(--accent-gray);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-white);
    margin: 0 auto 10px;
    transition: 0.3s;
}

.cat-item:hover .cat-icon {
    background-color: var(--primary-color);
}

/* --- FOOTER --- */
footer {
    background-color: black;
    padding: 60px 5% 20px;
    border-top: 1px solid #333;
}

.footer-content {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 {
    color: white;
    margin-bottom: 20px;
}

.footer-col ul li {
    margin-bottom: 10px;
}

.footer-col ul li a {
    color: var(--text-gray);
}

.footer-bottom {
    text-align: center;
    color: #555;
    font-size: 0.9rem;
    padding-top: 20px;
    border-top: 1px solid #222;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .nav-links { display: none; } /* Semplificato per demo */
    .search-bar { flex-direction: column; border-radius: 20px; }
    .search-input { width: 100%; border-bottom: 1px solid #ddd; }
    .search-btn { width: 100%; }
}

/* --- MODAL --- */
.modal {
    display: none; 
    position: fixed; 
    z-index: 2000; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    background-color: rgba(0,0,0,0.8); 
    backdrop-filter: blur(5px);
    animation: fadeIn 0.3s;
}

.modal-content {
    background-color: var(--bg-card);
    margin: 5% auto; 
    padding: 0;
    border: 1px solid #444;
    border-radius: 15px;
    width: 90%; 
    max-width: 700px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    position: relative;
    animation: slideIn 0.3s;
}

.close-modal {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    right: 20px;
    top: 15px;
    cursor: pointer;
    z-index: 10;
    transition: 0.2s;
}

.close-modal:hover {
    color: var(--primary-color);
}

.modal-header {
    padding: 25px;
    border-bottom: 1px solid #333;
}

.modal-tag {
    background-color: var(--primary-color);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 10px;
}

.modal-header h2 {
    font-size: 2rem;
    margin-bottom: 10px;
}

.modal-meta {
    display: flex;
    gap: 20px;
    color: var(--text-gray);
    font-size: 0.95rem;
}

.modal-body {
    padding: 25px;
}

.modal-img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 20px;
}

.modal-text {
    line-height: 1.8;
    color: #ddd;
    margin-bottom: 25px;
    white-space: pre-line; /* Mantiene a capo */
}

.modal-price-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #2a2a2a;
    padding: 15px 20px;
    border-radius: 10px;
}

.modal-price {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
}

@keyframes fadeIn {
    from {opacity: 0;}
    to {opacity: 1;}
}

@keyframes slideIn {
    from {transform: translateY(-50px); opacity: 0;}
    to {transform: translateY(0); opacity: 1;}
}

@media (max-width: 600px) {
    .modal-content {
        margin: 10% auto;
        width: 95%;
    }
    .modal-img {
        height: 200px;
    }
}
