/* =========================================
   CONTATTI E FORM (body.contacts)
   ========================================= */

/* Rimuove completamente il logo di sfondo anche su desktop */
body.contacts main::before,
main:has(.contacts-grid)::before {
    display: none !important;
    content: none !important;
}

body.contacts main {
    align-items: center;
}

body.contacts h1.otherTitle {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    font-size: clamp(2.5rem, 5vw, 4rem);
    color: var(--primary-color);
    border-bottom: none;
    padding-bottom: 0;
    margin: 0.5rem auto 0.6rem auto;
    text-align: center;
    letter-spacing: 0.5px;
    line-height: 1.1;
    text-shadow: 1px 1px 2px rgba(217, 203, 191, 0.7);
}

.contacts-desc {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    font-size: clamp(1rem, 1.5vw, 1.2rem);
    color: #b67b0d;
    text-transform: uppercase;
    letter-spacing: 4px;
    margin: 0.5rem auto 2.5rem auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    text-align: center;
    max-width: 900px;
}

.contacts-desc::before,
.contacts-desc::after {
    content: "";
    display: inline-block;
    width: 34px;
    height: 1px;
    background-color: #b67b0d;
    opacity: 0.75;
    flex-shrink: 0;
}

@media (max-width: 1024px) {
    .contacts-desc {
        letter-spacing: 2px;
        font-size: 1rem;
        margin: 0.5rem auto 1.75rem auto;
    }

    .contacts-desc::before,
    .contacts-desc::after {
        display: none;
    }
}

/* Griglia riposizionata: centrata ed equilibrata */
.contacts-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    align-items: stretch;
    gap: 2.5rem;
    margin: 0 auto 3rem auto;
    width: 100%;
    max-width: 1120px;
    box-sizing: border-box;
}

.contacts-info,
.contacts-form-wrapper {
    flex: 1 1 400px;
    max-width: 520px;
    width: 100%;
    font-size: 1.15rem;
    padding: 2rem;
    background-color: rgba(255, 255, 255, 0.65);
    border-radius: 10px;
    box-sizing: border-box;
    border: 1px solid rgba(182, 123, 13, 0.22);
    box-shadow: 0 6px 20px rgba(140, 111, 77, 0.06);
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.contacts-info:hover,
.contacts-form-wrapper:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 28px rgba(182, 123, 13, 0.14);
    border-color: rgba(182, 123, 13, 0.5);
}

.contacts-info a {
    color: var(--primary-color);
    text-decoration: none;
    display: inline-block;
    transition: color 0.25s ease, transform 0.25s ease;
}

.contacts-info a:hover {
    text-decoration: underline;
    color: #b67b0d;
    transform: translateX(4px);
}

.contacts-info h3,
.contacts-form-wrapper h3 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.35rem;
    margin-bottom: 14px;
    padding-bottom: 0.4rem;
    border-bottom: 1px solid rgba(182, 123, 13, 0.25);
}

.title-recapiti,
.title-societari {
    color: #b67b0d;
}

a[href^="tel:"],
a[href^="mailto:"] {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a[href^="tel:"]:hover,
a[href^="mailto:"]:hover {
    color: #a4825b;
    text-decoration: underline;
}

.contacts-form {
    width: 100%;
    font-size: 1.1rem;
}

.contacts-form label {
    display: block;
    margin-top: 1rem;
    margin-bottom: 0.4rem;
    font-weight: 600;
    color: #4a3f35;
    font-family: 'Playfair Display', Georgia, serif;
}

.contacts-form input,
.contacts-form textarea {
    width: 100%;
    max-width: 100%;
    padding: 0.75rem;
    resize: none;
    border-radius: 6px;
    background-color: #fffaf5;
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif !important;
    box-sizing: border-box;
    border: 1px solid #d4c4b2;
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

.contacts-form input:focus,
.contacts-form textarea:focus {
    outline: none;
    border-color: #b67b0d;
    box-shadow: 0 0 0 3px rgba(182, 123, 13, 0.18);
    background-color: #fff;
}

.contacts-form button {
    width: 100%;
    margin-top: 1.5rem;
    padding: 0.9rem 1.5rem;
    background-color: #b67b0d;
    color: white;
    border: 2px solid #b67b0d;
    border-radius: 6px;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.05rem;
    font-weight: 600;
    letter-spacing: 0.6px;
    cursor: pointer;
    transition: background-color 0.25s ease, border-color 0.25s ease, transform 0.15s ease, box-shadow 0.25s ease;
}

.contacts-form button:hover {
    background-color: #9e690a;
    border-color: #9e690a;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(182, 123, 13, 0.3);
}

.contacts-form button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(182, 123, 13, 0.2);
}

#form-msg {
    display: block;
    margin: 1.2rem auto 0 auto;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    width: 100%;
    clear: both;
}

/* =========================================
   MOBILE CONTATTI
   ========================================= */
@media (max-width: 1024px) {
    .contacts-grid {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 1.75rem;
        margin-top: 1rem;
        margin-bottom: 2rem;
        width: 100%;
        max-width: 600px;
    }

    .contacts-info,
    .contacts-form-wrapper {
        flex: 1 1 100%;
        max-width: 100%;
        width: 100%;
        font-size: 1.05rem;
        padding: 1.4rem;
    }

    .contacts-info a:hover {
        transform: none;
    }

    .contacts-info h3,
    .contacts-form-wrapper h3,
    .title-recapiti,
    .title-societari {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }

    .contacts-form {
        font-size: 1rem;
    }

    .contacts-form label {
        font-size: 0.95rem;
        margin-top: 0.8rem;
        margin-bottom: 0.3rem;
    }

    .contacts-form input,
    .contacts-form textarea {
        font-size: 14px;
        padding: 0.65rem;
    }

    .contacts-form input::placeholder,
    .contacts-form textarea::placeholder {
        font-size: 0.85rem;
        opacity: 0.7;
    }

    .contacts-form textarea {
        min-height: 100px;
    }

    .contacts-form button {
        font-size: 1rem;
        padding: 0.8rem 1.2rem;
        margin-top: 1.2rem;
    }

    #form-msg {
        font-size: 0.95rem;
        margin-top: 12px;
    }
}