/* ============================
   PAGINA CONTATTI – SUPER PREMIUM ANIMATO
============================ */

.page-contatti {
    background: #eef3f6;
    padding-bottom: 40px;
    /* ridotto */
    animation: fadeInPage 0.6s ease forwards;
}

@keyframes fadeInPage {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* HERO */
.page-hero {
    padding: 40px 0 30px 0;
    /* ridotto */
    background: #e6eef1;
    text-align: center;
    border-bottom: 3px solid #4d798b20;
    border-top: 2px solid #d3dde2;
}

.page-title {
    font-size: 2.3rem;
    font-weight: 800;
    color: #355866;
    letter-spacing: -0.5px;
    animation: fadeInUp 0.7s ease forwards;
}

.page-subtitle {
    font-size: 1rem;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
    color: #355866cc;
    animation: fadeInUp 0.9s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CONTAINER */
.page-container {
    width: 90%;
    max-width: 1300px;
    margin: 0 auto;
}

/* ============================
   GRID CARD
============================ */

.contatti-section {
    padding: 30px 0 30px 0;
    /* ridotto */
}

.contatti-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 25px;
    /* ridotto */
}

/* ============================
   CARD SUPER PREMIUM
============================ */

.cont-card {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(14px);
    border-radius: 18px;
    padding: 28px;
    /* ridotto */
    position: relative;
    overflow: hidden;
    text-align: center;

    transform-style: flat;
    transition: transform 0.35s ease, box-shadow 0.35s ease;

    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.08),
        0 10px 25px rgba(0, 0, 0, 0.12),
        0 20px 40px rgba(0, 0, 0, 0.10);

    animation: fadeInCard 0.7s ease forwards;
}

@keyframes fadeInCard {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cont-card:hover {
    transform: translateY(-6px) scale(1.015);
    box-shadow:
        0 6px 14px rgba(0, 0, 0, 0.10),
        0 14px 32px rgba(0, 0, 0, 0.14),
        0 26px 48px rgba(0, 0, 0, 0.12);
}

/* Bordo animato */
.cont-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 18px;
    padding: 2px;
    background: linear-gradient(135deg, #4d798b, #355866, #4d798b);
    opacity: 0;
    transition: opacity 0.35s ease;
    pointer-events: none;

    -webkit-mask:
        linear-gradient(#fff 0 0) content-box,
        linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
}

.cont-card:hover::before {
    opacity: 1;
}

/* ============================
   ICONA
============================ */

.cont-icon i {
    font-size: 3.2rem;
    color: #355866;
    transition: transform 0.3s ease, filter 0.3s ease;
}

.cont-card:hover .cont-icon i {
    transform: scale(1.12);
    filter: drop-shadow(0 0 10px #35586680);
}

/* ============================
   BADGE
============================ */

.cont-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 4px 10px;
    font-size: 0.7rem;
    font-weight: 700;
    border-radius: 6px;
    color: #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
}

.badge-info {
    background: #355866;
}

.badge-mail {
    background: #4d798b;
}

.badge-tel {
    background: #b83232;
}

.badge-wa {
    background: #25D366;
}

/* ============================
   FORM + MAPPA
============================ */

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    /* ridotto */
}

/* BOX PREMIUM */
.elegant-box {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    border-radius: 18px;
    padding: 24px;
    /* ridotto */
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.08),
        0 12px 28px rgba(0, 0, 0, 0.12);
}

/* MAPPA */
.map-placeholder {
    text-align: center;
    padding: 28px 15px;
    /* ridotto */
}

.mp-icon {
    font-size: 2.2rem;
    margin-bottom: 10px;
}

