/*==================================================
  HERO SECTION
==================================================*/
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    padding-top: 60px; /* Compensazione per la navbar fissa */
}

.hero-content {
    text-align: center;
    z-index: 2;
    padding: 0 20px;
}

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

.hero-logo img {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 0 15px rgba(255, 140, 66, 0.4));
    animation: logoFloat 6s ease-in-out infinite;
}

.glitch {
    font-size: clamp(2rem, 8vw, 4rem); /* Responsive font size */
    font-weight: 700;
    color: var(--text-light);
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    margin-bottom: 1rem;
}

.typing-container {
    font-size: clamp(1.2rem, 4vw, 1.5rem); /* Responsive font size */
    color: var(--accent-color);
    min-height: 2em; /* Previene il "salto" del contenuto */
}

/*==================================================
  ABOUT SECTION
==================================================*/
.about-section {
    padding: 6rem 0;
    background: rgba(45, 55, 72, 0.95);
}

.about-card {
    display: flex;
    align-items: center;
    gap: 4rem;
    margin-bottom: 6rem;
    padding: 2rem;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    transition: transform 0.3s ease;
}

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

.about-card.reverse {
    flex-direction: row-reverse;
}

.about-text {
    flex: 1;
}

.about-text h2 {
    color: var(--accent-color);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 1rem;
}

.about-text p {
    margin-bottom: 2rem;
    font-size: clamp(1rem, 3vw, 1.1rem);
    line-height: 1.6;
}

.about-image {
    flex: 1;
    position: relative;
}

.floating-image {
    width: 100%;
    max-width: 400px;
    border-radius: 20px;
    animation: float 6s ease-in-out infinite;
}

/*==================================================
  MUSIC SECTION
==================================================*/
.music-section {
    padding: 6rem 0;
    background: linear-gradient(135deg, rgba(45, 55, 72, 0.97), rgba(74, 90, 122, 0.97));
    position: relative;
    overflow: hidden;
}

.music-content {
    display: flex;
    align-items: center;
    gap: 4rem;
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 20px;
}

.music-text {
    flex: 1;
    padding: 2rem;
}

.section-title {
    color: var(--accent-color);
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    margin-bottom: 1.5rem;
}

.music-visual {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 300px;
}

/*==================================================
  ANIMATIONS
==================================================*/
@keyframes logoFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

/*==================================================
  WAVEFORM ANIMATION
==================================================*/
.music-waveform {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 200px;
}

.bar {
    width: clamp(8px, 2vw, 12px);
    background: var(--accent-color);
    border-radius: 6px;
    animation: waveform 1.2s ease-in-out infinite;
    transform-origin: bottom;
}

.bar:nth-child(1) { height: 60%; animation-delay: -0.2s; }
.bar:nth-child(2) { height: 80%; animation-delay: -0.1s; }
.bar:nth-child(3) { height: 100%; animation-delay: 0s; }
.bar:nth-child(4) { height: 80%; animation-delay: 0.1s; }
.bar:nth-child(5) { height: 60%; animation-delay: 0.2s; }

@keyframes waveform {
    0% { transform: scaleY(1); }
    50% { transform: scaleY(0.3); }
    100% { transform: scaleY(1); }
}

/*==================================================
  RESPONSIVE DESIGN
==================================================*/
@media (max-width: 1024px) {
    .about-card {
        gap: 2rem;
    }
    
    .music-content {
        padding: 0 2rem;
    }
}

@media (max-width: 768px) {
    .hero-logo img {
        width: 100px;
        height: 100px;
    }

    .about-card,
    .about-card.reverse {
        flex-direction: column;
        padding: 1.5rem;
        text-align: center;
    }

    .about-image {
        order: -1; /* Immagine sempre sopra al testo su mobile */
    }

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

    .music-visual {
        min-height: 200px;
    }
}

@media (max-width: 480px) {
    .hero {
        padding-top: 50px;
    }

    .hero-content {
        padding: 0 15px;
    }

    .about-text h2,
    .section-title {
        font-size: 1.8rem;
    }

    .about-text p {
        font-size: 1rem;
    }

    .music-waveform {
        height: 150px;
    }
}

/* Fix per iOS Safari */
@supports (-webkit-touch-callout: none) {
    .hero {
        height: -webkit-fill-available;
    }
}
