/* ===========================
   CSS Variables & Reset
   =========================== */
:root {
    --color-bg: #FAFAF8;
    --color-bg-alt: #F0EFEC;
    --color-text: #2C2C2C;
    --color-text-light: #6B6B6B;
    --color-accent: #5B7B6A;
    --color-accent-hover: #4A6A59;
    --color-warm: #C4956A;
    --color-warm-hover: #B3845A;
    --color-white: #FFFFFF;
    --color-border: #E0DED8;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --container-max: 1100px;
    --header-height: 72px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-height);
}

body {
    font-family: var(--font-body);
    font-size: 16px;
    line-height: 1.7;
    color: var(--color-text);
    background-color: var(--color-bg);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

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

/* ===========================
   Container
   =========================== */
.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 24px;
}

/* ===========================
   Header
   =========================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background: rgba(250, 250, 248, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--color-border);
    z-index: 1000;
    transition: box-shadow 0.3s ease;
}

.header--scrolled {
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.06);
}

.header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 100%;
}

.header__logo {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-text);
    letter-spacing: 0.02em;
}

.header__logo:hover {
    color: var(--color-accent);
}

.header__menu {
    display: flex;
    list-style: none;
    gap: 32px;
}

.header__link {
    font-size: 0.9rem;
    font-weight: 400;
    color: var(--color-text-light);
    letter-spacing: 0.02em;
    position: relative;
    padding: 4px 0;
}

.header__link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-accent);
    transition: width 0.3s ease;
}

.header__link:hover {
    color: var(--color-text);
}

.header__link:hover::after {
    width: 100%;
}

/* Hamburger */
.header__hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 32px;
    height: 32px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}

.header__hamburger span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--color-text);
    transition: all 0.3s ease;
    transform-origin: center;
}

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

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

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

/* ===========================
   Hero
   =========================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: calc(var(--header-height) + 40px) 24px 80px;
    background: url('../img/sfondo 1.jpg') center center / cover no-repeat;
    position: relative;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(245, 242, 237, 0.4);
}

.hero__inner {
    position: relative;
    z-index: 1;
}

.hero__subtitle {
    font-family: var(--font-body);
    font-size: 1.15rem;
    font-weight: 400;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: #000;
    margin-bottom: 20px;
}

.hero__title {
    font-family: var(--font-heading);
    font-size: clamp(2.8rem, 7vw, 5rem);
    font-weight: 700;
    line-height: 1.1;
    color: var(--color-text);
    margin-bottom: 24px;
}

.hero__description {
    font-size: 1.3rem;
    font-weight: 300;
    color: #000;
    max-width: 520px;
    margin: 0 auto 40px;
    line-height: 1.8;
}

.hero__cta {
    display: inline-block;
    padding: 14px 36px;
    background: var(--color-accent);
    color: var(--color-white);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.05em;
    border-radius: 50px;
    transition: all 0.3s ease;
}

.hero__cta:hover {
    background: var(--color-accent-hover);
    color: var(--color-white);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(91, 123, 106, 0.25);
}

/* ===========================
   Sections
   =========================== */
.section {
    padding: 100px 0;
}

.section--alt {
    background-color: var(--color-bg-alt);
}

.section__title {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 600;
    text-align: center;
    margin-bottom: 16px;
    color: var(--color-text);
}

.section__subtitle {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 24px;
}

.section__intro {
    text-align: center;
    max-width: 650px;
    margin: 0 auto 60px;
    color: var(--color-text-light);
    font-size: 1.05rem;
    line-height: 1.8;
}

/* ===========================
   About / Chi Sono
   =========================== */
.about {
    display: grid;
    grid-template-columns: 500px 1fr;
    gap: 60px;
    align-items: start;
    margin-top: 50px;
}

.about__photo {
    width: 100%;
    object-fit: contain;
    border-radius: 12px;
    filter: grayscale(0);
    transition: filter 0.4s ease;
}

.about__photo:hover {
    filter: brightness(1.05);
}

.about__text p {
    margin-bottom: 18px;
    font-size: 1.05rem;
    line-height: 1.85;
}

.about__text p:last-child {
    margin-bottom: 0;
}

.about__more {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.about__more.open {
    max-height: 10000px;
}

.about__more p:first-child,
.about__more h3:first-child {
    margin-top: 18px;
}

.about__more h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 10px;
    color: var(--color-text);
}

.about__toggle {
    display: inline-block;
    margin-top: 14px;
    padding: 0;
    background: none;
    border: none;
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--color-accent);
    cursor: pointer;
    transition: color 0.3s ease;
}

.about__toggle:hover {
    color: var(--color-accent-hover);
}

.therapy-text {
    max-width: 800px;
    margin: 50px auto 0;
}

