/* ==============================================================
   BLOQUE DE CONTACTO REUTILIZABLE (CTA MULTICANAL)
   Clínica JANDJ - Botones WhatsApp, Teléfono y Formulario
   ============================================================== */
.cjj-contact-block {
    box-sizing: border-box;
    width: 100%;
    max-width: 980px;
    margin: 32px auto;
    padding: 28px 24px;
    background: linear-gradient(145deg, #ffffff 0%, #f6faf7 100%);
    border: 1px solid #dceede;
    border-radius: 18px;
    box-shadow: 0 10px 28px -6px rgba(0, 140, 53, 0.08), 0 4px 12px rgba(0, 0, 0, 0.03);
    font-family: inherit;
    position: relative;
    overflow: hidden;
}

.cjj-contact-block *,
.cjj-contact-block *::before,
.cjj-contact-block *::after {
    box-sizing: border-box;
}

.cjj-contact-block::before {
    content: "";
    position: absolute;
    top: -60px;
    right: -60px;
    width: 180px;
    height: 180px;
    background: radial-gradient(circle, rgba(0, 140, 53, 0.07) 0%, transparent 70%);
    pointer-events: none;
    border-radius: 50%;
}

.cjj-contact-header {
    text-align: center;
    margin-bottom: 22px;
}

.cjj-contact-title {
    margin: 0 0 6px 0;
    font-size: 24px;
    font-weight: 800;
    line-height: 1.3;
    color: #1e293b;
}

.cjj-contact-subtitle {
    margin: 0;
    font-size: 15px;
    color: #64748b;
    line-height: 1.45;
}

.cjj-contact-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    align-items: stretch;
}

.cjj-btn-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    border-radius: 14px;
    text-decoration: none !important;
    color: #ffffff !important;
    position: relative;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    outline: none;
    border: none;
    width: 100%;
    text-align: left;
}

.cjj-btn-item:hover,
.cjj-btn-item:focus {
    text-decoration: none !important;
    color: #ffffff !important;
    transform: translateY(-3px);
}

.cjj-btn-item:active {
    transform: translateY(-1px);
}

.cjj-btn-icon-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 12px;
    backdrop-filter: blur(4px);
    transition: transform 0.25s ease;
}

.cjj-btn-item:hover .cjj-btn-icon-wrap {
    transform: scale(1.1) rotate(-3deg);
    background: rgba(255, 255, 255, 0.28);
}

.cjj-btn-icon {
    width: 26px;
    height: 26px;
    display: block;
}

.cjj-btn-texts {
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: left;
    overflow: hidden;
}

.cjj-btn-label {
    font-size: 16px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.2px;
    color: #ffffff;
}

