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

:root {
    --navy: #0a1e5e;
    --navy-light: #122a6e;
    --blue-accent: #3b82f6;
    --blue-light: #dbeafe;
    --blue-pale: #eff6ff;
    --blue-circle: #93c5fd;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-600: #475569;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 16px rgba(0,0,0,0.1);
    --shadow-lg: 0 8px 32px rgba(0,0,0,0.12);
    --radius: 16px;
    --radius-sm: 12px;
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--navy);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

a {
    color: var(--blue-accent);
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: var(--navy);
}

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

#navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--gray-200);
    transition: box-shadow 0.3s;
}

#navbar.scrolled {
    box-shadow: var(--shadow-md);
}

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

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.1rem;
    color: var(--navy);
    text-decoration: none;
}

.nav-logo-img {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-links a {
    color: var(--navy);
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.3s;
    text-decoration: none;
}

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

.nav-cta {
    background: var(--navy);
    color: var(--white) !important;
    padding: 10px 24px;
    border-radius: 50px;
    font-weight: 600;
    transition: background 0.3s, transform 0.2s !important;
}

.nav-cta:hover {
    background: var(--navy-light);
    color: var(--white) !important;
    transform: translateY(-1px);
}

.hamburger {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.hamburger span {
    width: 24px;
    height: 2.5px;
    background: var(--navy);
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

#hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #e8edf5 0%, #d0dae8 50%, #c5d5e8 100%);
    padding-top: 72px;
    overflow: hidden;
}

.hero-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 80px 24px 120px;
    display: flex;
    align-items: center;
    gap: 60px;
    width: 100%;
}

.hero-text {
    flex: 1;
}

.hero-text h1 {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.15;
    color: var(--navy);
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 36px;
    max-width: 540px;
}

.hero-logo {
    flex: 0 0 auto;
}

.hero-logo img {
    width: 320px;
    height: 320px;
    object-fit: contain;
    border-radius: 20px;
    background: var(--white);
    padding: 20px;
    box-shadow: var(--shadow-lg);
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    line-height: 0;
}

.hero-wave svg {
    width: 100%;
    height: 80px;
}

.btn-primary {
    display: inline-block;
    background: var(--navy);
    color: var(--white);
    padding: 16px 40px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1.05rem;
    text-decoration: none;
    transition: all 0.3s;
    box-shadow: 0 4px 16px rgba(10,30,94,0.25);
}

.btn-primary:hover {
    background: var(--navy-light);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: 0 6px 24px rgba(10,30,94,0.35);
}

.btn-primary.large {
    padding: 18px 48px;
    font-size: 1.15rem;
}

.btn-outline {
    display: inline-block;
    border: 2px solid var(--white);
    color: var(--white);
    padding: 12px 32px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 0.95rem;
    text-decoration: none;
    transition: all 0.3s;
}

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

#perche {
    padding: 100px 0;
    background: var(--white);
}

.section-title {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    font-weight: 900;
    color: var(--navy);
    margin-bottom: 56px;
    text-align: center;
}

.section-title.left-align {
    text-align: left;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 28px;
}

.feature-card {
    background: var(--blue-pale);
    border-radius: var(--radius);
    padding: 36px 28px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.feature-icon {
    width: 56px;
    height: 56px;
    background: var(--blue-circle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    color: var(--navy);
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
    color: var(--navy);
}

.feature-card p {
    font-size: 0.95rem;
    color: var(--gray-600);
    line-height: 1.6;
}

#corsi {
    padding: 80px 0 100px;
    background: var(--gray-50);
}

.course-block {
    display: flex;
    gap: 48px;
    margin-bottom: 80px;
    align-items: flex-start;
}

.course-block:last-child {
    margin-bottom: 0;
}

.course-block.reverse {
    flex-direction: row-reverse;
}

.course-image {
    flex: 0 0 480px;
    max-width: 480px;
}

.course-image img {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
}

.course-content {
    flex: 1;
}

.course-title {
    font-size: 1.8rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 24px;
}

.course-badge {
    display: inline-block;
    background: var(--blue-light);
    color: var(--navy);
    padding: 6px 16px;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 16px;
}

.course-desc {
    font-size: 1rem;
    color: var(--gray-600);
    line-height: 1.7;
    margin-bottom: 20px;
}

.course-list {
    list-style: none;
    padding: 0;
}

.course-list li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 12px;
    font-size: 0.95rem;
    color: var(--gray-600);
}

.course-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--blue-accent);
}

.course-cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.course-mini-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-sm);
    padding: 24px 20px;
    transition: transform 0.3s, box-shadow 0.3s;
}

.course-mini-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-sm);
}

.course-mini-card.highlight {
    background: var(--blue-light);
    border-color: transparent;
}

.course-mini-card h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.course-mini-card p {
    font-size: 0.88rem;
    color: var(--gray-600);
    line-height: 1.55;
}

.course-numbered {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.numbered-item .number {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--blue-accent);
    display: block;
    margin-bottom: 8px;
}