.therapy-text p {
    margin-bottom: 18px;
    font-size: 1.05rem;
    line-height: 1.85;
}

.therapy-text h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-top: 24px;
    margin-bottom: 10px;
    color: var(--color-text);
}

/* ===========================
   Music Cards
   =========================== */
.music-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.music-card {
    background: var(--color-white);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.music-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.music-card__cover {
    width: 100%;
    aspect-ratio: 1;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-warm) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--color-white);
    font-style: italic;
}

.music-card__title {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    padding: 20px 20px 4px;
}

.music-card__year {
    font-size: 0.8rem;
    color: var(--color-accent);
    padding: 0 20px;
    font-weight: 500;
}

.music-card__desc {
    font-size: 0.9rem;
    color: var(--color-text-light);
    padding: 8px 20px 24px;
    line-height: 1.6;
}

/* ===========================
   Book Cards
   =========================== */
.books-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.book-card {
    display: grid;
    grid-template-columns: 180px 1fr;
    gap: 32px;
    background: var(--color-bg-alt);
    border-radius: 12px;
    overflow: hidden;
    padding: 28px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.book-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.06);
}

.book-card__cover {
    width: 100%;
    aspect-ratio: 2 / 3;
    background: linear-gradient(145deg, var(--color-warm) 0%, #A07850 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--color-white);
    font-style: italic;
}

.book-card__info {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.book-card__title {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    font-weight: 600;
    margin-bottom: 6px;
}

.book-card__publisher {
    font-size: 0.85rem;
    color: var(--color-accent);
    font-weight: 500;
    margin-bottom: 14px;
}

.book-card__desc {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.7;
    max-height: 4.8em;
    overflow: hidden;
    transition: max-height 0.4s ease;
}

.book-card__desc.open {
    max-height: 2000px;
}

.book-card__toggle {
    display: inline-block;
    margin-top: 8px;
    background: none;
    border: none;
    color: var(--color-accent);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0;
    transition: color 0.2s ease;
}

.book-card__toggle:hover {
    color: var(--color-accent-hover);
}

/* ===========================
   Course Cards
   =========================== */
.courses-grid {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin-top: 40px;
}

.course-card {
    background: var(--color-white);
    border-radius: 12px;
    padding: 32px 36px;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
    transition: box-shadow 0.3s ease;
}

.course-card:hover {
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.1);
}

.course-card__title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--color-text);
    margin-bottom: 16px;
}

.course-card__title a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
    position: relative;
}

.course-card__title a::after {
    content: '— guarda il video';
    font-size: 0.75rem;
    font-weight: 400;
    color: #c0392b;
    margin-left: 10px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.course-card__title a:hover {
    color: #c0392b;
}

.course-card__title a:hover::after {
    opacity: 1;
}

.course-card__summary p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

.course-card__more {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease;
}

.course-card__more.open {
    max-height: 5000px;
}

.course-card__more h4 {
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--color-text);
    margin-top: 20px;
    margin-bottom: 10px;
}

.course-card__more p {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.7;
    margin-bottom: 8px;
}

.course-card__more ul {
    list-style: disc;
    padding-left: 24px;
    margin-bottom: 12px;
}

.course-card__more ul li {
    font-size: 0.95rem;
    color: var(--color-text-light);
    line-height: 1.8;
}

.course-card__toggle {
    display: inline-block;
    margin-top: 12px;
    background: none;
    border: none;
    color: var(--color-accent);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    padding: 0;
    transition: color 0.2s ease;
}

.course-card__toggle:hover {
    color: var(--color-accent-hover);
}

/* ===========================
   Therapy Cards
   =========================== */
.therapy-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.therapy-card {
    background: var(--color-white);
    border-radius: 12px;
    padding: 40px 28px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.therapy-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

.therapy-card__icon {
    font-size: 2.5rem;
    color: var(--color-accent);
    margin-bottom: 20px;
    line-height: 1;
}

.therapy-card__title {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
}

.therapy-card__desc {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

/* ===========================
   Projects & Gallery
   =========================== */
.project-section {
    margin-top: 60px;
}

.project-section__title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 28px;
    color: var(--color-text);
    padding-bottom: 12px;
    border-bottom: 2px solid var(--color-border);
}

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

.gallery__item {
    background: var(--color-bg-alt);
    border-radius: 12px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery__item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.08);
}

/* Carousel */
.carousel {
    position: relative;
    overflow: hidden;
    padding: 8px 0;
}

.carousel__track {
    display: flex;
    gap: 20px;
    transition: transform 0.4s ease;
}

.carousel__track .gallery__item {
    width: 400px;
    height: 400px;
    min-width: 400px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.06);
}

.carousel__track .gallery__item:hover {
    transform: none;
}

