/*
 * File: styles.css
 * Contiene gli stili di base e personalizzati del sito.
 */

/* ===== Base body layout ===== */
html,
body {
    height: 100%;
}

body {
    font-family: 'Inter', sans-serif;
    font-size: 17px;
    min-height: 100vh;
    background: #ffffff;
    /* occupa almeno tutta la finestra */
    display: flex;
    /* layout verticale */
    flex-direction: column;
    /* header, main, footer in colonna */
}

body[data-page-name]:not(.lesson-template-page):not([data-page-name="home"]):not([data-page-name="about"]):not([data-page-name="terms"]):not([data-page-name="policy"]):not([data-page-name="404"]):not([data-page-name="lesson-plans"]):not([data-page-name="homework"]):not([data-page-name^="book-"]):not([data-page-name*="dashboard-games"]) {
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
}

/* ===== Struttura del contenuto ===== */
main {
    flex: 1 0 auto;
    /* si espande per riempire lo spazio */
}

/* ===== Footer ===== */
footer {
    margin-top: auto;
    /* spinge il footer in basso */
    width: 100%;
    background: #fff;
    border-top: 1px solid #e5e7eb;
}

.site-footer-shell {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(4px);
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.08);
    padding: 4px 0;
}

.site-footer-inner {
    width: min(92%, 46rem);
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    color: #4b5563;
    font-size: 0.97rem;
    font-weight: 600;
}

.site-footer-inner-en {
    width: min(96%, 56rem);
}

.site-footer-links {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.4rem;
    text-align: center;
}

.site-footer-links a {
    color: #4b5563;
    text-decoration: none;
    transition: color 0.2s ease;
}

.site-footer-links a:hover {
    color: #2563eb;
}

.site-footer-meta {
    color: #6b7280;
    font-weight: 400;
    text-align: center;
    line-height: 1.15;
}

.site-footer-meta p {
    margin: 0;
}

.site-footer-vat {
    font-size: 0.82rem;
    margin-top: 2px;
}

@media (min-width: 640px) {
    .site-footer-inner {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 12px;
    }

    .site-footer-meta {
        text-align: right;
    }
}

