/* ==========================================================================
   Home — struttura rivista (mobile prima, poi desktop).
   Caricato dopo style.css e mobile.css: sovrascrive le vecchie regole della
   home (hero con velo, timeline a icone, card servizio) senza toccare le
   altre pagine. Il verde del brand (--primary) e il logo restano invariati.
   ========================================================================== */

:root {
    --stone: #f3f4f1;
    --gutter: 1rem;
    --section-y: 3.5rem;
}

@media (min-width: 769px) {
    :root {
        --gutter: 2rem;
        --section-y: 5.5rem;
    }
}

/* --- Ritmo comune ------------------------------------------------------- */
.why-choose-us,
.about-intro,
.services,
.founder-section,
.location-section {
    padding-block: var(--section-y);
}

.section-header,
.section-header.text-center {
    text-align: left;
    margin-bottom: 2rem;
}

.section-subtitle {
    margin-inline: 0;
}

/* Testo sempre allineato a sinistra, anche su mobile (le vecchie regole lo centravano). */
.about-intro-content,
.about-intro-text,
.about-intro-title,
.about-intro-description,
.founder-content,
.founder-text,
.founder-info,
.why-grid,
.why-list,
.service-rows {
    text-align: left;
}

.why-choose-us .section-title,
.about-intro-title,
.services .section-title,
.founder-text .section-title,
.location-section .section-title {
    font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.75rem);
    line-height: 1.08;
    letter-spacing: -0.01em;
    font-weight: 700;
    color: var(--primary);
    margin: 0 0 1.5rem;
}

/* Collegamento testuale: sostituisce i bottoni "Scopri di più" */
.text-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    font-weight: 600;
    color: var(--primary-dark);
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 0.3em;
    text-decoration-color: var(--primary);
}

a:hover > .text-link,
a.text-link:hover {
    text-decoration-color: currentColor;
}

/* --- Hero --------------------------------------------------------------- */
/* Mobile: video pulito sopra, pannello verde sotto. */
section.hero {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    height: auto;
    overflow: visible;
    background: var(--primary);
}

.hero-video {
    position: relative;
    inset: auto;
    height: clamp(15rem, 42svh, 24rem);
    overflow: hidden;
}

.hero-panel {
    position: relative;
    z-index: 3;
    background: var(--primary);
    color: var(--white);
    padding: 1.75rem var(--gutter) 2rem;
}

.hero-title {
    font-size: clamp(1.9rem, 1.2rem + 3.2vw, 3rem);
    line-height: 1.06;
    letter-spacing: -0.015em;
    font-weight: 700;
    text-shadow: none;
    margin: 0 0 1rem;
    max-width: 18ch;
}

.hero-subtitle {
    font-size: 1.0625rem;
    line-height: 1.5;
    color: var(--white);
    margin: 0 0 1.5rem;
    max-width: 34ch;
}

.hero-cta {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.hero-cta .btn {
    width: 100%;
    min-height: 52px;
    padding: 0.9rem 1.5rem;
    font-size: 1.0625rem;
}

section.hero .btn-primary {
    background: var(--white);
    color: var(--primary-dark);
    box-shadow: none;
}

section.hero .btn-primary:hover {
    background: var(--stone);
    transform: none;
    box-shadow: none;
}

.btn-ghost {
    background: transparent;
    color: var(--white);
    border: 2px solid rgba(255, 255, 255, 0.85);
}

.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.12);
}

@media (min-width: 769px) {
    /* Desktop: il video riempie l'hero, il pannello è ancorato in basso a sinistra. */
    section.hero {
        display: block;
        position: relative;
        height: clamp(34rem, 84vh, 50rem);
        overflow: hidden;
        background: #1e3d1c;
    }

    .hero-video {
        position: absolute;
        inset: 0;
        height: 100%;
    }

    .hero-panel {
        position: absolute;
        bottom: 0;
        left: max(var(--gutter), calc((100vw - 1400px) / 2 + var(--gutter)));
        width: min(35rem, calc(100% - 2 * var(--gutter)));
        padding: 2.5rem 2.75rem 2.75rem;
    }

    .hero-cta {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .hero-cta .btn {
        width: auto;
        flex: 1 1 auto;
    }
}

/* --- Perché scegliere noi ---------------------------------------------- */
.why-grid {
    display: grid;
    gap: 2rem;
}

.why-photo,
.about-intro-image,
.service-row-media {
    margin: 0;
    overflow: hidden;
}

.why-photo img,
.about-intro-image img,
.service-row-media img {
    display: block;
    width: 100%;
    object-fit: cover;
}

.why-photo img {
    aspect-ratio: 4 / 3;
    height: auto;
}

.why-list {
    list-style: none;
}

.why-list li {
    padding: 1.5rem 0;
    border-top: 1px solid var(--border-light);
}

.why-list li:last-child {
    border-bottom: 1px solid var(--border-light);
}

.why-list h3 {
    font-size: 1.375rem;
    line-height: 1.2;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.5rem;
}

.why-list p {
    max-width: 44ch;
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--text-secondary);
}

