/* RESET DI BASE */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #ff5e00; /* Arancione Sport */
    --dark: #1a1a1a;
    --light: #ffffff;
    --gray: #f4f4f4;
}

body {
    font-family: 'Inter', sans-serif;
    line-height: 1.6;
    color: var(--dark);
    scroll-behavior: smooth;
}

/* NAVBAR */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    background: var(--dark);
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.logo { font-weight: 900; font-size: 1.5rem; }
.logo span { color: var(--primary); }

.nav-links { display: flex; list-style: none; gap: 20px; align-items: center; }
.nav-links a { color: white; text-decoration: none; font-weight: 600; font-size: 0.9rem; transition: 0.3s; }
.nav-links a:hover { color: var(--primary); }

.btn-nav {
    background: var(--primary);
    padding: 8px 15px;
    border-radius: 5px;
}

/* HERO */
.hero {
    height: 80vh;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1530549387631-6c129c1abc7a?auto=format&fit=crop&w=1350&q=80');
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    padding: 0 20px;
}

.hero h1 { font-size: 4rem; font-weight: 900; margin: 10px 0; letter-spacing: -2px; }
.badge { background: var(--primary); padding: 5px 15px; border-radius: 20px; font-weight: bold; }

.hero-btns { margin-top: 30px; display: flex; gap: 15px; justify-content: center; }

.btn-primary, .btn-secondary {
    padding: 15px 30px;
    text-decoration: none;
    font-weight: bold;
    border-radius: 5px;
    transition: 0.3s;
}

.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { transform: scale(1.05); }

.btn-secondary { border: 2px solid white; color: white; }
.btn-secondary:hover { background: white; color: var(--dark); }

/* INFO CARDS */
.quick-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    padding: 50px 5%;
    background: var(--gray);
    margin-top: -50px;
}

.info-card {
    background: white;
    padding: 30px;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.info-card .icon { font-size: 2rem; }
.info-card h3 { margin: 10px 0; font-size: 1.5rem; }

/* TIMELINE */
.timeline-section { padding: 80px 5%; max-width: 800px; margin: 0 auto; }
.section-title { text-align: center; margin-bottom: 50px; font-size: 2rem; }

.timeline { border-left: 4px solid var(--primary); padding-left: 30px; }
.event { margin-bottom: 30px; position: relative; }
.event::before {
    content: '';
    position: absolute;
    left: -38px;
    top: 5px;
    width: 12px;
    height: 12px;
    background: var(--primary);
    border-radius: 50%;
}

.event.highlight { background: #fff4ed; padding: 15px; border-radius: 8px; }
.time { font-weight: 900; color: var(--primary); font-size: 1.2rem; }
.desc { font-weight: 600; font-size: 1.1rem; }

/* FOOTER */
footer { text-align: center; padding: 40px; background: var(--dark); color: #777; font-size: 0.8rem; }

/* MOBILE */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero-btns { flex-direction: column; }
    .nav-links { display: none; } /* Per semplicità qui la nascondiamo, andrebbe fatto un menu hamburger */
}

/* PAGINA PERCORSO */
.page-header {
    background: var(--dark);
    color: white;
    padding: 60px 5%;
    text-align: center;
}

.container { max-width: 1000px; margin: 0 auto; padding: 40px 20px; }

.map-placeholder {
    width: 100%;
    position: relative;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.map-placeholder img { width: 100%; display: block; filter: grayscale(20%); }

.map-overlay {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    font-weight: bold;
    border-radius: 5px;
}

.route-stats {
    display: flex;
    justify-content: space-between;
    margin-top: 20px;
    gap: 15px;
}

.stat-box {
    flex: 1;
    background: var(--gray);
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.stat-box h4 { font-size: 0.8rem; text-transform: uppercase; color: #777; }

/* TABELLA RISTORI */
.aid-stations { margin-top: 60px; }
.aid-stations h2 { margin-bottom: 30px; }

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

th, td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

th { background: var(--gray); font-weight: bold; }

@media (max-width: 600px) {
    .route-stats { flex-direction: column; }
}

/* REGISTRATION PAGE */
.registration-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 60px;
}

.registration-card {
    padding: 40px;
    border: 1px solid #eee;
    border-radius: 15px;
    text-align: center;
    position: relative;
    transition: 0.3s;
}

.registration-card.featured {
    border: 2px solid var(--primary);
    box-shadow: 0 10px 40px rgba(255, 94, 0, 0.1);
    transform: scale(1.05);
}

.price {
    font-size: 3rem;
    font-weight: 900;
    margin: 20px 0;
    color: var(--dark);
}

.feat-list {
    list-style: none;
    margin: 30px 0;
    text-align: left;
}

.feat-list li {
    margin-bottom: 10px;
    padding-left: 25px;
    position: relative;
}

.feat-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--primary);
    font-weight: bold;
}

.full-width { display: block; width: 100%; }

.requirements {
    background: #fff4ed;
    padding: 40px;
    border-radius: 15px;
}

.req-box {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.req-item { font-size: 0.9rem; }
.req-item strong { display: block; color: var(--primary); margin-bottom: 5px; }

@media (max-width: 768px) {
    .registration-card.featured { transform: scale(1); }
}