/* ===== RESET & BASE STYLES ===== */
:root {
    --black: #000000;
    --white: #ffffff;
    --gray-50: #fafafa;
    --gray-100: #f5f5f5;
    --gray-200: #e5e5e5;
    --gray-300: #d4d4d4;
    --gray-400: #a3a3a3;
    --gray-500: #737373;
    --gray-600: #525252;
    --gray-700: #404040;
    --gray-800: #262626;
    --gray-900: #171717;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    line-height: 1.6;
    color: var(--gray-900);
    background-color: var(--white);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
    font-weight: 600;
    line-height: 1.2;
    letter-spacing: -0.01em;
    margin-bottom: 1rem;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
    margin-bottom: 2rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--black);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.7;
}

.text-center {
    text-align: center;
}

.text-muted {
    color: var(--gray-600);
}

.text-small {
    font-size: 0.875rem;
}

.lead {
    font-size: 1.125rem;
    line-height: 1.7;
}

/* ===== LAYOUT & CONTAINERS ===== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

section {
    padding: 5rem 0;
}

section:nth-child(even) {
    background-color: var(--gray-50);
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border: 1px solid var(--black);
    background-color: var(--black);
    color: var(--white);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
    border-radius: 0;
    -webkit-appearance: none;
    appearance: none;
}

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

.btn-outline {
    background-color: transparent;
    color: var(--black);
}

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

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

/* ===== HEADER & NAVIGATION ===== */
header {
    position: sticky;
    top: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--gray-200);
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 4rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.nav-desktop {
    display: none;
}

.nav-desktop a {
    margin-left: 2rem;
    font-size: 0.9375rem;
}

.header-actions {
    display: none;
}

.mobile-menu-btn {
    display: block;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    z-index: 101;
}

.hamburger {
    display: block;
    width: 20px;
    height: 2px;
    background-color: var(--black);
    position: relative;
    transition: all 0.3s ease;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 2px;
    background-color: var(--black);
    transition: all 0.3s ease;
}

.hamburger::before {
    top: -6px;
}

.hamburger::after {
    bottom: -6px;
}

.mobile-menu-btn.active .hamburger {
    background-color: transparent;
}

.mobile-menu-btn.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.mobile-menu-btn.active .hamburger::after {
    transform: rotate(-45deg);
    bottom: 0;
}

.mobile-menu {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: var(--white);
    padding: 5rem 2rem 2rem;
    transform: translateX(-100%);
    transition: transform 0.3s ease;
    z-index: 99;
}

.mobile-menu.active {
    transform: translateX(0);
}

.mobile-menu a {
    display: block;
    padding: 1rem 0;
    border-bottom: 1px solid var(--gray-200);
    font-size: 1.125rem;
}

.mobile-actions {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* ===== HERO SECTION ===== */
.hero {
    padding: 6rem 0 5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gray-300), transparent);
}

.hero h1 {
    max-width: 800px;
    margin: 0 auto 1.5rem;
    font-weight: 600;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto 3rem;
    line-height: 1.6;
}

.hero-cta {
    margin-bottom: 2rem;
}

.price-note {
    color: var(--gray-600);
    font-size: 0.9375rem;
    margin-top: 1.5rem;
}

/* ===== FEATURES SECTION ===== */
.features-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.feature-card {
    text-align: center;
    padding: 2.5rem 2rem;
    border: 1px solid var(--gray-200);
    background-color: var(--white);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

.feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1.5rem;
    background-color: var(--gray-100);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
}

/* ===== INCLUDED SECTION ===== */
.included-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-top: 2rem;
}

.included-list,
.excluded-list {
    list-style: none;
}

.included-list li,
.excluded-list li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
    position: relative;
    padding-left: 2rem;
}

.included-list li:last-child,
.excluded-list li:last-child {
    border-bottom: none;
}

.included-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--black);
    font-weight: 600;
}

.excluded-list li::before {
    content: '—';
    position: absolute;
    left: 0;
    color: var(--gray-400);
}

/* ===== PRICING SECTION (NUOVO MODELLO) ===== */
.pricing-container {
    max-width: 900px;
    margin: 0 auto;
}

.pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 3rem;
}

@media (min-width: 768px) {
    .pricing-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.pricing-card {
    border: 1px solid var(--gray-200);
    padding: 2.5rem 2rem;
    background-color: var(--white);
    display: flex;
    flex-direction: column;
}

.pricing-card.recommended {
    border-color: var(--black);
    background-color: var(--gray-50);
}

.plan-name {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.price {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 1rem 0 0.5rem;
    line-height: 1;
}

.price-period {
    font-size: 0.875rem;
    color: var(--gray-600);
    font-weight: normal;
    display: block;
    margin-top: 0.25rem;
}

.pricing-features {
    list-style: none;
    margin: 2rem 0;
    flex-grow: 1;
}

.pricing-features li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-200);
    position: relative;
    padding-left: 1.5rem;
    font-size: 0.95rem;
}

.pricing-features li:last-child {
    border-bottom: none;
}

.pricing-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--gray-600);
}

.pricing-note {
    text-align: center;
    margin-top: 2rem;
    color: var(--gray-600);
    font-size: 0.95rem;
}

/* ===== MODIFICHE SECTION ===== */
.priority-table {
    max-width: 600px;
    margin: 2rem auto 0;
    border-collapse: collapse;
    width: 100%;
}

.priority-table td {
    padding: 1rem;
    border-bottom: 1px solid var(--gray-200);
}

.priority-table tr:last-child td {
    border-bottom: none;
}

.priority-table .price-tag {
    font-weight: 600;
    white-space: nowrap;
}

.modifiche-note {
    background-color: var(--gray-100);
    padding: 1rem;
    border-left: 3px solid var(--black);
    margin-bottom: 2rem;
    font-size: 1rem;
}