@media (min-width: 769px) {
    .why-grid {
        grid-template-columns: 5fr 6fr;
        gap: clamp(3rem, 7vw, 7rem);
        align-items: start;
    }

    .why-photo img {
        aspect-ratio: 1 / 1;
    }

    .why-list li:first-child {
        padding-top: 0;
        border-top: 0;
    }

    .why-list li {
        padding-block: 2rem;
    }

    .why-list h3 {
        font-size: 1.625rem;
    }
}

/* --- Presentazione ------------------------------------------------------ */
.about-intro {
    background: var(--stone);
}

.about-intro-content {
    display: grid;
    gap: 2rem;
    align-items: start;
}

.about-intro-text {
    padding: 0;
}

.about-intro-description {
    max-width: 52ch;
    font-size: 1.0625rem;
    line-height: 1.65;
    color: var(--text-secondary);
    margin: 0 0 1.25rem;
}

.about-intro-description:last-of-type {
    margin-bottom: 0.75rem;
}

.about-intro-image {
    border-radius: 0;
    box-shadow: none;
}

.about-intro-image img {
    height: auto;
    aspect-ratio: 4 / 3;
    object-position: center 60%;
}

@media (min-width: 769px) {
    .about-intro-content {
        grid-template-columns: 6fr 5fr;
        gap: clamp(3rem, 7vw, 7rem);
        align-items: center;
    }

    .about-intro-image img {
        aspect-ratio: 4 / 5;
        object-position: center;
    }
}

/* --- Servizi: righe editoriali, una in evidenza ------------------------- */
.service-rows {
    list-style: none;
    display: grid;
    gap: 2.5rem;
    margin-top: 0.5rem;
}

.service-row a {
    display: grid;
    gap: 1rem;
    color: inherit;
    text-decoration: none;
}

.service-row-media img {
    aspect-ratio: 3 / 2;
    height: auto;
    transition: transform 0.5s ease;
}

.service-row--lead .service-row-media img {
    aspect-ratio: 4 / 3;
}

.service-row a:hover .service-row-media img {
    transform: scale(1.03);
}

.service-row-text h3 {
    font-size: 1.5rem;
    line-height: 1.15;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 0.5rem;
}

.service-row-text p {
    max-width: 46ch;
    font-size: 1.0625rem;
    line-height: 1.55;
    color: var(--text-secondary);
    margin: 0 0 0.25rem;
}

@media (min-width: 769px) {
    .service-rows {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 3.5rem clamp(2rem, 4vw, 4rem);
        margin-top: 1rem;
    }

    .service-row--lead {
        grid-column: 1 / -1;
    }

    .service-row--lead a {
        grid-template-columns: 7fr 5fr;
        gap: clamp(2rem, 5vw, 5rem);
        align-items: center;
    }

    .service-row--lead .service-row-media img {
        aspect-ratio: 3 / 2;
    }

    .service-row--lead .service-row-text h3 {
        font-size: clamp(2rem, 1.2rem + 1.6vw, 2.5rem);
        margin-bottom: 0.75rem;
    }

    .service-row a {
        gap: 1.25rem;
    }
}

/* --- Fondatore ---------------------------------------------------------- */
.founder-section {
    background: var(--white);
}

/* Stessa colonna delle altre sezioni (prima era 1200px centrata, 40px fuori asse). */
.founder-content {
    max-width: none;
    margin: 0;
}

.founder-title {
    text-transform: none;
    letter-spacing: 0;
    font-size: 1.125rem;
}

.founder-name {
    font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.25rem);
}

.founder-description {
    max-width: 52ch;
    font-size: 1.0625rem;
    line-height: 1.65;
}

.founder-photo-container {
    border-radius: 0;
    box-shadow: none;
}

.founder-photo-container img {
    height: auto;
    aspect-ratio: 4 / 5;
    object-position: center top;
}

/* Cifre affiancate su una riga anche su mobile: sono brevi e non servono tre riquadri impilati. */
.founder-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1rem;
    padding: 1.5rem 0 0;
}

.stat-item {
    text-align: left;
    background: none;
    border-radius: 0;
    padding: 0;
}

.stat-number {
    font-size: clamp(2rem, 1.4rem + 2vw, 2.75rem);
    line-height: 1;
    margin-bottom: 0.4rem;
}

.stat-label {
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.9375rem;
    line-height: 1.3;
    display: block;
}

@media (max-width: 768px) {
    .founder-content {
        gap: 2rem;
    }

    /* La foto viene prima del testo: si vede subito chi è il titolare. */
    .founder-image {
        order: -1;
    }

    .founder-photo-container img {
        aspect-ratio: 1 / 1;
    }
}

/* --- Dove trovarci ------------------------------------------------------ */
.location-section {
    background: var(--stone);
}

@media (prefers-reduced-motion: reduce) {
    .service-row-media img {
        transition: none;
    }

    .service-row a:hover .service-row-media img {
        transform: none;
    }
}