/* ===== Font specifici ===== */
.font-montserrat {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

.font-dosis {
    font-family: 'Plus Jakarta Sans', sans-serif;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: 'Plus Jakarta Sans', sans-serif;
    letter-spacing: -0.03em;
}

/* ===== Link di navigazione ===== */
.nav-link {
    transition: color 0.3s;
    font-weight: 600;
    color: #0f172a;
}

.nav-link:hover {
    color: #ff5b3d;
}

.site-nav-active {
    color: #ff5b3d !important;
}

.site-header {
    overflow: visible;
}

.site-nav {
    --smartalk-header-inner-min-h: 64px;
    --smartalk-header-logo-h: 48px;
    --smartalk-header-logo-h-mobile: 40px;
    position: relative;
    gap: 1rem;
    width: 100%;
    max-width: none;
    min-height: var(--smartalk-header-inner-min-h);
    align-items: center;
}

/* Match website header horizontal geometry to dashboard header desktop */
@media (min-width: 981px) {
    .site-header .site-nav.container {
        width: 100% !important;
        max-width: 1536px !important;
        margin-left: auto !important;
        margin-right: auto !important;
        padding-left: 24px !important;
        padding-right: 24px !important;
        box-sizing: border-box;
    }
}

.site-nav-logo-link {
    flex: 0 0 auto;
}

.site-nav-logo {
    display: block;
    height: var(--smartalk-header-logo-h);
    width: auto;
}

.site-nav-actions {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-left: auto;
}

.site-lang-switcher {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.2rem;
    height: 2.2rem;
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-lang-switcher:hover {
    transform: translateY(-1px);
}

.site-nav-toggle {
    display: none;
    width: 2.85rem;
    height: 2.85rem;
    padding: 0;
    border: 1px solid #e2e8f0;
    border-radius: 999px;
    background: #ffffff;
    box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 0.26rem;
}

.site-nav-toggle span {
    display: block;
    width: 1rem;
    height: 2px;
    background: #0f172a;
    border-radius: 999px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav-menu {
    margin-left: 0;
}

.site-nav.site-nav-open .site-nav-toggle span:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
}

.site-nav.site-nav-open .site-nav-toggle span:nth-child(2) {
    opacity: 0;
}

.site-nav.site-nav-open .site-nav-toggle span:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
}

/* ===== Home layout ===== */
.home-page {
    background: #ffffff;
}

.home-main {
    max-width: 1280px;
    margin: 0 auto;
    padding: 2.75rem 1rem 4rem;
}

.home-hero {
    padding: 1.5rem 0 4rem;
}

.home-hero-grid {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

.home-hero-copy {
    text-align: center;
    max-width: 27.75rem;
    margin: 0 auto;
}

.home-hero-copy h1 {
    font-size: clamp(3.2rem, 8vw, 6rem);
    line-height: 0.95;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.06em;
}

.home-gradient-text {
    background: linear-gradient(135deg, #ff5b3d 0%, #ea2f1c 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
}

.home-hero-copy p {
    max-width: 25.75rem;
    margin: 1.8rem auto 0;
    font-size: 1.35rem;
    line-height: 1.8;
    color: #475569;
    text-align: justify;
}

.home-button-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.9rem;
    margin-top: 2rem;
    justify-content: center;
}

.home-hero-copy .home-button-row,
.home-about-points .home-button-row {
    justify-content: center;
}

.home-button-primary,
.home-button-secondary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 0.95rem 1.7rem;
    border-radius: 999px;
    font-weight: 800;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease, color 0.2s ease;
    text-decoration: none;
}

.home-button-primary {
    color: #fff;
    background: linear-gradient(135deg, #ff5b3d 0%, #ea2f1c 100%);
    box-shadow: 0 18px 35px rgba(234, 47, 28, 0.28);
}

.home-button-primary:hover {
    transform: translateY(-1px) scale(1.01);
}

.home-button-secondary {
    color: #0f172a;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
}

.home-button-secondary:hover {
    background: #f8fafc;
}

.home-hero-media {
    position: relative;
    width: 100%;
}

.home-hero-media-frame {
    overflow: hidden;
    border-radius: 2rem;
    border: 1px solid #f1f5f9;
    box-shadow: 0 24px 55px rgba(15, 23, 42, 0.14);
    position: relative;
}

.home-hero-media-frame img {
    width: 100%;
    height: auto;
    transition: transform 12s ease-out;
    filter: brightness(1.04) saturate(0.96);
}

.home-hero-media-frame::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.08));
    pointer-events: none;
}

.home-hero-media-frame:hover img {
    transform: scale(1.05);
}

.home-dark-band {
    background: #0f172a;
    color: #ffffff;
    padding: 5.5rem 0;
}

.home-full-bleed {
    width: 100vw;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
}

.home-dark-band h2 {
    font-size: clamp(2.2rem, 5vw, 3.6rem);
    line-height: 1.05;
    font-weight: 800;
    color: #ffffff;
}

.home-dark-band p {
    color: #e2e8f0;
    font-size: 1.2rem;
    line-height: 1.7;
}

.home-dark-band .home-method-intro h2 {
    color: #ffffff;
}

.home-dark-band .home-method-intro p {
    color: #e2e8f0;
}

.home-dark-band .highlight {
    color: #ff5b3d;
}

.home-pain-grid {
    display: grid;
    gap: 1.5rem;
    margin-top: 3rem;
    max-width: 72rem;
    margin-left: auto;
    margin-right: auto;
}

.home-pain-card {
    background: rgba(30, 41, 59, 0.65);
    border: 1px solid rgba(71, 85, 105, 0.8);
    border-radius: 2rem;
    padding: 2rem;
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background-color 0.2s ease;
}

.home-pain-card-icon {
    width: 3rem;
    height: 3rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 0;
    color: #ff5b3d;
    margin: 0 auto 1.65rem;
}

