/* ----------------------------------------------------
   CONTATTI
---------------------------------------------------- */

/* Spaziatura generale sezioni */
.contatti-top,
.contatti-middle,
.contatti-bottom {
    margin-bottom: 40px;
}

/* ----------------------------------------------------
   CARD / BOX INFORMATIVI (1ª riga)
---------------------------------------------------- */
.info-box {
    background: #ffffff;
    padding: 28px 30px;
    border-radius: 14px;
    border-left: 6px solid var(--rosa-scuro);
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    transition: 0.25s ease;
    height: 100%;
}

.info-box:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.12);
    border-left-color: var(--rosa);
}

.info-box i {
    font-size: 32px;
    color: var(--rosa-scuro);
    margin-bottom: 12px;
    display: inline-block;
}

.info-box h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 10px;
}

.info-box p,
.info-box small,
.info-box a {
    font-size: 0.95rem;
    line-height: 1.45;
}

/* ----------------------------------------------------
   TITOLO CONTATTI
---------------------------------------------------- */
.section-title h2 {
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--rosa-scuro);
    text-align: center;
    margin-bottom: 45px;
    letter-spacing: 0.5px;
}

/* ----------------------------------------------------
   GRIGLIA CONTATTI
---------------------------------------------------- */

/* 1ª riga: 3 box */
.contatti-top {
    display: flex;
    gap: 25px;
}

.contatti-top .box {
    flex: 1;
}

/* 2ª riga: mappa + form */
.contatti-middle {
    display: flex;
    gap: 25px;
}

.contatti-middle .mappa {
    flex: 0 0 55%;
}

.contatti-middle .form {
    flex: 0 0 45%;
}

/* Responsive */
@media (max-width: 992px) {

    .contatti-top,
    .contatti-middle {
        flex-direction: column;
    }

    .contatti-middle .mappa,
    .contatti-middle .form {
        flex: 0 0 100%;
    }

    .info-box {
        margin-bottom: 20px;
    }
}

/* ----------------------------------------------------
   MAPPA GDPR (placeholder)
---------------------------------------------------- */
.map-placeholder {
    background: #f7f7f7;
    padding: 40px 25px;
    border-radius: 14px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.05);
}

.map-placeholder p {
    font-weight: 600;
    margin-bottom: 12px;
}

.map-placeholder button {
    padding: 8px 18px;
    border-radius: 8px;
}

/* ----------------------------------------------------
   MAPPA GDPR (placeholder) – versione elegante
---------------------------------------------------- */

.map-placeholder.elegant-box {
    background: #f7f9fc;
    border: 1px solid #dce3ee;
    border-radius: 14px;
    padding: 32px 25px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

/* Icona */
.map-placeholder .mp-icon {
    font-size: 32px;
    margin-bottom: 12px;
}

/* Testo */
.map-placeholder .mp-text {
    font-size: 15px;
    color: #3a3f47;
    margin-bottom: 18px;
    font-weight: 600;
}

/* Pulsante */
.map-placeholder .mp-btn {
    background: #0069d9;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.map-placeholder .mp-btn:hover {
    background: #0053b3;
}

/* ----------------------------------------------------
   FORM CONTATTI (wrapper base)
---------------------------------------------------- */
#contactform .form-field {
    margin-bottom: 18px;
}

#contactform .form-label {
    font-weight: 600;
}

/* ----------------------------------------------------
   FORM – VERSIONE ELEGANTE
---------------------------------------------------- */

.form-area {
    background: #ffffff;
    padding: 45px;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.08);
    width: 100%;
    max-width: 650px;
    margin: 0 auto;
}

.form-row {
    display: flex;
    gap: 30px;
}

.form-row .half {
    flex: 1;
}

.form-label {
    font-weight: 600;
    margin-bottom: 6px;
    display: block;
    color: #550202;
}

.form-control {
    width: 100%;
    border-radius: 10px;
    padding: 14px 16px;
    border: solid 2px #b9b6b6;
    transition: 0.25s;
    font-size: 1rem;
    background-color: #fff;
}