/* ===== HOW IT WORKS ===== */
.steps {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-top: 3rem;
    position: relative;
}

.stepfinale {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    margin-top: 70px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 48px;
    height: 48px;
    background-color: var(--black);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-weight: 600;
    font-size: 1.125rem;
}

/* ===== ESEMPI GRID ===== */
.esempi-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    margin-top: 2rem;
}

.esempio-card {
    border: 1px solid var(--gray-200);
    background-color: var(--white);
    transition: transform 0.2s ease;
    overflow: hidden;
}

.esempio-card:hover {
    transform: translateY(-2px);
    border-color: var(--gray-300);
}

.esempio-img {
    width: 100%;
    height: 200px;
    background-color: var(--gray-100);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    font-size: 0.875rem;
    border-bottom: 1px solid var(--gray-200);
}

.esempio-content {
    padding: 1.5rem;
}

.esempio-tag {
    display: inline-block;
    padding: 0.2rem 0.5rem;
    background-color: var(--gray-100);
    color: var(--gray-700);
    font-size: 0.75rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

/* ===== ORIGINS SECTION ===== */
.origins {
    background-color: var(--white);
    position: relative;
}

.origins::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gray-300), transparent);
}

.origins-content {
    max-width: 700px;
    margin: 0 auto;
    text-align: center;
}

.unitn-logo {
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 1px;
    color: var(--gray-600);
    margin-top: 2rem;
    display: inline-block;
    padding: 0.5rem 1rem;
    border: 1px solid var(--gray-300);
    background-color: var(--gray-50);
}

/* ===== FAQ SECTION ===== */
.faq-list {
    max-width: 800px;
    margin: 2rem auto 0;
}

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

.faq-question {
    padding: 1.5rem 0;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 500;
}

.faq-answer {
    padding: 0 0 1.5rem;
    color: var(--gray-600);
    display: none;
    line-height: 1.7;
}

.faq-item.active .faq-answer {
    display: block;
}

.faq-toggle {
    font-size: 1.5rem;
    transition: transform 0.3s ease;
    color: var(--gray-400);
    margin-left: 1rem;
    flex-shrink: 0;
}

.faq-item.active .faq-toggle {
    transform: rotate(45deg);
    color: var(--black);
}

/* ===== FOOTER ===== */
footer {
    background-color: var(--black);
    color: var(--white);
    padding: 4rem 0 2rem;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gray-700), transparent);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--white);
}

.footer-contact a {
    color: var(--white);
    display: block;
    margin-bottom: 0.5rem;
    opacity: 0.9;
}

.footer-contact a:hover {
    opacity: 1;
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--gray-800);
    text-align: center;
    color: var(--gray-400);
    font-size: 0.875rem;
}

.footer-links {
    margin-top: 1rem;
}

.footer-links a {
    color: var(--gray-400);
    margin: 0 0.5rem;
    font-size: 0.875rem;
}

.footer-links a:hover {
    color: var(--gray-300);
}

/* ===== RESPONSIVE STYLES ===== */
@media (min-width: 768px) {
    h1 {
        font-size: 3rem;
    }
    
    h2 {
        font-size: 2.5rem;
    }
    
    .nav-desktop {
        display: block;
    }
    
    .header-actions {
        display: flex;
        align-items: center;
        gap: 1rem;
    }
    
    .mobile-menu-btn {
        display: none;
    }
    
    .features-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .included-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .steps::before {
        content: '';
        position: absolute;
        top: 24px;
        left: 20%;
        right: 20%;
        height: 1px;
        background-color: var(--gray-300);
        z-index: -1;
    }
    
    .esempi-grid {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (min-width: 1024px) {
    .hero {
        padding: 8rem 0 6rem;
    }
}

/* ===== ACCESSIBILITY ===== */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus {
    outline: 2px solid var(--black);
    outline-offset: 2px;
}

:focus:not(:focus-visible) {
    outline: none;
}

/* ===== UTILITY CLASSES ===== */
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mt-3 { margin-top: 3rem; }
.mt-4 { margin-top: 4rem; }
.mb-1 { margin-bottom: 1rem; }
.mb-2 { margin-bottom: 2rem; }
.mb-3 { margin-bottom: 3rem; }

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3rem;
}

.section-header p {
    color: var(--gray-600);
    font-size: 1.125rem;
}

/* =========================================
   STILI SPECIFICI PER I FORM (SIDEBAR LAYOUT)
   ========================================= */

/* Il contenitore che affianca Sidebar e Main */
.setup-container {
    display: flex;
    min-height: 100vh;
    align-items: flex-start;
}

/* La sidebar grigia a sinistra */
.setup-sidebar {
    width: 320px;
    background-color: var(--gray-50);
    border-right: 1px solid var(--gray-200);
    padding: 3rem 2rem;
    position: sticky;
    top: 4rem; /* Sotto l'header se presente */
    height: calc(100vh - 4rem);
    flex-shrink: 0;
}

/* L'area dei contenuti a destra */
.setup-main {
    flex: 1;
    padding: 4rem;
    max-width: 900px;
    margin: 0 auto;
}

/* Gestione dei Pannelli (Fondamentale!) */
.step-panel {
    display: none; /* Nasconde tutti gli step */
}

.step-panel.active {
    display: block !important; /* Mostra solo lo step corrente */
    animation: fadeInForm 0.4s ease;
}

@keyframes fadeInForm {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Stile per la lista nella sidebar */
.sidebar-steps {
    list-style: none;
}

.step-item {
    padding: 1rem;
    color: var(--gray-500);
    border-radius: 8px;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.step-item.active {
    background-color: var(--white);
    color: var(--black);
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}