/* CSS Variables for Premium Light Theme */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fc; /* Very light cool gray */
    --text-primary: #121568; /* Navy Blue dal logo */
    --text-secondary: #4b5563; /* Gray */
    --text-light: #9ca3af;
    
    --accent: #f0711c; /* Arancione dal logo */
    --accent-hover: #d55c12;
    
    --border-color: #e5e7eb;
    --card-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.05);
    --hover-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.1);
    
    --font-main: 'Inter', sans-serif;
    --transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1, h2, h3, h4 {
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.5rem, 5vw, 4rem); margin-bottom: 1rem; }
h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1.5rem; }
h3 { font-size: 1.5rem; margin-bottom: 0.5rem; }
p { font-size: 1.125rem; color: var(--text-secondary); margin-bottom: 1rem; }

/* Utilities */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.text-center { text-align: center; }
.mt-3 { margin-top: 1.5rem; }

.section {
    padding: 6rem 0;
}
.section-light {
    background-color: var(--bg-secondary);
}

.section-title {
    position: relative;
    display: inline-block;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    border-radius: 9999px; /* Pill shape */
    font-weight: 600;
    font-size: 1.125rem;
    text-decoration: none;
    transition: var(--transition);
    cursor: pointer;
    border: none;
}

.btn-primary {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    box-shadow: 0 4px 14px 0 rgba(0,0,0,0.1);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0,0,0,0.15);
    background-color: #000;
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}
.btn-outline:hover {
    border-color: var(--text-primary);
    background-color: var(--bg-secondary);
}

.btn-sm {
    padding: 0.75rem 1.5rem;
    font-size: 1rem;
}

/* Navbar (Glassmorphism) */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: var(--transition);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    white-space: nowrap;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    transition: var(--transition);
    position: relative;
}

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

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--text-primary);
    transition: width 0.3s ease;
}

.nav-links a:hover::after, .nav-links a.active::after {
    width: 100%;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

.mobile-menu {
    display: none;
    background: var(--bg-primary);
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
}
.mobile-menu.active {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.mobile-menu a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 1.5rem 2rem;
    background-image: linear-gradient(rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.85)), url('sfondo.jpg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-content {
    max-width: 800px;
}

.hero h1, .hero p {
    text-shadow: 0 0 15px rgba(255,255,255,0.8), 0 0 30px rgba(255,255,255,1);
}

.badge {
    display: inline-block;
    padding: 0.5rem 1rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

/* About Section */
.about-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 4rem;
    align-items: center;
}

.about-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.stat-card {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    text-align: center;
    border: 1px solid var(--border-color);
}
.stat-card h3 {
    font-size: 3rem;
    color: var(--accent);
    margin: 0;
}

/* Program Timeline */
.timeline {
    max-width: 800px;
    margin: 3rem auto 0;
    position: relative;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 2rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: var(--border-color);
}

.timeline-item {
    position: relative;
    padding-left: 5rem;
    margin-bottom: 3rem;
}

.timeline-date {
    position: absolute;
    left: 0;
    top: 0;
    width: 4rem;
    height: 4rem;
    background: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 0.875rem;
    color: var(--text-primary);
    z-index: 2;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.timeline-content {
    background: var(--bg-primary);
    padding: 2rem;
    border-radius: 20px;
    box-shadow: var(--card-shadow);
    border: 1px solid var(--border-color);
}

/* Speakers Grid */
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 3rem;
}

.link-arrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    transition: var(--transition);
}
.link-arrow:hover {
    gap: 0.75rem;
}

.speakers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
}
.speakers-grid.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.speaker-card {
    background: var(--bg-primary);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: var(--card-shadow);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.speaker-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--hover-shadow);
}

.speaker-img {
    height: 300px;
    background-color: #f1f5f9;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.placeholder-img:not([style*="background-image"]) {
    background-image: linear-gradient(45deg, #f1f5f9 25%, #e2e8f0 25%, #e2e8f0 50%, #f1f5f9 50%, #f1f5f9 75%, #e2e8f0 75%, #e2e8f0 100%);
    background-size: 20px 20px;
}

.speaker-info {
    padding: 2rem;
}

.speaker-role {
    display: block;
    color: var(--accent);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

/* Detailed Speaker Card (Speakers Page) */
.speaker-card.detailed .speaker-img {
    height: 250px;
}
.speaker-topic {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    background: var(--bg-secondary);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
}
.speaker-topic i {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
}

/* Page Header (for subpages) */
.page-header {
    padding: 10rem 0 4rem;
    background: var(--bg-secondary);
    text-align: center;
    border-bottom: 1px solid var(--border-color);
}

/* Sponsors */
.sponsor-tier {
    margin-bottom: 4rem;
}
.sponsor-tier:last-child {
    margin-bottom: 0;
}
.tier-title {
    font-size: 1.25rem;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 2rem;
}

.sponsor-logos {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2rem;
}

.logo-box {
    background: var(--bg-primary);
    padding: 1.5rem 2.5rem;
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--card-shadow);
    font-weight: 800;
    color: var(--text-secondary);
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.logo-box:hover {
    transform: scale(1.05);
    box-shadow: var(--hover-shadow);
    color: var(--text-primary);
}



/* Footer */
.footer {
    background-color: var(--text-primary);
    color: var(--bg-primary);
    padding: 6rem 0 2rem;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4rem;
}
.footer-brand h2 {
    margin-bottom: 0.5rem;
}
.footer-brand p {
    color: var(--text-light);
    margin: 0;
}
.social-link {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--bg-primary);
    text-decoration: none;
    font-weight: 600;
    padding: 1rem 1.5rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 9999px;
    transition: var(--transition);
}
.social-link:hover {
    background: var(--bg-primary);
    color: var(--text-primary);
}
.footer-bottom {
    text-align: center;
    color: var(--text-light);
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 2rem;
    font-size: 0.875rem;
}

/* Animations */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 992px) {
    .about-grid { grid-template-columns: 1fr; gap: 2rem; }
    .speakers-grid.grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-btn { display: block; }
    
    .brand { font-size: 0.9rem; }
    .brand img { height: 30px !important; margin-right: 8px !important; }

    .speakers-grid, .speakers-grid.grid-3 { grid-template-columns: 1fr; }
    
    .footer-content {
        flex-direction: column;
        gap: 2rem;
        text-align: center;
    }
}
