:root {
    --bg: #F7F5F2;
    --paper: #FFFFFF;
    --ink: #1F2933;
    --muted: #69717A;
    --accent: #284B63;
    --accent-dark: #19364A;
    --line: #DFDDD8;
    --soft: #EFECE7;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: "DM Sans", sans-serif;
    background: var(--bg);
    color: var(--ink);
    line-height: 1.6;
}

a {
    color: inherit;
    text-decoration: none;
}

.container {
    width: min(1120px, calc(100% - 40px));
    margin: 0 auto;
}

.nav-wrap {
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(247,245,242,.92);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid rgba(223,221,216,.7);
}

.nav {
    min-height: 74px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-weight: 800;
    letter-spacing: .08em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    font-size: 14px;
}

.nav-cta {
    padding: 10px 16px;
    border-radius: 999px;
    background: var(--ink);
    color: white;
}

.hero {
    padding: 96px 0 82px;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 64px;
    align-items: center;
}

.eyebrow {
    display: inline-block;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .14em;
    color: var(--accent);
    margin-bottom: 14px;
}

h1, h2, h3, p {
    margin-top: 0;
}

h1 {
    font-family: "Playfair Display", serif;
    font-size: clamp(56px, 8vw, 96px);
    line-height: .95;
    letter-spacing: -.05em;
    margin-bottom: 28px;
}

h1 span {
    color: var(--accent);
}

h2 {
    font-family: "Playfair Display", serif;
    font-size: clamp(38px, 5vw, 58px);
    line-height: 1.02;
    letter-spacing: -.035em;
    margin-bottom: 34px;
}

h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.hero-copy {
    max-width: 680px;
    font-size: 19px;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin: 32px 0 44px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 22px;
    border-radius: 999px;
    font-weight: 700;
    transition: .2s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.primary {
    background: var(--accent);
    color: white;
}

.primary:hover {
    background: var(--accent-dark);
}

.secondary {
    background: transparent;
    border: 1px solid var(--line);
}

.full {
    width: 100%;
}

.mini-stats {
    display: flex;
    gap: 32px;
    flex-wrap: wrap;
}

.mini-stats div {
    display: flex;
    flex-direction: column;
}

.mini-stats strong {
    font-size: 18px;
}

.mini-stats span {
    color: var(--muted);
    font-size: 13px;
}

.hero-card {
    min-height: 440px;
    border-radius: 32px;
    background: var(--accent);
    color: white;
    padding: 42px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 24px 70px rgba(40,75,99,.18);
}

.hero-card .formula {
    font-family: "Playfair Display", serif;
    font-size: 110px;
    line-height: .8;
    opacity: .25;
}

.hero-card p {
    font-family: "Playfair Display", serif;
    font-size: 36px;
    line-height: 1.1;
}

.signature {
    opacity: .75;
}

.section {
    padding: 90px 0;
}

.alt {
    background: var(--soft);
}

.cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.card, .price-card, blockquote {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 28px;
}

.card .icon {
    font-size: 34px;
    margin-bottom: 28px;
}

.card p, .price-card p, blockquote footer {
    color: var(--muted);
}

.method-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
}

.steps {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.step {
    display: grid;
    grid-template-columns: 52px 1fr;
    gap: 18px;
}

.step > span {
    font-weight: 800;
    color: var(--accent);
}

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

.price-card.featured {
    background: var(--ink);
    color: white;
    transform: translateY(-10px);
}

.price-card.featured p {
    color: rgba(255,255,255,.68);
}

.pill {
    display: inline-block;
    padding: 6px 10px;
    background: var(--soft);
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--ink);
}

.price {
    font-size: 34px;
    font-weight: 800;
    margin: 18px 0;
}

.price small {
    font-size: 14px;
    font-weight: 500;
}

.pricing-note {
    text-align: center;
    margin-top: 24px;
    color: var(--muted);
    font-size: 13px;
}

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

