/* --- CSS VARIABLES (Theming) --- */
:root {
    --primary-orange: #F58A07;
    --primary-hover: #D97A06;
    --primary-light: #FEF3E6; /* Light orange for badges */
    --bg-white: #FFFFFF;
    --text-dark: #202124;
    --text-gray: #5F6368;
    --border-light: #E8EAED;
}

/* --- GLOBAL STYLES --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a { text-decoration: none; }

/* --- BUTTONS --- */
.btn-primary {
    background-color: var(--primary-orange);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.3s ease;
    display: inline-block;
}

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

.btn-outline {
    color: var(--primary-orange);
    border: 2px solid var(--primary-orange);
    padding: 10px 20px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-outline:hover {
    background-color: var(--primary-orange);
    color: white;
}

/* --- NAVIGATION --- */
nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
    border-bottom: 1px solid var(--border-light);
}

.logo img {
    height: 40px;
}

/* --- HERO SECTION --- */
.hero {
    text-align: center;
    padding: 100px 20px 60px;
    max-width: 800px;
    margin: 0 auto;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    letter-spacing: -1px;
    margin-bottom: 24px;
}

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

.hero-btn {
    font-size: 1.1rem;
    padding: 16px 32px;
}

/* --- SPONSORS / PAST EVENTS SECTION --- */
.sponsors {
    text-align: center;
    padding: 40px 20px;
    background: #F8F9FA;
}

.sponsors p {
    font-size: 0.9rem;
    color: var(--text-gray);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 20px;
}

.sponsor-logos {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
    flex-wrap: wrap;
}