.form-control:focus {
    border-color: var(--rosa-scuro);
    box-shadow: 0 0 0 3px rgba(255, 0, 128, 0.15);
}

/* Pulsanti */
.form-buttons {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 24px !important;
}

.form-buttons .btn-primary {
    background: var(--rosa-scuro);
    border: none;
    padding: 14px 32px;
    font-weight: 700;
    border-radius: 8px;
    font-size: 1.05rem;
    color: #fff;
    transition: 0.25s;
}

.form-buttons .btn-primary:hover {
    background: var(--rosa);
    transform: translateY(-2px);
}

.form-buttons .btn-secondary {
    background: #6c757d;
    border: none;
    padding: 14px 32px;
    font-weight: 700;
    border-radius: 8px;
    font-size: 1.05rem;
    color: #fff;
    transition: 0.25s;
}

.form-buttons .btn-secondary:hover {
    background: #555;
    transform: translateY(-2px);
}

button,
.btn {
    cursor: pointer;
}

/* ----------------------------------------------------
   VALIDAZIONE FORM
---------------------------------------------------- */

.form-control.is-invalid {
    border: 2px solid #d93025 !important;
    background-color: #fff5f5 !important;
}

.form-control.is-invalid:focus {
    border-color: #d93025 !important;
    box-shadow: 0 0 0 3px rgba(217, 48, 37, 0.25) !important;
}

.form-field small.error-text {
    color: #d93025 !important;
    font-weight: 600;
    margin-top: 4px;
    display: block;
}

.form-control.is-valid {
    border: 2px solid #1e9e4a !important;
    background-color: #f3fff7 !important;
}

.form-control.is-valid:focus {
    border-color: #1e9e4a !important;
    box-shadow: 0 0 0 3px rgba(30, 158, 74, 0.25) !important;
}

.form-field small.valid-text {
    color: #1e9e4a !important;
    font-weight: 600;
    margin-top: 4px;
    display: block;
}

/* Icone stato input */
.input-wrapper {
    position: relative;
}

.input-wrapper .icon-status {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    pointer-events: none;
    background-size: contain;
    background-repeat: no-repeat;
    opacity: 0;
    transition: 0.2s ease;
}

.form-control.is-invalid+.icon-status {
    background-image: url("<?= url('assets/img/icon-error.svg') ?>");
    opacity: 1;
}

.form-control.is-valid+.icon-status {
    background-image: url("<?= url('assets/img/icon-valid.svg') ?>");
    opacity: 1;
}

/* ----------------------------------------------------
   FOOTER LOGOS + CONTATORE
---------------------------------------------------- */

.footer-logos {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    padding-top: 10px;
}

.cert-logos {
    display: flex;
    gap: 25px;
    align-items: center;
    justify-content: center;
    margin: 10px 0;
}

.cert-logos img {
    height: 45px;
    object-fit: contain;
}

/* Contatore */
.contatore-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 5px;
}

.contatore-inline {
    display: flex;
    align-items: center;
    justify-content: center;
}

.contatore-label {
    font-size: 0.9em;
    color: #555;
    margin-top: 8px;
    font-style: italic;
}

/* Cifre */
.cifra {
    position: relative;
    overflow: hidden;
    width: 22px;
    height: 30px;
    background: #0d1a2b;
    color: white;
    font-size: 1.2em;
    font-weight: bold;
    border-radius: 4px;
    text-align: center;
    line-height: 30px;
    margin: 3px;
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.4),
        0 2px 6px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.flip-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: transform 0.5s ease-in-out;
}

.digit {
    height: 30px;
    line-height: 30px;
}

.map-wrapper-modern {
    background: #ffffff;
    border-radius: 16px;
    padding: 10px;
    margin: 25px 0;

    /* Ombra profonda moderna */
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.18),
        0 4px 10px rgba(0, 0, 0, 0.12);

    /* Effetto carta */
    border: 1px solid rgba(0, 0, 0, 0.08);
}

.map-wrapper-modern iframe {
    border-radius: 12px;
    display: block;
    width: 100%;
    height: 384px;
}