.number-line {
    width: 100%;
    height: 3px;
    background: var(--blue-accent);
    border-radius: 2px;
    margin-bottom: 16px;
}

.numbered-item h4 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--navy);
    margin-bottom: 8px;
}

.numbered-item p {
    font-size: 0.88rem;
    color: var(--gray-600);
    line-height: 1.55;
}

#iscrizione {
    padding: 100px 0;
    background: var(--white);
}

.iscrizione-wrapper {
    display: flex;
    gap: 60px;
    align-items: center;
}

.iscrizione-left {
    flex: 1;
}

.iscrizione-right {
    flex: 0 0 400px;
    max-width: 400px;
}

.iscrizione-right img {
    width: 100%;
    height: 400px;
    object-fit: cover;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
}

.steps {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-bottom: 36px;
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    flex: 1;
}

.step-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    border: 4px solid var(--blue-circle);
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--navy);
    margin-bottom: 16px;
    position: relative;
    z-index: 2;
}

.step-connector {
    display: none;
}

.step:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 40px;
    left: calc(50% + 44px);
    width: calc(100% - 88px);
    height: 4px;
    background: var(--blue-circle);
    z-index: 1;
}

.step-label {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--navy);
    text-align: center;
}

.iscrizione-info {
    font-size: 0.95rem;
    color: var(--gray-600);
    line-height: 1.7;
}

.iscrizione-info a {
    font-weight: 600;
    color: var(--navy);
}

#cta {
    padding: 100px 0;
    background: var(--gray-50);
    text-align: center;
}

#cta h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 900;
    color: var(--navy);
    margin-bottom: 20px;
}

.cta-text {
    font-size: 1.1rem;
    color: var(--gray-600);
    max-width: 700px;
    margin: 0 auto 48px;
    line-height: 1.7;
}

.cta-card {
    background: var(--blue-pale);
    border-radius: var(--radius);
    padding: 48px 40px;
    max-width: 600px;
    margin: 0 auto;
}

.cta-icon {
    width: 64px;
    height: 64px;
    background: var(--blue-circle);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--navy);
}

.cta-card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: var(--navy);
    margin-bottom: 8px;
}

.cta-card p {
    font-size: 1rem;
    color: var(--gray-600);
    margin-bottom: 28px;
}

footer {
    background: var(--navy);
    color: var(--white);
    padding: 48px 0 0;
}

.footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
    padding-bottom: 32px;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 16px;
}

.footer-logo {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    object-fit: contain;
}

.footer-brand p {
    font-size: 0.95rem;
    opacity: 0.9;
}

.footer-contacts p {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-bottom: 4px;
}

.footer-contacts a {
    color: var(--white);
    opacity: 0.9;
}

.footer-contacts a:hover {
    opacity: 1;
    color: var(--blue-circle);
}

.footer-bottom {
    text-align: center;
    padding: 20px 0;
    font-size: 0.85rem;
    opacity: 0.6;
}

.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 1024px) {
    .course-block {
        flex-direction: column;
        gap: 28px;
    }

    .course-block.reverse {
        flex-direction: column;
    }

    .course-image {
        flex: none;
        max-width: 100%;
    }

    .course-image img {
        height: 260px;
    }

    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .hero-logo img {
        width: 240px;
        height: 240px;
    }
}

@media (max-width: 768px) {
    .hamburger {
        display: flex;
    }

    .nav-links {
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: var(--white);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--gray-200);
        box-shadow: var(--shadow-md);
        transform: translateY(-120%);
        transition: transform 0.3s ease;
        z-index: 999;
    }

    .nav-links.open {
        transform: translateY(0);
    }

    .hero-content {
        flex-direction: column;
        text-align: center;
        padding: 60px 24px 100px;
        gap: 40px;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-logo img {
        width: 200px;
        height: 200px;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .course-cards-row {
        grid-template-columns: 1fr;
    }

    .course-numbered {
        grid-template-columns: 1fr;
    }

    .iscrizione-wrapper {
        flex-direction: column;
        gap: 40px;
    }

    .iscrizione-right {
        flex: none;
        max-width: 100%;
    }

    .iscrizione-right img {
        height: 280px;
    }

    .steps {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
    }

    .step {
        flex-direction: row;
        gap: 16px;
    }

    .step-circle {
        width: 60px;
        height: 60px;
        min-width: 60px;
        margin-bottom: 0;
    }

    .step:not(:last-child)::after {
        display: none;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-brand {
        flex-direction: column;
    }

    .section-title.left-align {
        text-align: center;
    }

    .course-title {
        font-size: 1.5rem;
    }
}

@media (max-width: 480px) {
    .hero-text h1 {
        font-size: 1.8rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .btn-primary {
        padding: 14px 32px;
        font-size: 0.95rem;
    }

    .btn-primary.large {
        padding: 16px 36px;
        font-size: 1rem;
    }

    .course-image img {
        height: 200px;
    }

    .cta-card {
        padding: 32px 24px;
    }
}
