/* CONTACTO */
.contacto{
    width: 100%;
    min-height: calc(100vh - 96px);
    margin-top: 96px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
/* IMAGEN DE FONDO */
.contacto::before{
    content: "";
    position: absolute;
    inset: 0;
    background-image: url('../img/fondocontacto.png');
    background-size: cover;
    background-position: center top;
    z-index: 0;
}
/* IMAGEN PRINCIPAL SOBRE EL FONDO */
.contacto-imagen{
    position: absolute;
    inset: 0;
    background-image: url('../img/contacto.png');
    background-size: cover;
    background-position: 100% top;
    z-index: 1;
}
/* OVERLAY SUAVE */
.contacto::after{
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to bottom,
        rgba(0,0,0,0.15) 0%,
        rgba(0,0,0,0.45) 60%,
        rgba(0,0,0,0.65) 100%
    );
    z-index: 2;
}
/* TITULO */
.contacto .titulo{
    text-align: center;
    position: absolute;
    top: 50px;
    left: 0;
    right: 0;
    z-index: 3;
    padding: 0 40px;
}
.contacto .titulo h2{
    font-size: 52px;
    font-weight: 800;
    color: white;
    margin-bottom: 10px;
    text-shadow: 0 2px 16px rgba(0,0,0,0.5);
    display: inline-block;
}
.contacto .titulo h2::after{
    content: "";
    width: 80px;
    height: 4px;
    background: white;
    display: block;
    margin: 12px auto 0;
    border-radius: 10px;
}
.contacto .titulo p{
    font-size: 18px;
    color: rgba(255,255,255,0.9);
    text-shadow: 0 1px 8px rgba(0,0,0,0.4);
}
/* CONTENIDO INFERIOR */
.contacto-inferior{
    position: relative;
    z-index: 3;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: flex-end;
    gap: 16px;
    padding: 30px 5% 40px;
    flex-wrap: wrap;
}
/* GRUPO PBX + CORREO */
.contacto-cards-group{
    display: flex;
    align-items: stretch;
    gap: 16px;
}
/* TARJETAS */
.contacto-card{
    background: linear-gradient(160deg, rgba(0,92,168,0.96), rgba(0,40,75,0.97));
    padding: 22px 20px;
    border-radius: 20px;
    text-align: center;
    border: 1px solid rgba(255,255,255,0.25);
    transition: .3s;
    width: 200px;
    min-width: max-content;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
.contacto-card:hover{
    transform: translateY(-6px);
    background: linear-gradient(160deg, rgba(0,102,178,0.96), rgba(0,50,85,0.97));
}
/* ICONO + TITULO EN FILA */
.contacto-card-header{
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 8px;
}
/* ICONOS */
.icono{
    width: 34px;
    height: 34px;
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 10px;
    background: rgba(255,255,255,0.2);
    font-size: 15px;
    color: white;
    transition: .3s;
    flex-shrink: 0;
}
.contacto-card:hover .icono{
    background: rgba(255,255,255,0.32);
    transform: scale(1.08);
}
/* TEXTO */
.contacto-card h3{
    font-size: 16px;
    margin-bottom: 0;
    font-weight: 700;
    color: white;
}
.contacto-card p{
    font-size: 13px;
    line-height: 1.5;
    color: rgba(255,255,255,0.9);
    word-break: break-word;
    overflow-wrap: break-word;
}
/* BOTONES */
.btn-contacto-card{
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 14px;
    padding: 10px 16px;
    background: white;
    color: #005ca8;
    border-radius: 12px;
    text-decoration: none;
    font-size: 13px;
    font-weight: 700;
    transition: .3s;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    width: 100%;
}
.btn-contacto-card:hover{
    transform: translateY(-3px);
    background: #f1f5f9;
    color: #176c22;
}
.btn-contacto-card i{
    font-size: 14px;
}
/* REDES SOCIALES */
.redes-sociales{
    background: rgba(255,255,255,0.15);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.25);
    border-radius: 20px;
    padding: 22px 26px;
    text-align: left;
    width: auto;
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 18px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.25);
    align-self: flex-end;
}
.redes-sociales h3{
    font-size: 14px;
    margin-bottom: 0;
    color: white;
    font-weight: 700;
    line-height: 1.4;
}
.iconos-redes{
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
}
.iconos-redes a{
    width: 52px;
    height: 52px;
    border-radius: 16px;
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    font-size: 24px;
    color: white;
    transition: .35s;
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}
/* FACEBOOK */
.facebook{ background: #1877f2; }
.facebook:hover{
    transform: translateY(-5px) scale(1.06);
    box-shadow: 0 10px 24px rgba(24,119,242,0.5);
}
/* TIKTOK */
.tiktok{ background: #111; }
.tiktok:hover{
    transform: translateY(-5px) scale(1.06);
    box-shadow: 0 10px 24px rgba(0,0,0,0.5);
}
/* WHATSAPP */
.whatsapp{ background: #25D366; }
.whatsapp:hover{
    transform: translateY(-5px) scale(1.06);
    box-shadow: 0 10px 24px rgba(37,211,102,0.5);
}
/* MOBILE */
@media(max-width:900px){
    .contacto{
        min-height: calc(100vh - 92px);
        margin-top: 92px;
        justify-content: flex-start;
    }
    .contacto::before{
        background-image: url('../img/fondocontactomobile.png');
    }
    .contacto-imagen{
        background-image: url('../img/contactomobile.png');
        background-size: cover;
        background-position: center top;
    }
    .contacto .titulo{
        top: 30px;
        padding: 0 20px;
    }
    .contacto .titulo h2{
        font-size: 34px;
    }
    .contacto .titulo p{
        font-size: 15px;
    }
    .contacto-inferior{
        flex-direction: row;
        justify-content: center;
        align-items: stretch;
        padding: 20px 16px 30px;
        margin-top: 8vh;
        gap: 12px;
    }
    .contacto-cards-group{
        display: flex;
        flex-wrap: nowrap;
        width: 100%;
        gap: 12px;
    }
    .contacto-card,
    .redes-sociales{
        width: auto;
        flex: 0 1 auto;
        min-width: 0;
        padding: 16px 12px;
    }
    .solo-desktop{
        display: none;
    }
    /* CORREO: nunca se encoge, el email debe quedar en una sola línea */
    .contacto-cards-group .contacto-card:last-child{
        flex-shrink: 0;
    }
    .contacto-cards-group .contacto-card:last-child p{
        white-space: nowrap;
    }
    .contacto-card h3{
        font-size: 14px;
    }
    .contacto-card p{
        font-size: 11px;
    }
    .redes-sociales{
        margin-top: 36vh;
    }
    .redes-sociales h3{
        font-size: 12px;
    }
    .iconos-redes a{
        width: 44px;
        height: 44px;
        font-size: 20px;
    }
}