.carousel__track .gallery__img {
    width: 100%;
    height: 180px;
    flex-shrink: 0;
    object-fit: cover;
}

.carousel__track .gallery__info {
    padding: 20px 24px;
    flex: 1;
    overflow-y: auto;
}

.carousel__btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--color-border);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(4px);
    font-size: 1.6rem;
    line-height: 1;
    color: var(--color-text);
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.carousel__btn:hover {
    background: var(--color-accent);
    color: var(--color-white);
    border-color: var(--color-accent);
}

.carousel__btn--prev {
    left: 12px;
}

.carousel__btn--next {
    right: 12px;
}

.carousel__counter {
    text-align: center;
    margin-top: 16px;
    font-size: 0.85rem;
    color: var(--color-text-light);
}

.gallery__img {
    width: 100%;
    aspect-ratio: 16 / 10;
    object-fit: cover;
}

.gallery__info {
    padding: 24px;
}

.gallery__name {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.gallery__desc {
    font-size: 0.9rem;
    color: var(--color-text-light);
    line-height: 1.7;
}

.gallery__placeholder {
    padding: 60px 28px;
    text-align: center;
    font-size: 0.95rem;
    color: var(--color-text-light);
    font-style: italic;
}

/* ===========================
   Contact
   =========================== */
.contact {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 60px;
    align-items: start;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--color-text);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    font-family: var(--font-body);
    font-size: 0.95rem;
    color: var(--color-text);
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(91, 123, 106, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn {
    display: inline-block;
    padding: 14px 36px;
    background: var(--color-accent);
    color: var(--color-white);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 500;
    letter-spacing: 0.03em;
    border: none;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn:hover {
    background: var(--color-accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(91, 123, 106, 0.25);
}

.contact__info {
    padding-top: 10px;
}

.contact__item {
    margin-bottom: 32px;
}

.contact__item h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 8px;
}

.contact__item p {
    color: var(--color-text-light);
    font-size: 0.95rem;
}

.contact__item a {
    color: var(--color-accent);
}

.contact__social {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.social-link {
    display: inline-block;
    padding: 8px 18px;
    border: 1px solid var(--color-border);
    border-radius: 50px;
    font-size: 0.85rem;
    color: var(--color-text-light);
    transition: all 0.3s ease;
}

.social-link:hover {
    border-color: var(--color-accent);
    color: var(--color-accent);
    background: rgba(91, 123, 106, 0.05);
}

/* ===========================
   Footer
   =========================== */
.footer {
    background: var(--color-text);
    color: rgba(255, 255, 255, 0.6);
    padding: 40px 0;
}

.footer__inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer__copy {
    font-size: 0.85rem;
}

.footer__nav {
    display: flex;
    gap: 24px;
}

.footer__nav a {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s ease;
}

.footer__nav a:hover {
    color: rgba(255, 255, 255, 0.9);
}

.footer__home {
    display: inline-block;
    margin-top: 20px;
    padding: 10px 28px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: var(--color-accent);
    border: none;
    border-radius: 6px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease;
}

.footer__home:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

/* ===========================
   Fade-in Animations
   =========================== */
.fade-in {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}

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

/* ===========================
   Responsive
   =========================== */
@media (max-width: 900px) {
    .about {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .about__placeholder {
        max-width: 280px;
        margin: 0 auto;
    }

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

    .contact {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    :root {
        --header-height: 64px;
    }

    .header__hamburger {
        display: flex;
    }

    .header__nav {
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        background: rgba(250, 250, 248, 0.98);
        backdrop-filter: blur(10px);
        -webkit-backdrop-filter: blur(10px);
        border-bottom: 1px solid var(--color-border);
        padding: 20px 0;
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all 0.3s ease;
    }

    .header__nav.open {
        transform: translateY(0);
        opacity: 1;
        pointer-events: all;
    }

    .header__menu {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }

    .header__link {
        font-size: 1rem;
    }

    .section {
        padding: 70px 0;
    }

    .section__intro {
        margin-bottom: 40px;
    }

    .music-grid,
    .therapy-grid {
        grid-template-columns: 1fr;
    }

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

    .carousel__track .gallery__item {
        width: 300px;
        height: 350px;
        min-width: 300px;
    }

    .carousel__track .gallery__img {
        height: 150px;
    }

    .carousel__track .gallery__info {
        padding: 16px 20px;
    }

    .book-card {
        grid-template-columns: 120px 1fr;
        gap: 20px;
        padding: 20px;
    }

    .footer__inner {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }

    .footer__nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .hero__description {
        font-size: 1rem;
    }

    .book-card {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .book-card__cover {
        max-width: 160px;
        margin: 0 auto;
    }
}