blockquote {
    margin: 0;
}

blockquote p {
    font-family: "Playfair Display", serif;
    font-size: 23px;
    line-height: 1.35;
}

.contact-box {
    background: var(--accent);
    color: white;
    border-radius: 32px;
    padding: 52px;
    display: grid;
    grid-template-columns: 1.4fr .6fr;
    gap: 50px;
    align-items: center;
}

.contact-box .eyebrow {
    color: rgba(255,255,255,.65);
}

.contact-box p {
    color: rgba(255,255,255,.75);
}

.contact-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.contact-actions .primary {
    background: white;
    color: var(--accent);
}

.contact-actions .secondary {
    border-color: rgba(255,255,255,.4);
}

.text-link {
    text-align: center;
    margin-top: 4px;
    text-decoration: underline;
}

footer {
    padding: 34px 0;
    border-top: 1px solid var(--line);
}

.footer-grid {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    align-items: center;
}

footer p {
    margin-bottom: 0;
    color: var(--muted);
    font-size: 13px;
}

@media (max-width: 900px) {
    .nav-links a:not(.nav-cta) {
        display: none;
    }

    .hero-grid,
    .method-grid,
    .contact-box {
        grid-template-columns: 1fr;
    }

    .hero {
        padding-top: 68px;
    }

    .hero-card {
        min-height: 320px;
    }

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

    .pricing,
    .quotes {
        grid-template-columns: 1fr;
    }

    .price-card.featured {
        transform: none;
    }
}

@media (max-width: 600px) {
    .cards {
        grid-template-columns: 1fr;
    }

    .section {
        padding: 68px 0;
    }

    .contact-box {
        padding: 32px 24px;
    }

    .footer-grid {
        flex-direction: column;
        align-items: flex-start;
    }
}


/* Chi sono */
.about-section {
    background: var(--paper);
}

.about-grid {
    display: grid;
    grid-template-columns: minmax(300px, .85fr) minmax(0, 1.15fr);
    gap: 72px;
    align-items: center;
}

.about-photo-wrap {
    position: relative;
    max-width: 480px;
}

.about-photo-wrap::before {
    content: "";
    position: absolute;
    inset: 10% -5% -5% 10%;
    border-radius: 50%;
    background: var(--soft);
    z-index: 0;
}

.about-photo {
    position: relative;
    z-index: 1;
    width: 100%;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 24px 70px rgba(31, 41, 51, .12);
}

.about-copy {
    max-width: 690px;
}

.about-copy h2 {
    margin-bottom: 26px;
}

.about-copy p {
    font-size: 17px;
    color: var(--muted);
    margin-bottom: 18px;
}

.about-copy strong {
    color: var(--ink);
}