.cjj-btn-desc {
    font-size: 13px;
    font-weight: 500;
    opacity: 0.92;
    line-height: 1.25;
    margin-top: 3px;
    color: #f1f5f9;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

/* 1. WHATSAPP */
.cjj-btn-whatsapp {
    background: linear-gradient(135deg, #25D366 0%, #128C7E 100%);
    box-shadow: 0 6px 18px rgba(37, 211, 102, 0.32);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.cjj-btn-whatsapp:hover,
.cjj-btn-whatsapp:focus {
    box-shadow: 0 10px 24px rgba(37, 211, 102, 0.45);
}

/* 2. TELÉFONO */
.cjj-btn-phone {
    background: linear-gradient(135deg, #ff851a 0%, #ff6600 100%);
    background-color: #ff7a00;
    box-shadow: 0 6px 18px rgba(255, 122, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cjj-btn-phone:hover,
.cjj-btn-phone:focus {
    box-shadow: 0 10px 24px rgba(255, 122, 0, 0.5);
}

/* 3. FORMULARIO */
.cjj-btn-form {
    background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
    background-color: #0284c7;
    box-shadow: 0 6px 18px rgba(2, 132, 199, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.cjj-btn-form:hover,
.cjj-btn-form:focus {
    box-shadow: 0 10px 24px rgba(2, 132, 199, 0.5);
}

.cjj-btn-form.cjj-opened {
    background: linear-gradient(135deg, #0369a1 0%, #075985 100%);
    box-shadow: 0 3px 12px rgba(2, 132, 199, 0.45);
}

.cjj-btn-arrow {
    margin-left: auto;
    opacity: 0.85;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.cjj-btn-item:hover .cjj-btn-arrow {
    opacity: 1;
}

.cjj-btn-form.cjj-opened .cjj-btn-arrow {
    transform: rotate(90deg);
}

/* BOTÓN DE FORMULARIO EN MODO BOTONES COMPACTOS */
.cjj-btn-form-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: #0284c7;
    color: #ffffff !important;
    padding: 13px 22px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(2, 132, 199, 0.3);
    transition: all 0.2s ease;
    min-height: 46px;
    cursor: pointer;
    border: none;
    outline: none;
    font-family: inherit;
    line-height: normal;
}

.cjj-btn-form-toggle:hover,
.cjj-btn-form-toggle:focus {
    background: #0369a1;
    transform: translateY(-2px);
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(2, 132, 199, 0.4);
    text-decoration: none !important;
}

.cjj-btn-form-toggle:active {
    transform: translateY(-1px);
}

.cjj-btn-form-toggle.cjj-opened {
    background: #075985;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.cjj-btn-call {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    background: linear-gradient(135deg, #ff851a 0%, #ff6600 100%);
    background-color: #ff7a00;
    color: #ffffff !important;
    padding: 13px 22px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 700;
    text-decoration: none !important;
    box-shadow: 0 4px 12px rgba(255, 122, 0, 0.35);
    transition: all 0.2s ease;
    min-height: 46px;
}

.cjj-btn-call:hover,
.cjj-btn-call:focus {
    background: linear-gradient(135deg, #ff7a00 0%, #e65c00 100%);
    background-color: #e65c00;
    transform: translateY(-2px);
    color: #ffffff !important;
    box-shadow: 0 6px 16px rgba(255, 122, 0, 0.45);
    text-decoration: none !important;
}

.cjj-btn-call:active {
    transform: translateY(-1px);
}

/* FORMULARIO DESPLEGABLE */
.cjj-form-collapse {
    margin-top: 18px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #d6e8dc;
    border-radius: 14px;
    box-shadow: 0 8px 24px -4px rgba(0, 0, 0, 0.05);
    animation: cjjFadeSlideDown 0.32s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes cjjFadeSlideDown {
    from {
        opacity: 0;
        transform: translateY(-8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.cjj-form-topic-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    color: #166534;
    margin-bottom: 16px;
    line-height: 1.4;
}

.cjj-topic-badge {
    font-weight: 700;
    text-transform: uppercase;
    font-size: 11px;
    background: #dcfce7;
    color: #15803d;
    padding: 2px 8px;
    border-radius: 4px;
    letter-spacing: 0.4px;
    flex-shrink: 0;
}

.cjj-topic-text {
    font-weight: 600;
}

.cjj-form-row-inputs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.cjj-input-box {
    position: relative;
    width: 100%;
}

.cjj-input-field {
    width: 100%;
    height: 44px;
    padding: 0 14px;
    font-size: 14px;
    color: #1e293b;
    background-color: #f8fafc;
    border: 1.5px solid #cbd5e1;
    border-radius: 10px;
    transition: all 0.2s ease;
    outline: none;
    box-sizing: border-box;
}

.cjj-input-field:focus {
    background-color: #ffffff;
    border-color: #008c35;
    box-shadow: 0 0 0 3px rgba(0, 140, 53, 0.15);
}

.cjj-input-field::placeholder {
    color: #94a3b8;
}

.cjj-form-row-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-top: 14px;
    flex-wrap: wrap;
}

.cjj-checkbox-wrapper {
    display: flex;
    align-items: center;
    font-size: 13px;
    color: #475569;
    cursor: pointer;
    user-select: none;
    margin: 0;
}

.cjj-checkbox-wrapper input[type="checkbox"] {
    margin: 0 8px 0 0;
    width: 16px;
    height: 16px;
    accent-color: #008c35;
    cursor: pointer;
}

.cjj-checkbox-wrapper a {
    color: #008c35;
    text-decoration: underline;
    font-weight: 600;
}

.cjj-checkbox-wrapper a:hover {
    color: #006622;
}

.cjj-btn-submit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 24px;
    background: linear-gradient(135deg, #008c35 0%, #006622 100%);
    color: #ffffff !important;
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 140, 53, 0.28);
    cursor: pointer;
    transition: all 0.22s ease;
    outline: none;
    white-space: nowrap;
}

.cjj-btn-submit:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0, 140, 53, 0.38);
}

.cjj-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.cjj-form-feedback {
    margin-top: 14px;
    padding: 12px 16px;
    border-radius: 10px;
    font-size: 14px;
    line-height: 1.45;
    animation: cjjFadeSlideDown 0.25s ease;
}

.cjj-feedback-success {
    background-color: #ecfdf5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.cjj-feedback-error {
    background-color: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.cjj-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
    border-top-color: #ffffff;
    animation: cjjSpin 0.7s linear infinite;
}

@keyframes cjjSpin {
    to { transform: rotate(360deg); }
}

@media (max-width: 991px) {
    .cjj-contact-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .cjj-btn-item {
        padding: 14px 16px;
    }

    .cjj-btn-desc {
        white-space: normal;
    }

    .cjj-form-row-inputs {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .cjj-form-row-actions {
        flex-direction: column;
        align-items: stretch;
        gap: 14px;
    }

    .cjj-btn-submit {
        width: 100%;
        height: 46px;
    }
}

@media (max-width: 576px) {
    .cjj-contact-block {
        padding: 22px 16px;
        margin: 24px auto;
        border-radius: 14px;
    }

    .cjj-contact-title {
        font-size: 20px;
    }

    .cjj-contact-subtitle {
        font-size: 14px;
    }

    .cjj-btn-label {
        font-size: 15px;
    }

    .cjj-btn-desc {
        font-size: 12px;
    }

    .cjj-form-collapse {
        padding: 16px 12px;
    }
}
