/* ── Reset ── */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Montserrat', sans-serif;
    background-color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 0 60px;
    min-height: 100vh;
    gap: 3rem;
}

/* ── Header / Nav ── */
.site-header {
    width: 100%;
    box-sizing: border-box;
    background-color: #9c2c2c;
    padding: 8px 20px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.main-nav {
    display: grid;
    grid-template-columns: 250px 1fr;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
}

.nav-logo {
    display: block;
    width: 250px;
    box-sizing: border-box;
    background-color: white;
    padding: 6px 10px;
    border-radius: 4px;
}

.nav-logo img {
    display: block;
    width: 100%;
    height: auto;
}

.main-nav ul {
    list-style: none;
    display: flex;
    justify-content: center;
    gap: 10px;
}

.main-nav ul a {
    display: block;
    padding: 15px 12px;
    text-decoration: none;
    color: white;
    font-weight: bold;
    text-transform: uppercase;
    font-size: 13px;
    white-space: nowrap;
    border-radius: 5px;
    transition: background-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

.main-nav ul a:hover {
    background-color: #872424;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
    transform: translateY(-2px);
}

/* ── Chi siamo ── */
.about-wrapper {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 3rem 3.5rem;
    position: relative;
}

.about-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 90px;
    font-weight: 900;
    color: #9c2c2c;
    line-height: 1;
    margin-bottom: 1.8rem;
    letter-spacing: -2px;
}

.about-grid {
    display: block;
}

.about-image-col {
    float: left;
    width: 42%;
    margin-right: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
}

.about-image-col img {
    width: 100%;
    display: block;
    object-fit: cover;
    aspect-ratio: 4 / 3.2;
}

.about-wrapper::after {
    content: "";
    display: table;
    clear: both;
}

.about-text-col {
    display: block;
    padding-top: 0.2rem;
}

.about-body {
    font-size: 13px;
    line-height: 1.75;
    color: #555;
}

.about-tagline {
    font-size: 15px;
    line-height: 1.6;
    color: #9c2c2c;
    text-align: right;
    margin-top: auto;
}

/* ── Obiettivi (titolo sopra, contenuto sotto) ── */
#obiettivi,
.obiettivi-section {
    width: 100%;
}

.obiettivi-wrapper {
    max-width: 960px;
    width: 100%;
    margin: 0 auto;
    padding: 2rem 3.5rem 3rem;
    display: block;
}

.obiettivi-title {
    font-size: 42px;
    font-weight: 900;
    color: #9c2c2c;
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.obiettivi-content {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
}

.obiettivi-intro,
.obiettivi-body {
    font-size: 13px;
    line-height: 1.75;
    color: #555;
}

.obiettivi-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.obiettivi-list li {
    font-size: 13px;
    line-height: 1.75;
    color: #555;
    padding-left: 1.4rem;
    position: relative;
}

.obiettivi-list li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 9px;
    width: 7px;
    height: 7px;
    background: #9c2c2c;
    transform: rotate(45deg);
}

/* ── Servizi card ── */
.class-card {
    display: flex;
    max-width: 900px;
    width: 100%;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    background-color: #9c2c2c;
    overflow: hidden;
}

.card-image {
    flex: 0 0 40%;
}

.card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-content {
    flex: 1;
    padding: 40px;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.card-content .subtitle {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0 0 5px 0;
    letter-spacing: 1px;
}

.card-content h2 {
    font-size: 36px;
    font-weight: 800;
    margin: 0 0 20px 0;
    line-height: 1.2;
}

.card-content p {
    font-size: 13px;
    line-height: 1.6;
    margin: 0 0 20px 0;
}

.card-content .perfect-for {
    font-weight: 700;
    margin-bottom: 5px;
}

/* Pulsante dentro le card */
.card-btn {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 28px;
    background-color: white;
    color: #9c2c2c;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 50px;
    border: 2px solid white;
    transition: all 0.3s ease;
    align-self: flex-start;
}

.card-btn:hover {
    background-color: transparent;
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

/* ── Moduli PDF ── */
.section-title {
    font-size: 43px;
    font-weight: 900;
    color: #9c2c2c;
    letter-spacing: -1px;
    text-align: center;
}

.buttons-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(280px, 360px));
    gap: 3rem;
    justify-content: center;
    width: 100%;
    max-width: 900px;
}

.fancy-btn {
    position: relative;
    display: block;
    cursor: pointer;
    text-decoration: none;
}

.fancy-btn::before {
    content: '';
    position: absolute;
    top: -8px;
    left: -8px;
    width: 100%;
    height: 100%;
    border: 1.5px solid #9c2c2c;
    transition: top 0.3s ease, left 0.3s ease;
}

.fancy-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    min-height: 72px;
    padding: 18px 48px;
    border: 1.5px solid #9c2c2c;
    font-size: 13px;
    letter-spacing: 3px;
    text-transform: uppercase;
    color: #9c2c2c;
    background: white;
    transition: top 0.3s ease, left 0.3s ease;
    text-align: center;
}