@media (max-width: 900px) {
    .about-grid {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .about-photo-wrap {
        max-width: 420px;
        margin: 0 auto;
    }
}


/* Logo nella hero */
.logo-card {
    background: #F7F5F2;
    border: 1px solid var(--line);
    padding: 24px;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.hero-logo {
    width: 100%;
    height: 100%;
    max-height: 390px;
    object-fit: contain;
    display: block;
}

/* Corso concorsi */
.course-section {
    background: var(--paper);
}

.course-heading {
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    gap: 64px;
    align-items: end;
    margin-bottom: 42px;
}

.course-heading h2 {
    margin-bottom: 0;
}

.course-heading > p {
    color: var(--muted);
    font-size: 17px;
    margin-bottom: 4px;
}

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

.topic-card {
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 28px;
}

.topic-card > span {
    display: inline-block;
    color: var(--accent);
    font-weight: 800;
    font-size: 13px;
    margin-bottom: 26px;
}

.topic-card p {
    color: var(--muted);
    margin-bottom: 0;
}


@media (max-width: 900px) {
    .course-heading {
        grid-template-columns: 1fr;
        gap: 22px;
    }

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

@media (max-width: 600px) {
    .topics-grid {
        grid-template-columns: 1fr;
    }

    .hero-logo {
        max-height: 300px;
    }
}


/* Hero logo: senza riquadro */
.logo-card {
    min-height: 440px;
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    border-radius: 0;
}

.hero-logo {
    width: 100%;
    height: auto;
    max-height: 440px;
    object-fit: contain;
    border-radius: 0;
}

/* Programma concorso */
.course-program .topic-card {
    display: flex;
    flex-direction: column;
}

.course-program .topic-card h3 {
    color: var(--accent);
    line-height: 1.25;
}

.course-program .topic-card ul {
    margin: 0;
    padding-left: 20px;
    color: var(--muted);
}

.course-program .topic-card li + li {
    margin-top: 7px;
}

.bonus-card {
    background: var(--accent);
    color: white;
}

.bonus-card > span,
.bonus-card h3,
.bonus-card p {
    color: white !important;
}

.bonus-number {
    font-family: "Playfair Display", serif;
    font-size: 34px;
    font-weight: 700;
    margin: 6px 0 4px;
}


/* Recensioni Superprof */
.reviews-header {
    display: flex;
    align-items: end;
    justify-content: space-between;
    gap: 30px;
    margin-bottom: 28px;
}

.reviews-header h2 {
    margin-bottom: 0;
}

.reviews-summary {
    display: flex;
    flex-direction: column;
    text-align: right;
}

.reviews-summary strong {
    font-family: "Playfair Display", serif;
    font-size: 34px;
    line-height: 1;
    color: var(--accent);
}

.reviews-summary span {
    color: var(--muted);
    font-size: 13px;
    margin-top: 7px;
}

.reviews-carousel {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 54px;
    gap: 16px;
    align-items: center;
}

.reviews-viewport {
    overflow: hidden;
    min-width: 0;
}

.reviews-track {
    display: flex;
    gap: 18px;
    transition: transform .45s ease;
    will-change: transform;
}

.review-card {
    flex: 0 0 calc((100% - 36px) / 3);
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 24px;
    padding: 28px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.review-card .stars {
    letter-spacing: .12em;
    font-size: 14px;
    color: var(--accent);
    margin-bottom: 24px;
}

.review-card > p {
    font-family: "Playfair Display", serif;
    font-size: 22px;
    line-height: 1.4;
    margin-bottom: 28px;
}

.review-card footer {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.review-card footer span {
    color: var(--muted);
    font-size: 12px;
}

.carousel-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid var(--line);
    background: var(--paper);
    color: var(--ink);
    font-size: 21px;
    cursor: pointer;
    transition: .2s ease;
}

.carousel-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    border-color: var(--accent);
    color: var(--accent);
}

.carousel-btn:disabled {
    opacity: .3;
    cursor: default;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
}

.carousel-dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: var(--line);
    cursor: pointer;
    transition: .2s ease;
}

.carousel-dot.active {
    width: 24px;
    background: var(--accent);
}

.reviews-link-wrap {
    text-align: center;
    margin-top: 24px;
}

.superprof-link {
    color: var(--accent);
    font-weight: 700;
}

@media (max-width: 1000px) {
    .review-card {
        flex-basis: calc((100% - 18px) / 2);
    }
}

@media (max-width: 700px) {
    .reviews-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .reviews-summary {
        text-align: left;
    }

    .reviews-carousel {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        gap: 8px;
    }

    .carousel-btn {
        width: 40px;
        height: 40px;
    }

    .review-card {
        flex-basis: 100%;
        min-height: 300px;
        padding: 24px;
    }
}


/* Hero senza headline principale */
.hero .eyebrow + .hero-copy {
    margin-top: 18px;
}

/* Recensioni in evidenza */
.featured-review {
    border: 2px solid var(--accent);
    position: relative;
}

.featured-badge {
    display: inline-flex;
    align-self: flex-start;
    padding: 6px 10px;
    border-radius: 999px;
    background: var(--accent);
    color: white;
    font-size: 10px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: .1em;
    margin-bottom: 16px;
}


/* Hero: etichetta più visibile */
.hero-eyebrow {
    font-size: 18px;
    letter-spacing: .11em;
    margin-bottom: 24px;
}

/* Instagram */
.instagram-section {
    background: var(--paper);
}

.instagram-header {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 30px;
    margin-bottom: 28px;
}

.instagram-header h2 {
    margin-bottom: 0;
}

.instagram-profile-link {
    color: var(--accent);
    font-weight: 700;
}

.instagram-carousel {
    display: grid;
    grid-template-columns: 54px minmax(0, 1fr) 54px;
    gap: 16px;
    align-items: center;
}

.instagram-viewport {
    overflow: hidden;
    min-width: 0;
}

.instagram-track {
    display: flex;
    gap: 18px;
    transition: transform .45s ease;
    will-change: transform;
}

.instagram-card {
    flex: 0 0 calc((100% - 36px) / 3);
    aspect-ratio: 4 / 5;
    border-radius: 24px;
    overflow: hidden;
    position: relative;
    background: var(--soft);
    border: 1px solid var(--line);
}

.instagram-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transition: transform .3s ease;
}

.instagram-overlay {
    position: absolute;
    inset: auto 0 0 0;
    padding: 42px 18px 16px;
    background: linear-gradient(transparent, rgba(0,0,0,.58));
    color: white;
    font-weight: 700;
    opacity: 0;
    transition: opacity .25s ease;
}

.instagram-card:hover img {
    transform: scale(1.03);
}

.instagram-card:hover .instagram-overlay {
    opacity: 1;
}

.instagram-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 22px;
}