.home-pain-card-icon svg {
    width: 2.35rem;
    height: 2.35rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-pain-card p {
    color: #e2e8f0;
    font-size: 1.08rem;
    line-height: 1.6;
    text-align: center;
}

.home-pain-card:hover {
    transform: translateY(-4px);
    background: rgba(30, 41, 59, 0.82);
    border-color: rgba(148, 163, 184, 0.55);
    box-shadow: 0 18px 36px rgba(2, 6, 23, 0.22);
}

.home-pain-card:hover .home-pain-card-icon {
    color: #ffffff;
    transform: scale(1.03);
}

.home-section {
    padding: 5.5rem 0;
}

.home-section-muted {
    background: #eef2f6;
}

.home-section-grid {
    display: grid;
    gap: 2.5rem;
    align-items: center;
}

.home-copy h2 {
    font-size: clamp(2.1rem, 5vw, 3.3rem);
    line-height: 1.05;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 1.2rem;
}

.home-copy p {
    color: #475569;
    font-size: 1.12rem;
    line-height: 1.8;
    text-align: justify;
}

.home-check-list {
    display: grid;
    gap: 1rem;
    margin-top: 1.6rem;
}

.home-check-list li {
    display: grid;
    grid-template-columns: 1.6rem minmax(0, 1fr);
    gap: 0.8rem;
    align-items: start;
    color: #334155;
    line-height: 1.7;
}

.home-check-list li span {
    width: 1.6rem;
    height: 1.6rem;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 91, 61, 0.12);
    color: #ea2f1c;
    font-weight: 800;
    line-height: 1;
}

.home-about-shell {
    max-width: 68rem;
    margin: 0 auto;
}

.home-about-title {
    text-align: center;
    margin-bottom: 2rem;
}

.home-about-title h2 {
    font-size: clamp(2.4rem, 5vw, 3.7rem);
    line-height: 1.02;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.05em;
}

.home-about-grid {
    display: grid;
    gap: 3.75rem;
    align-items: start;
}

.home-about-copy {
    text-align: left;
}

.home-about-points {
    display: grid;
    gap: 1rem;
}

.home-about-points .home-check-list {
    margin-top: 0;
}

.home-button-dark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 58px;
    padding: 0.95rem 1.7rem;
    border-radius: 999px;
    font-weight: 800;
    text-decoration: none;
    color: #ffffff;
    background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
    box-shadow: 0 18px 35px rgba(15, 23, 42, 0.22);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.home-button-dark:hover {
    transform: translateY(-1px) scale(1.01);
}

.home-method-intro {
    max-width: 48rem;
    margin: 0 auto 4rem;
    text-align: center;
}

.home-method-intro h2 {
    font-size: clamp(2.2rem, 5vw, 3.3rem);
    line-height: 1.05;
    font-weight: 800;
    color: #0f172a;
}

.home-method-intro p {
    margin-top: 1rem;
    color: #475569;
    font-size: 1.2rem;
    line-height: 1.8;
}

.home-method-grid {
    display: grid;
    gap: 1.75rem;
    max-width: 72rem;
    margin: 0 auto;
}

