/* Grid de contacto (2 columnas fijas) */
.contacto-grid {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 16px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 80px;
}

/* Tarjeta base */
.contacto-card {
    background: #ffffff;
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.08);
    box-shadow: 0 6px 18px rgba(0,0,0,0.08);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: #111;
    transition: transform .25s ease, box-shadow .25s ease, border-color .25s ease;
}
.contacto-card:hover {
    background-color: #000000;
    color: #ffffff;
    transform: translateY(-6px);
    box-shadow: 0 14px 28px rgba(0,0,0,0.16);
    border: 2px solid;
    border-color: rgb(255, 255, 255);
    transition: all 0.5s ease;
}

/* Icono circular */
.contacto-card__icon {
    flex: 0 0 64px;
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #f2f5f7;
    color: #111;
    box-shadow: inset 0 0 0 2px rgba(0,0,0,0.05);
    transition: box-shadow .35s ease;
}
.contacto-card__icon ion-icon { font-size: 28px; }

/* Contenido */
.contacto-card__body { flex: 1 1 auto; }
.contacto-card__title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 6px;
}
.contacto-card__desc {
    font-size: 14px;
    color: #444;
    transition: color .25s ease;
}

/* Al hacer hover en la tarjeta, el texto debajo del título pasa a blanco */
.contacto-card:hover .contacto-card__desc {
    color: #ffffff;
}

/* CTA a la derecha */
    .contacto-card__cta {
    margin-left: auto;
    font-weight: 700;
    font-size: 14px; 
    color: #000000;
    background-color: #e9e9e9;
    border-radius: 30px;
    border: 1px solid rgba(0,0,0,0.08);
    padding: 8px 16px; /* hace más grande el fondo del botón */
    display: inline-block; /* respeta el padding del botón */
    transition: background-color .5s ease, color .5s ease, border-color .5s ease, box-shadow .5s ease;
}
.contacto-card__cta:hover{
    background-color: #000000;
    color: #ffffff;
    cursor: pointer;
    border: 2px solid rgb(255, 255, 255);
    transition: all 0.5s ease;
} 

/* Sincroniza el estado del CTA cuando se hace hover/click en toda la tarjeta */
.contacto-card:hover .contacto-card__cta,
.contacto-card:active .contacto-card__cta,
.contacto-card:focus-within .contacto-card__cta {
    background-color: #000000;
    color: #ffffff;
    border: 2px solid rgb(255, 255, 255);
}

/* Borde de 1px en la burbuja del icono al hacer hover en la tarjeta (sin cambiar layout) */
.contacto-card:hover .contacto-card__icon,
.contacto-card:active .contacto-card__icon,
.contacto-card:focus-within .contacto-card__icon {
    box-shadow: inset 0 0 0 2px rgba(0,0,0,0.05), 0 0 0 1px #ffffff;
}

/* Variantes de color ligeras */
.contacto-card--chat .contacto-card__icon { background:#e8f7ee; color:#25D366; }
.contacto-card--whatsapp .contacto-card__icon { background:#e8f7ee; color:#25D366; }
.contacto-card--instagram .contacto-card__icon { background:#fde9f1; color:#E1306C; }
.contacto-card--mail .contacto-card__icon { background:#e8f0ff; color:#1a73e8; }

/* Escritorio: tarjetas más altas y contenido centrado verticalmente */
@media (min-width: 901px) {
    .contacto-card { min-height: 180px; }
    .contacto-card__body {
        display: flex;
        flex-direction: column;
        justify-content: center; /* centra título y descripción verticalmente */
    }
}

/* Asegurar 2 columnas incluso en móviles, con respiro interno */
@media (max-width: 480px) {
    .contacto-grid { gap: 12px; grid-template-columns: 1fr; }
    .contacto-card { padding: 14px; gap: 10px; }
    .contacto-card__icon { width:56px; height:56px; }
    .contacto-card__title { font-size: 18px; }
}

/* Estilos para la sección de contacto */
.container-contacto{
    padding: 100px auto;
    display: flex;
    align-items: center;
    margin-top: 20px;
    margin-left: 20px;
    margin-right: 20px;
}
.contac-img{
    width: 50%;
}
.contac-img img{
    width: 600px;
    height: 250px;
    border-radius: 5px;
}
.contac-txt{
    width: 100%;
    text-align: center;
    margin-left: 0; /* <-- Esto centra el bloque en móvil */
}

.contac-txt h2{
    font-size: 75px;
    color: #ffffff;
    font-weight: 800;
    margin-bottom: 25px;
}
.contac-txt p{
    font-size: 20px;
    color: rgb(255, 255, 255);
    font-weight: 400;
    text-align: justify;
    margin-bottom: 25px;
    margin-left: 70px;
}

@media(max-width: 990px){
    .container-contacto{
        padding: 20px;
        flex-direction: column;
    }
    .contac-img{
        width: 100%;
        text-align: center;
    }
    .contac-img img{
        width: 315px;
        height: 125px;
        margin-bottom: 25px;
    }

    .contac-txt{
        width: 100%;
        text-align: center;
    }
    .contac-txt h2{
        font-size: 50px;
    }
    .contac-txt p{
        font-size: 16px;
        margin-left: 0;
        text-align: center;
    }
}