.instagram-placeholder {
    border: 1px dashed var(--line);
    border-radius: 24px;
    padding: 34px;
    background: var(--bg);
    text-align: center;
}

.instagram-placeholder strong {
    display: block;
    font-family: "Playfair Display", serif;
    font-size: 25px;
    margin-bottom: 10px;
}

.instagram-placeholder p {
    max-width: 700px;
    margin: 0 auto 22px;
    color: var(--muted);
}

@media (max-width: 1000px) {
    .instagram-card {
        flex-basis: calc((100% - 18px) / 2);
    }
}

@media (max-width: 700px) {
    .hero-eyebrow {
        font-size: 15px;
    }

    .instagram-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .instagram-carousel {
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        gap: 8px;
    }

    .instagram-card {
        flex-basis: 100%;
    }
}


.instagram-subtitle {
    margin: 8px 0 0;
    color: var(--muted);
    font-size: 15px;
}


/* Quaderno nella hero */
.notebook-card {
    background: transparent;
    border: 0;
    box-shadow: none;
    padding: 0;
    min-height: 470px;
    align-items: center;
    justify-content: center;
}

.hero-notebook {
    width: 115%;
    max-width: 590px;
    height: auto;
    max-height: 540px;
    object-fit: contain;
    filter: drop-shadow(0 24px 35px rgba(31, 41, 51, .12));
}

/* Risultato corso concorsi */
.course-success {
    margin: 8px 0 38px;
    padding: 28px 32px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--bg);
    display: flex;
    align-items: center;
    gap: 24px;
}

.success-check {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #159447;
    color: white;
    font-size: 42px;
    font-weight: 800;
}

.success-kicker {
    display: block;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .13em;
    margin-bottom: 4px;
}

.course-success p {
    margin: 0;
    color: var(--ink);
    font-size: clamp(24px, 3vw, 36px);
    line-height: 1.15;
}

.course-success p strong {
    color: var(--accent);
    font-family: "Playfair Display", serif;
    font-size: 1.28em;
}

/* Nuovo tariffario */
.pricing-section {
    background: var(--bg);
}