.fancy-btn:hover::before { top: 0; left: 0; }

/* ── Contatti ── */
.header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 56px;
}

.header-left h1 {
    font-size: clamp(52px, 7vw, 88px);
    font-weight: 800;
    letter-spacing: -2px;
    line-height: 1;
    color: #9c2c2c;
}

.header-sub {
    font-size: 15px;
    color: black;
    line-height: 1.65;
    text-align: right;
    max-width: 280px;
    padding-top: 6px;
}

.header-sub a {
    color: #9c2c2c;
    text-decoration: none;
    font-weight: 500;
}

.header-sub a:hover { text-decoration: underline; }

.layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 32px;
    align-items: start;
}

.form-card {
    background: #f5f5f5;
    border-radius: 20px;
    padding: 40px 40px 44px;
}

.form-intro {
    font-size: 15px;
    color: #555;
    margin-bottom: 32px;
    line-height: 1.6;
}

.form-intro a {
    color: #9c2c2c;
    text-decoration: none;
    font-weight: 500;
}

.form-intro a:hover { text-decoration: underline; }

.fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px 28px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.field-full {
    grid-column: 1 / -1;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

label {
    font-size: 13px;
    font-weight: 700;
    color: #111111;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

input,
textarea {
    background: #ebebeb;
    border: none;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 15px;
    color: #111111;
    font-family: inherit;
    outline: none;
    transition: background 0.15s, box-shadow 0.15s;
    width: 100%;
}

input::placeholder,
textarea::placeholder {
    color: #aaaaaa;
}

input:focus,
textarea:focus {
    background: #e2e2e2;
    box-shadow: 0 0 0 2px rgba(156, 44, 44, 0.3);
}

textarea {
    resize: vertical;
    min-height: 150px;
}

.actions {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 32px;
}

.btn-primary {
    background: #9c2c2c;
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    padding: 16px 32px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.18s, transform 0.12s;
    letter-spacing: 0.01em;
    font-family: inherit;
}

.btn-primary:hover { background: #111; }
.btn-primary:active { transform: scale(0.97); }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-icon {
    background: #9c2c2c;
    color: #ffffff;
    border: none;
    border-radius: 9999px;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background 0.18s, transform 0.12s;
    flex-shrink: 0;
}

.btn-icon:hover { background: #111; }
.btn-icon:active { transform: scale(0.95); }

.side-panel {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.info-card {
    background: #f5f5f5;
    border-radius: 20px;
    padding: 28px 28px 32px;
    color: #000000;
}

.info-card-title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #9c2c2c;
    margin-bottom: 20px;
}

.info-row {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
}

.info-row:last-child { border-bottom: none; padding-bottom: 0; }

.info-row-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: #888888;
}

.info-row-value {
    font-size: 14px;
    font-weight: 500;
    color: #000000;
    line-height: 1.4;
}

.info-row-value a {
    color: #9c2c2c;
    text-decoration: none;
}

.info-row-value a:hover { text-decoration: underline; }

.note-card {
    background: #f5f5f5;
    border-radius: 16px;
    padding: 20px 24px;
    font-size: 13px;
    color: #000000;
    line-height: 1.6;
}

.note-card a {
    color: #9c2c2c;
    font-weight: 600;
    text-decoration: none;
}

.note-card a:hover { text-decoration: underline; }

/* ── Toast ── */
.toast {
    position: fixed;
    bottom: 32px;
    left: 50%;
    transform: translateX(-50%) translateY(80px);
    background: #111111;
    color: #fff;
    padding: 14px 28px;
    border-radius: 9999px;
    font-size: 14px;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.3s, transform 0.3s;
    pointer-events: none;
    z-index: 999;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* ─────────────────────────────────────────────
   RESPONSIVE
   ───────────────────────────────────────────── */

@media (max-width: 1100px) {
    .main-nav {
        grid-template-columns: 1fr;
        justify-items: center;
        gap: 14px;
    }
    .nav-logo { justify-self: start; width: 230px; }
    .main-nav ul { flex-wrap: wrap; row-gap: 8px; }
}

@media (max-width: 900px) {
    .layout { grid-template-columns: 1fr; }
    .side-panel { flex-direction: row; flex-wrap: wrap; }
    .info-card { flex: 1; min-width: 280px; }
    .note-card { flex: 1; min-width: 240px; }
}

@media (max-width: 760px) {
    .obiettivi-wrapper {
        padding: 2rem 1.5rem;
    }
    .obiettivi-title {
        font-size: 32px;
    }
    .about-image-col {
        float: none;
        width: 100%;
        margin-right: 0;
    }
    .buttons-row {
        grid-template-columns: minmax(260px, 1fr);
        gap: 2rem;
    }

    /* Card servizi in verticale su mobile */
    .class-card {
        flex-direction: column;
    }
    .card-image {
        flex: 0 0 auto;
        width: 100%;
    }
    .card-image img {
        width: 100%;
        height: 250px;
        object-fit: cover;
    }
    .card-content {
        padding: 30px 24px;
    }
    .card-content h2 {
        font-size: 28px;
    }
    .card-btn {
        align-self: center;
        text-align: center;
    }
}

@media (max-width: 620px) {
    .site-header { padding: 8px 12px; }
    .nav-logo { width: 200px; }
    .main-nav ul { gap: 6px; }
    .main-nav ul a { padding: 12px 9px; font-size: 12px; }
}

@media (max-width: 600px) {
    .about-wrapper { padding: 2rem 1.2rem; }
    .about-title { font-size: 60px; }
    .header { flex-direction: column; gap: 16px; }
    .header-sub { text-align: left; max-width: 100%; }
    .fields-grid { grid-template-columns: 1fr; }
    .form-card { padding: 28px 24px 32px; }
    .side-panel { flex-direction: column; }
    .obiettivi-title { font-size: 28px; }
}

/* Pulsante centrato sotto la sezione Chi siamo */
.about-button-row {
    display: flex;
    justify-content: center;
    margin-top: 3rem;
    clear: both; /* serve perché .about-image-col è float */
}

/* Asterisco rosso sui campi obbligatori */
.required {
    color: #9c2c2c;
    font-weight: 700;
    margin-left: 2px;
}

/* Nota "Campi obbligatori" */
.required-note {
    font-size: 12px;
    color: #777;
    margin-top: 16px;
    font-style: italic;
}

.required-note .required {
    font-style: normal;
}


@media (max-width: 760px) {
    .obiettivi-wrapper {
        padding: 2rem 1.5rem;
    }
    .obiettivi-title {
        font-size: 32px;
    }
    .about-image-col {
        float: none;
        width: 100%;
        margin-right: 0;
    }
    .buttons-row {
        grid-template-columns: minmax(260px, 1fr);
        gap: 2rem;
        padding: 0 1.5rem; /* spazio laterale */
    }

    /* Titolo sezione (es. SCARICA I MODULI PDF) */
    .section-title {
        font-size: 32px;
        padding: 0 1.5rem;
        line-height: 1.2;
    }

    /* Card servizi in verticale su mobile */
    .class-card {
        flex-direction: column;
    }
    .card-image {
        flex: 0 0 auto;
        width: 100%;
    }
    .card-image img {
        width: 100%;
        height: 250px;
        object-fit: cover;
    }
    .card-content {
        padding: 30px 24px;
    }
    .card-content h2 {
        font-size: 28px;
    }
    .card-btn {
        align-self: center;
        text-align: center;
    }
}

@media (max-width: 600px) {
    .about-wrapper { padding: 2rem 1.2rem; }
    .about-title { 
        font-size: 50px;
        padding: 0 0.5rem;
    }
    .header { 
        flex-direction: column; 
        gap: 16px;
        padding: 0 1.2rem;
    }
    .header-left h1 {
        padding: 0;
    }
    .header-sub { text-align: left; max-width: 100%; }
    .fields-grid { grid-template-columns: 1fr; }
    .form-card { padding: 28px 24px 32px; }
    .side-panel { flex-direction: column; }
    .obiettivi-title { font-size: 28px; }
    
    /* Sezione contattaci con padding laterale */
    #contattaci {
        padding: 0 1.2rem;
    }
    
    .section-title {
        font-size: 26px;
        padding: 0 1.2rem;
    }
}