.sponsor-logos img {
    height: 130px;
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

.sponsor-logos img:hover {
    opacity: 1;
}

/* --- FEATURED EVENT SECTION (Oltre i Passi Theme) --- */
.featured-event {
    padding: 60px 20px;
    display: flex;
    justify-content: center;
}

.event-card {
    /* Soft sand-colored gradient background matching the event */
    background: linear-gradient(135deg, var(--bg-white) 0%, #F2E3C6 100%);
    border: 1px solid var(--border-light);
    border-top: 5px solid #2C5E3B; /* Forest Green top border */
    border-radius: 16px;
    padding: 40px;
    max-width: 700px;
    text-align: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(44, 94, 59, 0.15); /* Green-tinted shadow */
}

.event-badge {
    background-color: #2C5E3B; /* Forest Green */
    color: #FFFFFF;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 6px 12px;
    border-radius: 20px;
    display: inline-block;
    margin-bottom: 16px;
}

.event-card h2 {
    font-size: 2.2rem;
    color: #2C5E3B; /* Forest Green */
    margin-bottom: 12px;
}

.event-card p {
    color: var(--text-dark); /* Darker text for readability on sand background */
    margin-bottom: 24px;
    font-size: 1.1rem;
}

/* Custom button specifically for this event card */
.btn-event {
    color: #B56B2E; /* Earth Orange */
    border: 2px solid #B56B2E;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-event:hover {
    background-color: #B56B2E;
    color: white;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .event-card { padding: 30px 20px; }
    .event-card h2 { font-size: 1.75rem; }
}

/* --- MOBILE RESPONSIVE --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2.5rem; }
    .hero p { font-size: 1.1rem; }
    .sponsor-logos { gap: 20px; }
    .event-card { padding: 30px 20px; }
    .event-card h2 { font-size: 1.75rem; }
}

/* --- LAYOUT UTILITIES --- */
.container {
    max-width: 1000px;
    margin: 0 auto;
}

/* --- HOW IT WORKS SECTION --- */
.how-it-works {
    padding: 80px 20px;
    background-color: var(--bg-white);
    text-align: center;
}

.how-it-works h2 {
    font-size: 2.5rem;
    margin-bottom: 12px;
}

.section-subtitle {
    color: var(--text-gray);
    font-size: 1.1rem;
    margin-bottom: 50px;
}

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

.step-card {
    background: #F8F9FA;
    padding: 40px 30px;
    border-radius: 12px;
    text-align: center;
    border: 1px solid var(--border-light);
    /* Initial state for jQuery animation */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.3s ease;
}

/* Class added by jQuery */
.step-card.reveal {
    opacity: 1;
    transform: translateY(0);
}

.step-card:hover {
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
}

/* --- AGGIORNAMENTO ICONE HOW IT WORKS --- */
.step-icon {
    width: 76px;
    height: 76px;
    background-color: var(--primary-light); /* Il tuo arancione chiaro */
    color: var(--primary-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px auto;
    position: relative;
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.step-card:hover .step-icon {
    transform: scale(1.05);
    background-color: rgba(245, 138, 7, 0.15); /* Leggermente più scuro al passaggio del mouse */
}

/* Stili per l'SVG dentro il cerchio */
.step-icon svg {
    width: 34px;
    height: 34px;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

/* Badge del numero posizionato in alto a destra */
.step-badge {
    position: absolute;
    top: -2px;
    right: -2px;
    background-color: var(--text-dark);
    color: var(--bg-white);
    width: 26px;
    height: 26px;
    border-radius: 50%;
    font-size: 0.85rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 3px solid #F8F9FA; /* Crea un bordo vuoto per separarlo dal cerchio arancione */
}

.step-card h3 {
    font-size: 1.25rem;
    margin-bottom: 15px;
}

.step-card p {
    color: var(--text-gray);
    font-size: 1rem;
}

/* --- MOBILE RESPONSIVE TWEAKS --- */
@media (max-width: 768px) {
    .how-it-works { padding: 60px 20px; }
    .how-it-works h2 { font-size: 2rem; }
}

/* --- INTERACTIVE FEATURES SECTION --- */
.interactive-features {
    padding: 100px 20px;
    background-color: #FAFAFA; /* Slight off-white to contrast with the white cards */
}

.features-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

/* Feature Tabs */
.feature-tab {
    padding: 24px;
    border-left: 4px solid transparent;
    cursor: pointer;
    transition: all 0.3s ease;
    opacity: 0.6;
    margin-bottom: 10px;
}

.feature-tab:hover {
    opacity: 1;
    background-color: rgba(245, 138, 7, 0.05); /* Very light orange hover */
}

.feature-tab.active {
    opacity: 1;
    border-left-color: var(--primary-orange);
    background-color: var(--bg-white);
    box-shadow: 0 4px 15px rgba(0,0,0,0.03);
    border-radius: 0 12px 12px 0;
}

.feature-tab h3 {
    font-size: 1.3rem;
    margin-bottom: 8px;
    color: var(--text-dark);
}

.feature-tab p {
    font-size: 1rem;
    color: var(--text-gray);
}

/* Phone Mockup (Pure CSS) */
.feature-visual-container {
    display: flex;
    justify-content: center;
}

.phone-mockup {
    width: 300px;
    height: 600px;
    background-color: #000;
    border-radius: 40px;
    border: 14px solid #111;
    position: relative;
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
    overflow: hidden;
}

/* Fake iPhone Notch */
.phone-notch {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 120px;
    height: 25px;
    background-color: #111;
    border-radius: 0 0 16px 16px;
    z-index: 2;
}

.phone-mockup img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: relative;
    z-index: 1;
}

/* Mobile Adjustments */
@media (max-width: 900px) {
    .features-layout {
        grid-template-columns: 1fr;
    }
    .feature-tabs-container {
        order: 2; /* Put text under the phone on mobile */
    }
    .feature-visual-container {
        order: 1;
        margin-bottom: 40px;
    }
}

/* --- FAQ SECTION --- */
.faq-section {
    padding: 80px 20px;
    background-color: var(--bg-white);
}

.faq-container {
    max-width: 700px; /* Keep reading lines short */
    margin: 0 auto;
    text-align: center;
}

.faq-list {
    text-align: left;
    margin-top: 40px;
}

.faq-item {
    border-bottom: 1px solid var(--border-light);
}

.faq-question {
    padding: 20px 0;
    font-size: 1.15rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: color 0.3s ease;
}

.faq-question:hover {
    color: var(--primary-orange);
}

.faq-icon {
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--primary-orange);
    transition: transform 0.3s ease;
}

.faq-answer {
    display: none; /* Hidden by default, jQuery will toggle */
    padding-bottom: 20px;
    color: var(--text-gray);
    line-height: 1.6;
}

/* --- CONTACT SECTION --- */
.contact-section {
    padding: 100px 20px;
    background-color: var(--primary-light); /* Very light orange background */
}

.contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.contact-info h2 {
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.contact-info p {
    font-size: 1.1rem;
    color: var(--text-gray);
    margin-bottom: 30px;
}

.contact-details p {
    margin-bottom: 10px;
    color: var(--text-dark);
}

.contact-form-container {
    background: var(--bg-white);
    padding: 40px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    background-color: #FAFAFA;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-orange);
    background-color: var(--bg-white);
    box-shadow: 0 0 0 3px rgba(245, 138, 7, 0.1); /* Soft orange glow */
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .contact-layout {
        grid-template-columns: 1fr;
    }
    .contact-info {
        text-align: center;
    }
    .contact-form-container {
        padding: 30px 20px;
    }
}

/* --- FOOTER SECTION --- */
.site-footer {
    background-color: var(--text-dark); /* Dark theme for the footer */
    color: #E8EAED; /* Light gray text */
    padding: 60px 20px 20px;
    font-size: 0.95rem;
}

.footer-layout {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand .logo {
    margin-bottom: 16px;
    /* Turns the logo white for the dark footer */
    filter: brightness(0) invert(1);
}

.company-desc {
    margin-bottom: 24px;
    color: #9AA0A6;
    max-width: 300px;
}

.company-details p {
    color: #9AA0A6;
    margin-bottom: 4px;
    font-size: 0.85rem;
}

.footer-links h4 {
    color: var(--bg-white);
    font-size: 1.1rem;
    margin-bottom: 20px;
    font-weight: 500;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #9AA0A6;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #3C4043;
    color: #5F6368;
    font-size: 0.85rem;
}

/* Mobile Adjustments */
@media (max-width: 768px) {
    .footer-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* --- BANNER NOVITÀ --- */
.news-banner {
    background-color: var(--primary-orange);
    color: white;
    text-align: center;
    padding: 12px 20px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    font-size: 0.95rem;
    box-shadow: 0 4px 10px rgba(245, 138, 7, 0.2);
}

.news-banner .badge {
    background-color: white;
    color: var(--primary-orange);
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    white-space: nowrap;
}

.news-banner p {
    margin: 0;
    color: white; /* Ensures text stays white */
}

/* Mobile Adjustments for the Banner */
@media (max-width: 768px) {
    .news-banner {
        flex-direction: column;
        gap: 8px;
        padding: 16px 20px;
    }
}