.home-method-card {
    background: #ffffff;
    border: 1px solid #f1f5f9;
    border-radius: 2.25rem;
    padding: 2rem;
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.05);
    text-align: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.home-method-icon {
    width: 4rem;
    height: 4rem;
    border-radius: 1.25rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #fff1f0;
    color: #ea2f1c;
    font-size: 1.6rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    margin-left: auto;
    margin-right: auto;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.home-method-icon svg {
    width: 2.4rem;
    height: 2.4rem;
    stroke: currentColor;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.home-method-card h3 {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 0.8rem;
}

.home-method-card p {
    color: #475569;
    line-height: 1.75;
}

.home-method-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
    border-color: #e2e8f0;
}

.home-method-card:hover .home-method-icon {
    background: #ff5b3d;
    color: #ffffff;
    transform: scale(1.03);
}

.home-contact-wrap {
    max-width: 42rem;
    margin: 0 auto;
}

.home-contact-shell {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 2.5rem;
    padding: 2.25rem 1.5rem;
}

.home-submit-button {
    appearance: none;
    -webkit-appearance: none;
    display: flex;
    width: fit-content;
    min-width: 235px;
    margin: 0 auto;
    justify-content: center;
    align-items: center;
    padding: 0.95rem 1.7rem;
    border-radius: 999px;
    border: 1px solid #2245b7;
    background: linear-gradient(135deg, #345fd7 0%, #2245b7 100%) !important;
    color: #ffffff !important;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1;
    opacity: 1 !important;
    box-shadow: 0 14px 28px rgba(34, 69, 183, 0.18);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
    cursor: pointer;
}

.home-submit-button:hover {
    transform: translateY(-1px) scale(1.01);
    background: linear-gradient(135deg, #456ee0 0%, #2a51c2 100%) !important;
}

.home-submit-button:visited,
.home-submit-button:focus,
.home-submit-button:active {
    color: #ffffff !important;
}

.home-contact-intro {
    text-align: center;
    margin-bottom: 3rem;
}

.home-contact-intro h2 {
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    line-height: 1.05;
    font-weight: 800;
    color: #0f172a;
}

.home-contact-intro p {
    margin-top: 0.8rem;
    color: #64748b;
    font-size: 1.15rem;
}

.home-affiliates {
    padding: 4rem 0 3rem;
}

.home-affiliates-label {
    text-align: center;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.72rem;
    font-weight: 800;
    margin-bottom: 2rem;
}

.home-affiliates-inner {
    max-width: 100%;
    margin: 0 auto;
}

.home-affiliates-note {
    text-align: right;
    color: #94a3b8;
    font-size: 10px;
    font-style: italic;
    margin-top: 1rem;
}

.about-page {
    background: #ffffff;
}

.about-shell {
    max-width: 86rem;
    margin: 0 auto 5.5rem;
    padding: 0 1.1rem;
    background: #ffffff;
}

.about-list {
    background: #ffffff;
}

.about-card {
    display: grid;
    gap: 2rem;
    align-items: center;
    padding: 2.4rem 0;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.about-media {
    position: relative;
    width: min(100%, 21rem);
    margin: 0 auto;
}

.about-media::after {
    content: "";
    position: absolute;
    left: 1.15rem;
    right: 1.15rem;
    bottom: -0.8rem;
    height: 1.4rem;
    border-radius: 0 0 1.9rem 1.9rem;
    filter: blur(14px);
    opacity: 0.4;
    z-index: 0;
}

.about-media-blue::after {
    background: #1d4ed8;
}

.about-media-orange::after {
    background: #ea580c;
}

.about-media-emerald::after {
    background: #059669;
}

.about-media-red::after {
    background: #dc2626;
}

.about-image {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    object-position: center top;
    display: block;
    border-radius: 1.75rem;
    box-shadow: 0 18px 36px rgba(15, 23, 42, 0.1);
    background: #f8fafc;
    position: relative;
    z-index: 1;
}

.about-copy {
    text-align: center;
}

.about-copy h2 {
    font-size: clamp(2rem, 4vw, 2.7rem);
    line-height: 1;
    font-weight: 800;
    color: #0f172a;
    letter-spacing: -0.04em;
}

.about-role {
    margin-top: 0.6rem;
    font-size: 0.95rem;
    line-height: 1.4;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

.about-role-blue {
    color: #1d4ed8;
}

.about-role-orange {
    color: #ea580c;
}

.about-role-emerald {
    color: #059669;
}

.about-role-red {
    color: #dc2626;
}

.about-bio {
    margin-top: 1.1rem;
    color: #475569;
    font-size: 1.08rem;
    line-height: 1.85;
    text-align: justify;
}

@media (min-width: 768px) {
    .home-main {
        padding: 3.5rem 1.5rem 4.5rem;
    }

    .home-section-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-about-grid {
        grid-template-columns: minmax(0, 0.92fr) minmax(0, 0.78fr);
    }

    .home-hero-copy {
        text-align: left;
        grid-column: 1;
        max-width: 25rem;
        margin: 0 auto;
    }

    .home-hero-copy p {
        margin-left: 0;
        margin-right: 0;
    }

    .home-hero-grid {
        grid-template-columns: minmax(0, 0.86fr) minmax(0, 0.57fr) minmax(0, 0.57fr);
        align-items: center;
    }

    .home-hero-media {
        grid-column: 2 / span 2;
    }

    .home-hero-copy .home-button-row,
    .home-about-points .home-button-row {
        justify-content: center;
    }

    .home-pain-grid,
    .home-method-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .home-contact-shell {
        padding: 3rem 4rem;
    }

    .about-card {
        grid-template-columns: minmax(18rem, 22rem) minmax(0, 1fr);
        gap: 4rem;
        padding: 2.8rem 0;
    }

    .about-card-reverse {
        grid-template-columns: minmax(0, 1fr) minmax(18rem, 22rem);
    }

    .about-card-reverse .about-media {
        order: 2;
    }

    .about-card-reverse .about-copy {
        order: 1;
    }

    .about-copy {
        text-align: left;
    }

    .site-nav-menu {
        display: flex;
        align-items: center;
        order: 2;
        margin-left: auto;
    }

    .site-nav-actions {
        order: 3;
        margin-left: 1rem;
    }
}

@media (max-width: 767px) {
    .site-nav {
        padding-top: 8px;
        padding-bottom: 8px;
    }

    .site-nav-logo {
        height: var(--smartalk-header-logo-h-mobile);
        width: auto;
    }

    .site-nav-toggle {
        display: inline-flex;
    }

    .site-nav-menu {
        position: absolute;
        top: calc(100% + 0.55rem);
        right: 1rem;
        left: 1rem;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        margin: 0;
        padding: 0.75rem;
        background: rgba(255, 255, 255, 0.98);
        border: 1px solid #e2e8f0;
        border-radius: 1.25rem;
        box-shadow: 0 18px 36px rgba(15, 23, 42, 0.14);
        z-index: 60;
    }

    .site-nav.site-nav-open .site-nav-menu {
        display: flex;
    }

    .site-nav-menu li {
        width: 100%;
        margin-left: 0 !important;
    }

    .site-nav-menu a {
        display: block;
        width: 100%;
        padding: 0.8rem 0.95rem;
        border-radius: 0.9rem;
        text-align: left;
    }

    .site-nav-menu a:hover {
        background: #f8fafc;
    }

    .home-main {
        padding-left: 1.1rem;
        padding-right: 1.1rem;
    }

    .home-hero-copy {
        max-width: 100%;
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }

    .home-hero-copy p {
        max-width: 19rem;
        margin-left: auto;
        margin-right: auto;
        text-align: center;
        line-height: 1.65;
    }

    .home-pain-card,
    .home-method-card {
        max-width: 20.5rem;
        margin-left: auto;
        margin-right: auto;
        min-height: 12.75rem;
        display: flex;
        flex-direction: column;
        justify-content: center;
        padding: 1.5rem 1.35rem;
        border-radius: 1.8rem;
    }

    .home-pain-grid,
    .home-method-grid {
        gap: 1rem;
    }

    .home-pain-card p,
    .home-method-card p {
        text-wrap: balance;
    }

    .home-pain-card-icon {
        margin-bottom: 1rem;
    }

    .home-pain-card p {
        font-size: 1rem;
        line-height: 1.5;
    }

    .home-method-card h3 {
        font-size: 1.22rem;
        margin-bottom: 0.6rem;
    }

    .home-method-card p {
        font-size: 1rem;
        line-height: 1.6;
    }

    .home-method-intro p,
    .home-contact-intro p,
    .home-affiliates-note {
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }

    .home-dark-band .home-method-intro h2 {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .home-section-muted .home-method-intro h2,
    .home-section-muted .home-method-intro p {
        padding-left: 0.85rem;
        padding-right: 0.85rem;
    }

    .home-affiliates-note {
        font-size: 0.62rem;
        line-height: 1.45;
        text-align: center;
    }

    .about-card {
        padding: 1.8rem 0;
    }

    .about-copy {
        padding-left: 0.35rem;
        padding-right: 0.35rem;
    }

    .about-bio {
        font-size: 1rem;
        line-height: 1.72;
    }
}