.mp-btn {
    background: #355866;
    color: #fff;
    padding: 8px 16px;
    border-radius: 10px;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

/* ============================
   FORM
============================ */

.form-area .form-label {
    font-weight: 700;
    color: #355866;
    margin-bottom: 6px;
}

.form-row {
    display: flex;
    gap: 15px;
    /* ridotto */
}

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

.form-control {
    width: 100%;
    padding: 12px;
    /* ridotto */
    border-radius: 10px;
    border: 2px solid #d3dde2;
    font-size: 1rem;
}

/* ============================
   BOTTONI FORM
============================ */

.btn-primary,
.btn-secondary {
    padding: 10px 18px;
    /* ridotto */
    border-radius: 10px;
    font-weight: 700;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #4d798b;
    color: #fff;
}

.btn-secondary {
    background: #b83232;
    color: #fff;
}

/* ============================
   FOOTER LOGOS – SUPER PREMIUM FIX
============================ */

.footer-logos {
    margin-top: 40px;
    /* molto ridotto */
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 25px;
    /* ridotto */

    width: 100%;
    text-align: center;
}

/* SOCIAL — Facebook, YouTube, WhatsApp */
.social-icons {
    display: flex;
    gap: 22px;
    /* ridotto */
    justify-content: center;
    align-items: center;
    width: 100%;
}

.social-icon {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;

    background: #fff;
    box-shadow:
        0 4px 10px rgba(0, 0, 0, 0.18),
        inset 0 0 0 3px rgba(0, 0, 0, 0.05);

    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.social-icon svg {
    width: 24px;
    height: 24px;
    fill: #355866;
}

/* Brand colors */
.social-icon.facebook svg {
    fill: #1877F2;
}

.social-icon.youtube svg {
    fill: #FF0000;
}

.social-icon.whatsapp svg {
    fill: #25D366;
}

.social-icon:hover {
    transform: translateY(-5px) scale(1.06);
    box-shadow:
        0 8px 20px rgba(0, 0, 0, 0.25),
        inset 0 0 0 3px rgba(0, 0, 0, 0.15);
}

/* LOGHI AICS + SSL */
.cert-logos {
    display: flex;
    gap: 20px;
    /* ridotto */
    justify-content: center;
    align-items: center;
    width: 100%;
}

.cert-logos img {
    height: 42px;
    /* ridotto e proporzionato */
    object-fit: contain;

    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.18));

    transition: transform 0.25s ease, filter 0.25s ease;
}

.cert-logos img:hover {
    transform: translateY(-3px) scale(1.03);
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.25));
}

/* ============================
   CONTATORE SUPER PREMIUM
============================ */

.contatore-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    width: 100%;
    margin-top: 5px;
    /* ridotto */
}

.contatore-inline {
    display: flex;
    gap: 3px;
}

.cifra {
    width: 20px;
    height: 28px;
    background: #0d1a2b;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 5px;
    text-align: center;
    position: relative;
    overflow: hidden;

    box-shadow:
        inset 0 1px 2px rgba(255, 255, 255, 0.25),
        0 2px 5px rgba(0, 0, 0, 0.25);
}

.flip-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

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

.contatore-label {
    font-size: 0.75rem;
    margin-top: 4px;
    /* ridotto */
    color: #355866;
    opacity: 0.7;
}

/* ============================
   FORM – STATI DI VALIDAZIONE
============================ */

/* Messaggi di errore */
.form-field small.error-text {
    color: #b83232;
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
    font-weight: 600;
}

/* Messaggi validi (se vuoi mostrarli) */
.form-field small.valid-text {
    color: #2e7d32;
    font-size: 0.8rem;
    margin-top: 4px;
    display: block;
    font-weight: 600;
}

/* Campo non valido */
.form-control.is-invalid {
    border-color: #b83232 !important;
    background: #fff4f4 !important;
    box-shadow: 0 0 0 3px rgba(184, 50, 50, 0.15);
}

/* Campo valido */
.form-control.is-valid {
    border-color: #2e7d32 !important;
    background: #f3fff5 !important;
    box-shadow: 0 0 0 3px rgba(46, 125, 50, 0.15);
}

/* Rimuove animazioni quando si resetta */
.form-control {
    transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.25s ease;
}

/* ============================
   RESPONSIVE
============================ */

@media (max-width: 900px) {
    .form-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 700px) {
    .contatti-grid {
        grid-template-columns: 1fr;
    }
}