:root {
    --color-cat: #7c3aed;
    --color-cat-rgb: 31, 41, 55;
}

/* ===============================
CONTENEDOR GENERAL
=================================*/
.section-contacto {
    background-color: #fdfaf9;
}

/* ===============================
HEADER / TITULO
=================================*/
.contact-title {
    max-width: 1200px;
    margin: 0 auto 40px auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.contact-subtitle {
    font-size: 28px;
    font-weight: 700;
    color: #1e1e1e;
    line-height: 1.3;
    max-width: 700px;
}

/* ===============================
GRID PRINCIPAL
=================================*/
.contact-grid {
    max-width: 1200px;
    margin: auto;
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 32px;
}

/* ===============================
TARJETAS SOCIALES
=================================*/
.contact-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 24px;
}

.contact-card {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 18px;
    padding: 28px 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 24px;
    transition: all 0.35s ease;
    box-shadow: 0 8px 20px rgba(0,0,0,0.05);
}

.contact-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0,0,0,0.12),
                0 0 0 1px rgba(var(--color-cat-rgb), 0.2);
    border-color: var(--color-cat);
}

/* TEXTO REDUCIDO (MEJORA AQUÍ 🔥) */
.contact-card h4 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    font-weight: 600;
    color: #2b1e55;
}

.contact-card input {
    border: 1px solid #eee;
    background: #f7f7f7;
    color: #333;
    font-weight: 500;
    text-align: center;
    font-size: 14px;
    outline: none;
    padding: 6px;
    border-radius: 6px;
}

/* BOTONES ACCIONES */
.contact-actions {
    display: flex;
    gap: 12px;
}

.contact-actions button {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: none;
    background: linear-gradient(135deg, #7b5cff, var(--color-cat));
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.contact-actions button:hover {
    transform: scale(1.08);
    box-shadow: 0 8px 20px rgba(123,92,255,0.4);
}

/* ===============================
FORMULARIO
=================================*/
.form-contacto {
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 20px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.06);
}

.cont-top-form {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 12px;
    width: 100%;
}

.form-title {
    text-align: center;
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--color-cat);
}

.contact-inputs {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap:18px;
    width: 100%;
}

.row-input {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    margin-top: 6px;
}
.form-contacto label {
    font-size: 14px;
    font-weight: 600;
    color: #444;
}

.form-contacto input,
.form-contacto textarea {
    width: 100%;
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 12px 13px;
    color: #333;
    outline: none;
    font-size: 14px;
    transition: border 0.3s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.form-contacto input:focus,
.form-contacto textarea:focus {
    border-color: var(--color-cat);
    box-shadow: 0 0 0 2px rgba(var(--color-cat-rgb), 0.2);
    transform: scale(1.02);
}

.form-contacto .btn-enviar {
    margin-top: 16px;
    padding: 14px;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #7b5cff, var(--color-cat));
    color: #fff;
    font-weight: 600;
    font-size: 14px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all 0.35s ease;
}

.form-contacto .btn-enviar:hover {
    box-shadow: 0 12px 30px rgba(123,92,255,0.4);
    transform: translateY(-2px);
}

/* ===============================
BOTÓN LIMPIAR
=================================*/
.btn-clear-form {
    width: 45px;
    height: 45px;
    border: none;
    color: var(--color-cat);
    background: transparent;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* ===============================
ALERTAS
=================================*/
.alertaHide {
    display: none;
    background: #da4c14;
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    font-size: 12px;
}


.input-group {
    position: relative;
}

/* CONTENEDOR DE MENSAJES */
.mensajes {
    position: absolute;
    bottom: 110%; /* 👈 AHORA ARRIBA del input */
    left: 0;
    z-index: 20;
    display: flex;
    flex-direction: column;
    gap: 5px;
}
/* EMOJI ALERTA */
.emoji-alerta {
    font-size: 20px;
}
/* MENSAJES */
.mensajes p {
    display: inline-block;
    width: auto;
    max-width: 250px;

    background: #e53935;
    color: #fff;

    padding: 6px 10px;
    border-radius: 20px;
    font-size: 12px;

    box-shadow: 0 6px 15px rgba(0,0,0,0.15);
    opacity: 0;
    transform: translateY(10px);
    transition: all 0.25s ease;
}

/* ESTADO VISIBLE */
.mensajes p.show {
    opacity: 1;
    transform: translateY(0);
}

/* OCULTO */
.alertaHide {
    display: none;
}

/* EFECTO HOVER */
.mensajes p:hover {
    transform: scale(1.05);
    background: #c62828;
}
.mensajes p::after {
    content: "";
    position: absolute;
    bottom: -6px;
    left: 15px;

    width: 10px;
    height: 10px;
    background: #e53935;

    transform: rotate(45deg);
}

.mensajes {
    pointer-events: none;
}

#toast {
    position: fixed;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #323232;
    color: #fff;
    padding: 12px 20px;
    border-radius: 6px;
    font-family: sans-serif;
    font-size: 14px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 9999;
}

/* ===============================
RESPONSIVE
=================================*/
@media (max-width: 1100px) {
    .contact-subtitle {
        font-size: 28px;
    }

    .form-title {
        font-size: 20px;
    }

    .contact-grid {
        gap: 28px;
    }
}

@media (max-width: 1000px) {
    .contact-subtitle {
        font-size: 26px;
    }

    .form-contacto {
        padding: 28px;
    }
}

@media (max-width: 900px) {
    .contact-subtitle {
        font-size: 26px;
    }
    .contact-grid {
        grid-template-columns: 1fr;
        gap: 24px;
    }

    .contact-inputs {
        flex-direction: row;
    }

    .form-contacto label {
        font-size: 13.5px;
    }
    .form-contacto input, .form-contacto textarea {
        font-size: 13px;
    }

    .form-contacto .btn-enviar {
        font-size: 13.5px;
    }

    .contact-card h4 {
        font-size: 14px;
    }
    .contact-card input {
        font-size: 13.5px;
    }

}

@media (max-width: 800px) {
    .form-contacto {
        padding: 24px;
    }
}

@media (max-width: 700px) {
    .contact-title {
        gap: 15px;
    }
}

@media (max-width: 600px) {
    .contact-subtitle {
        font-size: 24px;
    }
    .contact-inputs {
        flex-direction: column;
        gap: 16px;
    }

    .form-contacto {
        padding: 22px;
    }
    .form-contacto label {
        font-size: 13px;
    }
    .form-contacto .btn-enviar {
        font-size: 13px;
    }

    .contact-card h4 {
        font-size: 13px;
    }
    .contact-card input {
        font-size: 13px;
    }
}

@media (max-width: 500px) {
    .form-title {
        font-size: 18px;
    }

    .form-contacto {
        padding: 20px;
    }
}

@media (max-width: 400px) {
    .contact-subtitle {
        font-size: 22px;
    }
    .form-contacto {
        padding: 18px;
    }

    .form-contacto input,
    .form-contacto textarea {
        font-size: 13px;
    }
    .form-contacto .btn-enviar {
        font-size: 12px;
    }
    .contact-card input {
        font-size: 12.5px;
    }
}