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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
    color: #1a365d;
    background-color: #f8fafc;
    position: relative;
    overflow-x: hidden;
}

/* Animated Background Elements */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

p {
    font-size: 1.1rem;
    font-weight: 400;
}

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

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(248, 250, 252, 0.95);
    backdrop-filter: blur(10px);
    z-index: 1000;
    padding: 1.5rem 0;
    border-bottom: 1px solid #e2e8f0;
}

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

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a365d;
}

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

.nav-links a {
    text-decoration: none;
    color: #4a5568;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: #3182ce;
}

.hamburger {
    display: none;
    cursor: pointer;
}

.hamburger span {
    display: block;
    width: 25px;
    height: 3px;
    margin: 5px;
    background-color: #1a365d;
    transition: all 0.3s ease-in-out;
}

/* Hero Section */
.hero {
    padding: 180px 0 100px;
    text-align: center;
    background: #fdfeff;
    position: relative;
    overflow: hidden;
}

.hero .container {
    position: relative;
    z-index: 2; /* Ensure content is above the canvas */
}

#waveform-canvas-3d {
    position: absolute;
    top: 50%;
    left: 0;
    width: 100%;
    height: 50%;
    z-index: 1;
    opacity: 0.7; /* Increased visibility */
}

@keyframes heroPattern {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(100px, 100px);
    }
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    color: #1a365d;
    line-height: 1.1;
}

.hero p {
    font-size: 1.3rem;
    color: #4a5568;
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}

.cta-button {
    display: inline-block;
    background: #3182ce;
    color: white;
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(49, 130, 206, 0.3);
}

.cta-button:hover {
    background: #2c5282;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(49, 130, 206, 0.4);
}

.stats {
    margin-top: 4rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
}

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

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: #3182ce;
    display: block;
}

.stat-label {
    font-size: 1rem;
    color: #4a5568;
    font-weight: 500;
}

/* Section Styles */
.section {
    padding: 80px 0;
}

.section-title {
    font-size: 2.8rem;
    font-weight: 700;
    text-align: center;
    margin-bottom: 1rem;
    color: #1a365d;
}

.section-subtitle {
    font-size: 1.2rem;
    text-align: center;
    color: #4a5568;
    margin-bottom: 4rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin-top: 3rem;
}

.service-card {
    background: white;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;
    color: #1a365d;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.service-icon {
    width: 60px;
    height: 60px;
    background: #ccebff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-card h2 {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: #1a365d;
}

.service-card p {
    color: #1a365d;
    line-height: 1.7;
}

/* Courses Section */
.courses-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.course-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease;
    border: 1px solid #e2e8f0;
    display: flex;
    flex-direction: column;
}

.course-card:hover {
    transform: translateY(-5px);
}

.course-header {
    background: linear-gradient(135deg, #3182ce, #63b3ed);
    color: white;
    padding: 1.5rem;
    height: 145px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.course-card h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.course-duration {
    font-size: 0.9rem;
    opacity: 0.9;
}

.course-content {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.course-content a {
    color: #4a5568; /* Dark gray */
    text-decoration: underline;
}

.course-description {
    color: #4a5568;
    margin-bottom: 1rem;
    line-height: 1.6;
}

.course-features {
    list-style: none;
    margin-top: auto; /* This is the key change */
}

.course-features li {
    color: #4a5568;
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.course-features li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #3182ce;
    font-weight: bold;
}

/* About Section */
.about {
    background: white;
}

.about-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.about-text h3 {
    font-size: 2rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
    color: white;
}

.about-text p {
    color: white;
    margin-bottom: 1.5rem;
    line-height: 1.7;
    font-size: 1.1rem;
}

.about-image {
    max-width: 350px; /* Diametro massimo del cerchio */
    width: 100%; /* Larghezza reattiva */
    height: auto; /* Mantiene le proporzioni */
    aspect-ratio: 1 / 1; /* Assicura che sia un cerchio */
    border-radius: 50%;
    overflow: hidden;
    margin: 0 auto;
}

.about-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Assicura che l'immagine copra l'area senza distorsioni */
}

/* Contact Section */
.contact {
    background: #fdfeff;
    color: #1a365d;
    position: relative;
    overflow: hidden;
}

.contact::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%233182ce' fill-opacity='0.02'%3E%3Ccircle cx='40' cy='40' r='1'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
    animation: contactPattern 50s infinite linear reverse;
    z-index: 0;
}

.contact .container {
    position: relative;
    z-index: 1;
}

@keyframes contactPattern {
    0% {
        transform: translate(0, 0);
    }
    100% {
        transform: translate(-80px, -80px);
    }
}

.contact .section-title,
.contact .section-subtitle {
    color: #1a365d;
}

.contact-tiles {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
}

.contact-tile {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    text-decoration: none;
    color: #1a365d;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    border: 1px solid #e2e8f0;
}

.contact-tile:hover {
    background: #e2e8f0;
    transform: translateY(-5px);
}

.contact-tile-icon {
    font-size: 2.5rem;
}

.contact-tile-icon svg {
    width: 2.5rem;
    height: 2.5rem;
}

.contact-tile-text {
    min-width: 0; /* Fix for flexbox overflow */
}

.contact-tile-text h4 {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 0.25rem;
}

.contact-tile-text p {
    font-size: 1rem;
    opacity: 0.9;
    word-break: break-word; /* Allow long text to wrap */
}

.contact-form {
    max-width: 600px;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.1);
    padding: 2.5rem;
    border-radius: 12px;
    backdrop-filter: blur(10px);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: rgba(255, 255, 255, 0.7);
}

.submit-btn {
    background: #3182ce;
    color: white;
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.submit-btn:hover {
    background: #2c5282;
    transform: translateY(-2px);
}

/* Footer */
footer {
    background: #1a365d;
    color: white;
    text-align: center;
    padding: 2rem 0;
}

/* Responsive */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 70px;
        left: 0;
        background: rgba(248, 250, 252, 0.95);
        backdrop-filter: blur(10px);
        padding: 1rem 0;
    }

    .nav-links.active {
        display: flex;
    }

    .hamburger {
        display: block;
    }

    .nav-links li {
        text-align: center;
        padding: 1rem 0;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero p {
        font-size: 1.1rem;
    }

    .section-title {
        font-size: 2.2rem;
    }

    .about-content {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

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

/* Smooth scrolling */
html {
    scroll-behavior: smooth;
}

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

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

@media (max-width: 420px) {
    .container {
        padding: 0 20px;
    }

    .contact-tiles,
    .courses-grid {
        grid-template-columns: 1fr;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .section-title {
        font-size: 1.8rem;
    }
}