.hourly-pricing {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-bottom: 74px;
}

.hourly-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 26px;
    padding: 32px;
    box-shadow: 0 18px 45px rgba(31, 41, 51, .06);
}

.hourly-card .price {
    color: var(--accent);
    font-size: 54px;
}

.hourly-card p {
    color: var(--muted);
    margin-bottom: 0;
}

.math-gym-heading {
    text-align: center;
    max-width: 760px;
    margin: 0 auto 34px;
}

.math-gym-heading h3 {
    font-family: "Playfair Display", serif;
    font-size: clamp(32px, 4vw, 48px);
    margin-bottom: 10px;
}

.math-gym-heading p {
    color: var(--muted);
}

.math-gym-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    align-items: stretch;
}

.gym-card {
    position: relative;
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 28px;
    padding: 34px 28px 28px;
    display: flex;
    flex-direction: column;
    min-height: 590px;
    box-shadow: 0 18px 45px rgba(31, 41, 51, .07);
}

.featured-gym {
    border: 2px solid var(--accent);
    transform: translateY(-10px);
}

.gym-name {
    align-self: center;
    margin-top: -52px;
    margin-bottom: 24px;
    padding: 10px 24px;
    border-radius: 999px;
    background: #FFE071;
    color: var(--accent);
    font-weight: 800;
    letter-spacing: .04em;
}

.gym-price {
    text-align: center;
    color: var(--accent);
    font-size: 48px;
    line-height: 1;
    margin-bottom: 28px;
}

.gym-price small {
    font-size: 16px;
}

.gym-card ul {
    padding-left: 21px;
    margin: 0 0 24px;
    color: var(--muted);
}

.gym-card li + li {
    margin-top: 10px;
}

.gym-plus {
    margin-top: auto;
    padding: 16px;
    border-radius: 18px;
    background: var(--soft);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.gym-plus strong {
    color: var(--accent);
}

.gym-plus span {
    color: var(--muted);
    font-size: 13px;
}

.gym-ideal {
    text-align: center;
    text-transform: uppercase;
    letter-spacing: .04em;
    font-size: 13px;
    margin: 22px 0 0;
    color: var(--muted);
}

.how-it-works {
    margin: 52px auto 0;
    max-width: 920px;
    padding: 26px 30px;
    border-radius: 26px;
    border: 1px solid var(--line);
    background: var(--paper);
    text-align: center;
}

.how-it-works > strong {
    display: inline-block;
    color: var(--accent);
    font-size: 22px;
    margin-bottom: 18px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.how-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
}

.how-grid span {
    color: var(--muted);
    font-size: 13px;
}

.pricing-cta {
    text-align: center;
    margin-top: 24px;
}

@media (max-width: 950px) {
    .math-gym-grid {
        grid-template-columns: 1fr;
        gap: 42px;
    }

    .featured-gym {
        transform: none;
    }

    .gym-card {
        min-height: 0;
    }

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

    .hero-notebook {
        width: 100%;
        max-width: 480px;
    }
}

@media (max-width: 700px) {
    .hourly-pricing {
        grid-template-columns: 1fr;
    }

    .course-success {
        align-items: flex-start;
        padding: 24px;
    }

    .success-check {
        width: 56px;
        height: 56px;
        flex-basis: 56px;
        font-size: 32px;
    }

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

    .notebook-card {
        min-height: 360px;
    }
}


/* Abbonamenti: stesso bordo blu per tutte le formule */
.math-gym-grid .gym-card {
    border: 2px solid var(--accent);
}

.featured-gym {
    border: 2px solid var(--accent);
    transform: none;
}


/* Allinea le frasi finali degli abbonamenti sulla stessa linea */
.math-gym-grid .gym-card {
    display: flex;
    flex-direction: column;
}

.math-gym-grid .gym-ideal {
    margin-top: auto;
    min-height: 42px;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding-top: 22px;
}
